소스 검색

pastojs: source map: prepend absolute source files with file:// if sourceroot

git-svn-id: trunk@42869 -
Mattias Gaertner 6 년 전
부모
커밋
0ed305fe31
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      packages/pastojs/src/pas2jscompiler.pp

+ 5 - 1
packages/pastojs/src/pas2jscompiler.pp

@@ -2273,8 +2273,12 @@ begin
         MapFilename:=LocalFilename;
       end;
     end;
-    if FilenameIsAbsolute(MapFilename) then
+    if FilenameIsAbsolute(MapFilename)
+        and SameText(SrcMapSourceRoot,'file://') then
+      begin
+      // Firefox needs the "file://" schema with every file
       MapFilename:='file://'+MapFilename;
+      end;
     {$IFNDEF Unix}
     // use / as PathDelim
     if PathDelim<>'/' then