Changeset 190790 in webkit
- Timestamp:
- Oct 9, 2015 7:21:37 AM (9 years ago)
- Location:
- branches/safari-601.1.46-branch/Source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-601.1.46-branch/Source/JavaScriptCore/ChangeLog
r190788 r190790 1 2015-10-08 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r189834. rdar://problem/22807373 4 5 2015-09-15 Joseph Pecoraro <pecoraro@apple.com> 6 7 Web Inspector: Paused Debugger prevents page reload 8 https://bugs.webkit.org/show_bug.cgi?id=148174 9 10 Reviewed by Brian Burg. 11 12 * debugger/Debugger.h: 13 (JSC::Debugger::suppressAllPauses): 14 (JSC::Debugger::setSuppressAllPauses): 15 * debugger/Debugger.cpp: 16 (JSC::Debugger::Debugger): 17 (JSC::Debugger::pauseIfNeeded): 18 * inspector/agents/InspectorDebuggerAgent.h: 19 * inspector/agents/InspectorDebuggerAgent.cpp: 20 (Inspector::InspectorDebuggerAgent::setSuppressAllPauses): 21 Provide a way to suppress pauses. 22 1 23 2015-10-08 Matthew Hanson <matthew_hanson@apple.com> 2 24 -
branches/safari-601.1.46-branch/Source/JavaScriptCore/debugger/Debugger.cpp
r186279 r190790 161 161 , m_hasHandlerForExceptionCallback(false) 162 162 , m_isInWorkerThread(isInWorkerThread) 163 , m_suppressAllPauses(false) 163 164 , m_steppingMode(SteppingModeDisabled) 164 165 , m_reasonForPause(NotPaused) … … 649 650 return; 650 651 652 if (m_suppressAllPauses) 653 return; 654 651 655 JSGlobalObject* vmEntryGlobalObject = callFrame->vmEntryGlobalObject(); 652 656 if (!needPauseHandling(vmEntryGlobalObject)) -
branches/safari-601.1.46-branch/Source/JavaScriptCore/debugger/Debugger.h
r185608 r190790 109 109 bool isStepping() const { return m_steppingMode == SteppingModeEnabled; } 110 110 111 bool suppressAllPauses() const { return m_suppressAllPauses; } 112 void setSuppressAllPauses(bool suppress) { m_suppressAllPauses = suppress; } 113 111 114 virtual void sourceParsed(ExecState*, SourceProvider*, int errorLineNumber, const WTF::String& errorMessage) = 0; 112 115 … … 197 200 bool m_hasHandlerForExceptionCallback : 1; 198 201 bool m_isInWorkerThread : 1; 202 bool m_suppressAllPauses : 1; 199 203 unsigned m_steppingMode : 1; // SteppingMode 200 204 -
branches/safari-601.1.46-branch/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
r186279 r190790 135 135 { 136 136 return scriptDebugServer().isPaused(); 137 } 138 139 void InspectorDebuggerAgent::setSuppressAllPauses(bool suppress) 140 { 141 scriptDebugServer().setSuppressAllPauses(suppress); 137 142 } 138 143 -
branches/safari-601.1.46-branch/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h
r185722 r190790 89 89 90 90 bool isPaused(); 91 91 92 void setSuppressAllPauses(bool); 93 92 94 void handleConsoleAssert(const String& message); 93 95 -
branches/safari-601.1.46-branch/Source/WebCore/ChangeLog
r190786 r190790 1 2015-10-08 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r189834. rdar://problem/22807373 4 5 2015-09-15 Joseph Pecoraro <pecoraro@apple.com> 6 7 Web Inspector: Paused Debugger prevents page reload 8 https://bugs.webkit.org/show_bug.cgi?id=148174 9 10 Reviewed by Brian Burg. 11 12 When navigating the page while paused, suppress any pausing until the page 13 has completed navigation. If not paused and navigating, you can still pause 14 in pagehide and unload handlers or other late page events. 15 16 Could not write a reliable test for this at the moment. 17 InspectorTest.reloadPage has multiple issues with the output, 18 so I'll investigate making reload tests more reliable later. 19 20 * inspector/InspectorController.h: 21 * inspector/InspectorController.cpp: 22 (WebCore::InspectorController::resume): Deleted. 23 * loader/FrameLoader.cpp: 24 (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): 25 We now use existing InspectorInstrumentation functions instead of a method 26 on InspectorController during load. In dropping the method InspectorController 27 can drop a member variable no longer used. 28 29 * inspector/InspectorInstrumentation.h: 30 (WebCore::InspectorInstrumentation::willStartProvisionalLoad): 31 Add a new instrumentation hook. 32 33 * inspector/InspectorInstrumentation.cpp: 34 (WebCore::InspectorInstrumentation::willStartProvisionalLoadImpl): 35 (WebCore::InspectorInstrumentation::didCommitLoadImpl): 36 When starting or completing main frame navigations, let the PageDebuggerAgent do some work. 37 38 * inspector/PageDebuggerAgent.h: 39 * inspector/PageDebuggerAgent.cpp: 40 (WebCore::PageDebuggerAgent::mainFrameStartedLoading): 41 (WebCore::PageDebuggerAgent::mainFrameStoppedLoading): 42 (WebCore::PageDebuggerAgent::mainFrameNavigated): 43 Suppress pausing if navigating while paused. Otherwise behave as normal. 44 1 45 2015-10-08 Matthew Hanson <matthew_hanson@apple.com> 2 46 -
branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorController.cpp
r186279 r190790 151 151 152 152 auto debuggerAgentPtr = std::make_unique<PageDebuggerAgent>(m_injectedScriptManager.get(), m_instrumentingAgents.get(), pageAgent, m_overlay.get()); 153 m_debuggerAgent = debuggerAgentPtr.get();153 PageDebuggerAgent* debuggerAgent = debuggerAgentPtr.get(); 154 154 m_agents.append(WTF::move(debuggerAgentPtr)); 155 155 156 auto domDebuggerAgentPtr = std::make_unique<InspectorDOMDebuggerAgent>(m_instrumentingAgents.get(), m_domAgent, m_debuggerAgent);156 auto domDebuggerAgentPtr = std::make_unique<InspectorDOMDebuggerAgent>(m_instrumentingAgents.get(), m_domAgent, debuggerAgent); 157 157 m_domDebuggerAgent = domDebuggerAgentPtr.get(); 158 158 m_agents.append(WTF::move(domDebuggerAgentPtr)); … … 172 172 } 173 173 174 runtimeAgent->setScriptDebugServer(& m_debuggerAgent->scriptDebugServer());175 m_timelineAgent->setPageScriptDebugServer(& m_debuggerAgent->scriptDebugServer());174 runtimeAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer()); 175 m_timelineAgent->setPageScriptDebugServer(&debuggerAgent->scriptDebugServer()); 176 176 } 177 177 … … 398 398 } 399 399 400 void InspectorController::resume()401 {402 if (m_debuggerAgent) {403 ErrorString unused;404 m_debuggerAgent->resume(unused);405 }406 }407 408 400 bool InspectorController::developerExtrasEnabled() const 409 401 { -
branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorController.h
r186133 r190790 124 124 WEBCORE_EXPORT void setProfilerEnabled(bool); 125 125 126 void resume();127 128 126 InspectorClient* inspectorClient() const { return m_inspectorClient; } 129 127 InspectorPageAgent* pageAgent() const { return m_pageAgent; } … … 151 149 InspectorResourceAgent* m_resourceAgent; 152 150 InspectorPageAgent* m_pageAgent; 153 PageDebuggerAgent* m_debuggerAgent;154 151 InspectorDOMDebuggerAgent* m_domDebuggerAgent; 155 152 InspectorTimelineAgent* m_timelineAgent; -
branches/safari-601.1.46-branch/Source/WebCore/inspector/InspectorInstrumentation.cpp
r186133 r190790 773 773 if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents.inspectorLayerTreeAgent()) 774 774 layerTreeAgent->reset(); 775 776 if (PageDebuggerAgent* pageDebuggerAgent = instrumentingAgents.pageDebuggerAgent()) 777 pageDebuggerAgent->mainFrameNavigated(); 775 778 } 776 779 … … 803 806 void InspectorInstrumentation::frameStartedLoadingImpl(InstrumentingAgents& instrumentingAgents, Frame& frame) 804 807 { 808 if (frame.isMainFrame()) { 809 if (PageDebuggerAgent* pageDebuggerAgent = instrumentingAgents.pageDebuggerAgent()) 810 pageDebuggerAgent->mainFrameStartedLoading(); 811 } 812 805 813 if (InspectorPageAgent* inspectorPageAgent = instrumentingAgents.inspectorPageAgent()) 806 814 inspectorPageAgent->frameStartedLoading(frame); … … 809 817 void InspectorInstrumentation::frameStoppedLoadingImpl(InstrumentingAgents& instrumentingAgents, Frame& frame) 810 818 { 819 if (frame.isMainFrame()) { 820 if (PageDebuggerAgent* pageDebuggerAgent = instrumentingAgents.pageDebuggerAgent()) 821 pageDebuggerAgent->mainFrameStoppedLoading(); 822 } 823 811 824 if (InspectorPageAgent* inspectorPageAgent = instrumentingAgents.inspectorPageAgent()) 812 825 inspectorPageAgent->frameStoppedLoading(frame); -
branches/safari-601.1.46-branch/Source/WebCore/inspector/PageDebuggerAgent.cpp
r180653 r190790 145 145 } 146 146 147 void PageDebuggerAgent::mainFrameStartedLoading() 148 { 149 if (isPaused()) { 150 setSuppressAllPauses(true); 151 ErrorString unused; 152 resume(unused); 153 } 154 } 155 156 void PageDebuggerAgent::mainFrameStoppedLoading() 157 { 158 setSuppressAllPauses(false); 159 } 160 161 void PageDebuggerAgent::mainFrameNavigated() 162 { 163 setSuppressAllPauses(false); 164 } 165 147 166 } // namespace WebCore -
branches/safari-601.1.46-branch/Source/WebCore/inspector/PageDebuggerAgent.h
r178820 r190790 52 52 void didClearMainFrameWindowObject(); 53 53 54 void mainFrameStartedLoading(); 55 void mainFrameStoppedLoading(); 56 void mainFrameNavigated(); 57 54 58 virtual PageScriptDebugServer& scriptDebugServer() override; 55 59 -
branches/safari-601.1.46-branch/Source/WebCore/loader/FrameLoader.cpp
r187980 r190790 2983 2983 return; 2984 2984 2985 if (Page* page = m_frame.page()) {2986 if (m_frame.isMainFrame())2987 page->inspectorController().resume();2988 }2989 2990 2985 setProvisionalDocumentLoader(m_policyDocumentLoader.get()); 2991 2986 m_loadType = type;
Note: See TracChangeset
for help on using the changeset viewer.