[Webkit-unassigned] [Bug 137297] Allowing eval'ed code to be named in stack traces
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 5 11:33:35 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=137297
--- Comment #5 from Joseph Pecoraro <joepeck at webkit.org> ---
> Safari doesn't support //# sourceURL= in script tags either. Would you
> recommend that I create another bug for that?
Safari supports sourceURL in <script>, Function, and eval for locations logged to Web Inspector. For example a `console.trace()` or uncaught exception case you will see the source URL location:
Global Code (this is missing sourceURL):
[Trace] Trace
Global Code (test-page.html:25)
[Error] Error
Global Code (test-page.html:26)
Function: (sourceURL shows up for the anonymous function)
[Trace] Trace
anonymous (namedFunction.js:3)
Global Code (test-page.html:36:202)
[Error] Error
anonymous (namedFunction.js:4)
Global Code (test-page.html:36:194)
eval: (sourceURL shows up for the eval code)
[Trace] Trace
Eval Code (namedEval.js:2)
eval
Global Code (test-page.html:39)
[Error] Error
Eval Code (namedEval.js:3)
eval
Global Code (test-page.html:39)
JavaScriptCore just doesn't use those locations by default in its Error.stack reporting.
It looks like that comes from Interpreter::stackTraceAsString which ultimately gets the ScriptExecutable's sourceURL which is the SourceProvider's url, not the SourceProvider's sourceURL. I think it would be reasonable to use the best name available in all error stacks.
So there are two issues here:
1. sourceURL directive should show up in Error.stack.
2. sourceURL directive in <script> global code wasn't displayed properly in Web Inspector.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170705/81c4c3c9/attachment.html>
More information about the webkit-unassigned
mailing list