Browse Source

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

mattias 6 years ago
parent
commit
cca010888e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      compiler/packages/pastojs/src/pas2jscompiler.pp

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

@@ -2254,8 +2254,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