Changeset 207267 in webkit
- Timestamp:
- Oct 12, 2016 7:05:44 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207261 r207267 1 2016-10-12 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: step-into `console.log(o)` should not step through inspector javascript 4 https://bugs.webkit.org/show_bug.cgi?id=161656 5 <rdar://problem/28181123> 6 7 Reviewed by Timothy Hatcher. 8 9 * inspector/debugger/stepping/stepping-internal-scripts-expected.txt: Added. 10 * inspector/debugger/stepping/stepping-internal-scripts.html: Added. 11 Ensure step-into a console.log statement steps past it, and doesn't pause 12 inside the non-visible internal script. 13 1 14 2016-10-12 Yusuke Suzuki <utatane.tea@gmail.com> 2 15 -
trunk/LayoutTests/inspector/debugger/breakpoint-syntax-error-top-level.html
r201473 r207267 22 22 description: "Make sure exceptions from top-level syntax errors don't cause us to crash.", 23 23 test: (resolve, reject) => { 24 InspectorProtocol.eventHandler["Debugger.paused"] = function(messageObject) { 24 InspectorProtocol.eventHandler["Debugger.paused"] = function(messageObject) { 25 25 InspectorProtocol.sendCommand("Debugger.resume"); 26 26 … … 38 38 </head> 39 39 <body onload="runTest()"> 40 <p> Making sure we don't crash when having a top-level syntax error.</p>40 <p>Making sure we don't crash when having a top-level syntax error.</p> 41 41 </body> 42 42 </html> -
trunk/Source/JavaScriptCore/ChangeLog
r207266 r207267 1 2016-10-12 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: step-into `console.log(o)` should not step through inspector javascript 4 https://bugs.webkit.org/show_bug.cgi?id=161656 5 <rdar://problem/28181123> 6 7 Reviewed by Timothy Hatcher. 8 9 * debugger/Debugger.h: 10 * debugger/Debugger.cpp: 11 (JSC::Debugger::pauseIfNeeded): 12 If the Script is blacklisted skip checking if we need to pause. 13 14 (JSC::Debugger::isBlacklisted): 15 (JSC::Debugger::addToBlacklist): 16 (JSC::Debugger::clearBlacklist): 17 Add the ability to add a Script to a blacklist. Currently the blacklist 18 only prevents pausing in the Script. 19 20 * inspector/agents/InspectorDebuggerAgent.cpp: 21 (Inspector::isWebKitInjectedScript): 22 (Inspector::InspectorDebuggerAgent::didParseSource): 23 Always add Internal InjectedScripts to the Debugger's blacklist. 24 25 (Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState): 26 Clear blacklists when clearing debugger state. 27 1 28 2016-10-12 Keith Miller <keith_miller@apple.com> 2 29 -
trunk/Source/JavaScriptCore/debugger/Debugger.cpp
r206698 r207267 692 692 return; 693 693 694 intptr_t sourceID = DebuggerCallFrame::sourceIDForCallFrame(m_currentCallFrame); 695 if (isBlacklisted(sourceID)) 696 return; 697 694 698 DebuggerPausedScope debuggerPausedScope(*this); 695 699 … … 701 705 702 706 Breakpoint breakpoint; 703 intptr_t sourceID = DebuggerCallFrame::sourceIDForCallFrame(m_currentCallFrame);704 707 TextPosition position = DebuggerCallFrame::positionForCallFrame(m_currentCallFrame); 705 708 pauseNow |= didHitBreakpoint = hasBreakpoint(sourceID, position, &breakpoint); … … 913 916 } 914 917 918 bool Debugger::isBlacklisted(SourceID sourceID) const 919 { 920 return m_blacklistedScripts.contains(sourceID); 921 } 922 923 void Debugger::addToBlacklist(SourceID sourceID) 924 { 925 m_blacklistedScripts.add(sourceID); 926 } 927 928 void Debugger::clearBlacklist() 929 { 930 m_blacklistedScripts.clear(); 931 } 932 915 933 } // namespace JSC -
trunk/Source/JavaScriptCore/debugger/Debugger.h
r206653 r207267 111 111 void stepOutOfFunction(); 112 112 113 bool isBlacklisted(SourceID) const; 114 void addToBlacklist(SourceID); 115 void clearBlacklist(); 116 113 117 bool isPaused() const { return m_isPaused; } 114 118 bool isStepping() const { return m_steppingMode == SteppingModeEnabled; } … … 217 221 VM& m_vm; 218 222 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; 220 225 221 226 PauseOnExceptionsState m_pauseOnExceptionsState; -
trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
r206653 r207267 682 682 } 683 683 684 static bool isWebKitInjectedScript(const String& sourceURL) 685 { 686 return sourceURL.startsWith("__InjectedScript_") && sourceURL.endsWith(".js"); 687 } 688 684 689 void InspectorDebuggerAgent::didParseSource(JSC::SourceID sourceID, const Script& script) 685 690 { … … 696 701 697 702 m_scripts.set(sourceID, script); 703 704 if (hasSourceURL && isWebKitInjectedScript(sourceURL)) 705 m_scriptDebugServer.addToBlacklist(sourceID); 698 706 699 707 String scriptURLForBreakpoints = hasSourceURL ? script.sourceURL : script.url; … … 869 877 m_scriptDebugServer.clearBreakpointActions(); 870 878 m_scriptDebugServer.clearBreakpoints(); 879 m_scriptDebugServer.clearBlacklist(); 871 880 872 881 m_pausedScriptState = nullptr;
Note: See TracChangeset
for help on using the changeset viewer.