RESOLVED FIXED150753
Web Inspector: Test Debugger.scriptParsed events received after opening inspector frontend
https://bugs.webkit.org/show_bug.cgi?id=150753
Summary Web Inspector: Test Debugger.scriptParsed events received after opening inspe...
Joseph Pecoraro
Reported 2015-10-30 20:08:09 PDT
* SUMMARY Test Debugger.sourceParsed events received after opening inspector frontend. Previously we were seeing built-in scripts which caused a flurry of unexpected scriptParsed messages being sent to the frontend. Write a script to test: (1) what scriptParsed messages get sent to the frontend as we expect this to be small (2) ensure different kinds of scripts (external, inline, attributes, eval, etc) get sent to the frontend as we would expect This caught an issue with the recent sourceURL/sourceMappingURL directive handling.
Attachments
[PATCH] Proposed Fix (9.52 KB, patch)
2015-10-30 20:13 PDT, Joseph Pecoraro
no flags
Radar WebKit Bug Importer
Comment 1 2015-10-30 20:08:58 PDT
Joseph Pecoraro
Comment 2 2015-10-30 20:13:46 PDT
Created attachment 264463 [details] [PATCH] Proposed Fix
WebKit Commit Bot
Comment 3 2015-10-30 21:59:18 PDT
Comment on attachment 264463 [details] [PATCH] Proposed Fix Clearing flags on attachment: 264463 Committed r191839: <http://trac.webkit.org/changeset/191839>
WebKit Commit Bot
Comment 4 2015-10-30 21:59:23 PDT
All reviewed patches have been landed. Closing bug.
Blaze Burg
Comment 5 2015-10-31 08:55:47 PDT
Comment on attachment 264463 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=264463&action=review This is a nice test. Does it cover the JSC change as well? > LayoutTests/inspector/debugger/scriptParsed.html:86 > + foundInjectedScriptSourceScript = true; I suppose this could be foundXXX = foundXXX || isXXX(), but it doesn't read any better. I would have done foundXXX |= isXXX() since it isn't that expensive to recheck. Alternatively, you could run Array.some() with a lambda for each check.
Joseph Pecoraro
Comment 6 2015-11-02 11:35:11 PST
(In reply to comment #5) > Comment on attachment 264463 [details] > [PATCH] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=264463&action=review > > This is a nice test. Does it cover the JSC change as well? Yes. It was required to get the sourceURL for the InjectedScript and CommandLineAPI injected script. See the ChangeLog for more details. > > LayoutTests/inspector/debugger/scriptParsed.html:86 > > + foundInjectedScriptSourceScript = true; > > I suppose this could be foundXXX = foundXXX || isXXX(), but it doesn't read > any better. I would have done foundXXX |= isXXX() since it isn't that > expensive to recheck. Alternatively, you could run Array.some() with a > lambda for each check. I want this test to ensure we don't see duplicates of the same script. The `foundXXX |= isXXX()` approach wouldn't account for that. I'm sure there are stylistically a bunch of possible solutions, this just seemed the most straight forward.
Note You need to log in before you can comment on or make changes to this bug.