Ignore:
Timestamp:
Oct 12, 2016, 7:05:44 PM (9 years ago)
Author:
[email protected]
Message:

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 <Joseph Pecoraro> 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/debugger/Debugger.h

    r206653 r207267  
    111111    void stepOutOfFunction();
    112112
     113    bool isBlacklisted(SourceID) const;
     114    void addToBlacklist(SourceID);
     115    void clearBlacklist();
     116
    113117    bool isPaused() const { return m_isPaused; }
    114118    bool isStepping() const { return m_steppingMode == SteppingModeEnabled; }
     
    217221    VM& m_vm;
    218222    HashSet<JSGlobalObject*> m_globalObjects;
    219     HashMap<SourceID, DebuggerParseData> m_parseDataMap;
     223    HashMap<SourceID, DebuggerParseData, WTF::IntHash<SourceID>, WTF::UnsignedWithZeroKeyHashTraits<SourceID>> m_parseDataMap;
     224    HashSet<SourceID, WTF::IntHash<SourceID>, WTF::UnsignedWithZeroKeyHashTraits<SourceID>> m_blacklistedScripts;
    220225
    221226    PauseOnExceptionsState m_pauseOnExceptionsState;
Note: See TracChangeset for help on using the changeset viewer.