* 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.
<rdar://problem/23343418>
Created attachment 264463 [details] [PATCH] Proposed Fix
Comment on attachment 264463 [details] [PATCH] Proposed Fix Clearing flags on attachment: 264463 Committed r191839: <http://trac.webkit.org/changeset/191839>
All reviewed patches have been landed. Closing bug.
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.
(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.