Web Inspector: step-into `console.log(o)` should not step through inspector javascript
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Oct 2016 02:05:44 +0000 (02:05 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Oct 2016 02:05:44 +0000 (02:05 +0000)
commitc1a9d8321a9d32e6812dd753107e70d61e2bcd3c
treee3db47700c0959f8682cca11a73d64bf83b8b403
parent4475d32713430a571bf7b8dd364c8ab9148cac19
Web Inspector: step-into `console.log(o)` should not step through inspector javascript
https://bugs.webkit.org/show_bug.cgi?id=161656
<rdar://problem/28181123>

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

Source/JavaScriptCore:

* debugger/Debugger.h:
* debugger/Debugger.cpp:
(JSC::Debugger::pauseIfNeeded):
If the Script is blacklisted skip checking if we need to pause.

(JSC::Debugger::isBlacklisted):
(JSC::Debugger::addToBlacklist):
(JSC::Debugger::clearBlacklist):
Add the ability to add a Script to a blacklist. Currently the blacklist
only prevents pausing in the Script.

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::isWebKitInjectedScript):
(Inspector::InspectorDebuggerAgent::didParseSource):
Always add Internal InjectedScripts to the Debugger's blacklist.

(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState):
Clear blacklists when clearing debugger state.

LayoutTests:

* inspector/debugger/stepping/stepping-internal-scripts-expected.txt: Added.
* inspector/debugger/stepping/stepping-internal-scripts.html: Added.
Ensure step-into a console.log statement steps past it, and doesn't pause
inside the non-visible internal script.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/debugger/breakpoint-syntax-error-top-level.html
LayoutTests/inspector/debugger/stepping/stepping-internal-scripts-expected.txt [new file with mode: 0644]
LayoutTests/inspector/debugger/stepping/stepping-internal-scripts.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/debugger/Debugger.cpp
Source/JavaScriptCore/debugger/Debugger.h
Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp