Fix for file evaluation showing up as "(anonymous)" in Safari profiler.

Closes #4.

Reviewed by me.
This commit is contained in:
Francisco Tolmasky committed 2009-04-23 04:38:59 -07:00
1 parent 120dcdac54
commit 2f790c6503
1 file changed
+1
+1
View File
@@ -161,6 +161,7 @@ function fragment_evaluate_code(aFragment)
compiled = Packages.org.mozilla.javascript.Context.getCurrentContext().compileFunction(window, "function(){"+GET_CODE(aFragment)+"}", GET_FILE(aFragment).path, 0, null);
#else
compiled = new Function(GET_CODE(aFragment));
compiled.displayName = GET_FILE(aFragment).path;
#endif
}
catch(anException)