Web Inspector: Test Debugger.scriptParsed events received after opening inspector...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Oct 2015 04:58:28 +0000 (04:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Oct 2015 04:58:28 +0000 (04:58 +0000)
commit22a2cee21b27b6a0616ddce930f063a21128c80c
treefc075b9952e01c16e938f9770846caaacd88244f
parent4b3fede0d3f5919e55e928fcb2621d09611e8f5b
Web Inspector: Test Debugger.scriptParsed events received after opening inspector frontend
https://bugs.webkit.org/show_bug.cgi?id=150753

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-10-30
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* parser/Parser.h:
(JSC::Parser<LexerType>::parse):
Only set the directives on the SourceProvider if we were parsing the
entire file (Program or Module), not if we are in function parsing mode.
This was inadvertently clearing the directives stored on the
SourceProvider when the function parse didn't see directives and reset
the values on the source provider.

LayoutTests:

Explicit test for the scriptParsed events we expect to see
when first opening the inspector on an already open page.
We do not expect to see some scripts (built-ins) but do expect
to see all user scripts evaluated on the page.

* inspector/debugger/scriptParsed-expected.txt: Added.
* inspector/debugger/scriptParsed.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/debugger/scriptParsed-expected.txt [new file with mode: 0644]
LayoutTests/inspector/debugger/scriptParsed.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.h