[Webkit-unassigned] [Bug 77010] Script pane: Optionally show code included via eval()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 26 07:45:53 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=77010





--- Comment #4 from Patrick Mueller <pmuellr at yahoo.com>  2012-01-26 07:45:52 PST ---
(In reply to comment #2)
> Ideally, I would like to see scripts loaded via XHR and eval()-d in the
> list of sources. If that's not possible, I'd like to be able to jump from 
> related entry in the network pane to scripts pane. If that's hard, ...

Yeah, I'd say this falls in the "hard" to "not possible" category.

You're suggesting that somehow a magic link be made between an XHR request and an eval().  You could imagine the debugger being super smart, and checking to see if the string being eval()'d is the same string as from an XHR, then you'd know.  

But in general, if you're XHRing the code, you're modifying it.   Because otherwise you could just inject a <script src=> element in your document.  And if you're modifying it, then that magic link disappears, because the string you XHR !== the string your are eval()ing.

Source URL is what you want here, as Vsevolod notes.  It's the only practical thing to do, in my experience. And it works quite well - I make use of it ALL THE TIME.  If your library vendor is XHRing and eval()ing under the covers for you, then you need to bug your vendor to add the source URL comment to the XHR result they are eval()ing.  It's very easy to do.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list