Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jan 2014 02:38:08 +0000 (02:38 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jan 2014 02:38:08 +0000 (02:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=127409

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* inspector/InspectorAgentBase.h:
When disconnecting agents, provide a InspectorDisconnectReason for
the disconnection. It could be that an inspector frontend is just
disconnecting or that the inspected object is going away entirely
and we can avoid doing some work.

* runtime/JSGlobalObjectDebuggable.h:
* runtime/JSGlobalObjectDebuggable.cpp:
(JSC::JSGlobalObjectDebuggable::~JSGlobalObjectDebuggable):
(JSC::JSGlobalObjectDebuggable::disconnect):
(JSC::JSGlobalObjectDebuggable::disconnectInternal):
Pass different reasons for the different disconnects.

* inspector/InspectorAgentRegistry.cpp:
(Inspector::InspectorAgentRegistry::willDestroyFrontendAndBackend):
* inspector/InspectorAgentRegistry.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
* inspector/JSGlobalObjectInspectorController.h:
* inspector/agents/InspectorAgent.cpp:
(Inspector::InspectorAgent::willDestroyFrontendAndBackend):
* inspector/agents/InspectorAgent.h:
Pass InspectorDisconnectReason around where needed.

Source/WebCore:

No new tests (OOPS!).

* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::ScriptDebugServer):
Remove m_recompileTimer and the recompile soon function.
We can just recompile immediately in all existing cases.

* bindings/js/PageScriptDebugServer.h:
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::addListener):
(WebCore::PageScriptDebugServer::removeListener):
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
(WebCore::PageScriptDebugServer::didAddFirstListener):
(WebCore::PageScriptDebugServer::didRemoveLastListener):
Add a "didAddFirstListener" to match "didRemoveLastListener".
Only recompile functions when we attach the debugger and when
we detach the last listener.

* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::addListener):
(WebCore::WorkerScriptDebugServer::removeListener):
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
Same thing. Also rearrange the functions to read better.

* inspector/InspectorProfilerAgent.cpp:
Use the direct recompile function instead of the removed "soon" version.

* WebCore.exp.in:
Update disconnectFrontend symbol.

* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::disconnect):
* testing/Internals.cpp:
(WebCore::Internals::closeDummyInspectorFrontend):
* workers/WorkerMessagingProxy.cpp:
(WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
Include an InspectorDisconnectReason when calling disconnectFrontend.

* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.

* inspector/InspectorProfilerAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::enable):
(WebCore::InspectorProfilerAgent::disable):
(WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend):
If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.

* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::close):
Pass different reasons for the different disconnect reasons.

* inspector/WorkerInspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::~WorkerInspectorController):
(WebCore::WorkerInspectorController::disconnectFrontend):
Pass different reasons for the different disconnect reasons.

* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInputAgent.cpp:
(WebCore::InspectorInputAgent::willDestroyFrontendAndBackend):
* inspector/InspectorInputAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
* inspector/InspectorPageAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorWorkerAgent.h:
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::disable):
(WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
* inspector/PageDebuggerAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
* inspector/PageRuntimeAgent.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer):
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
* inspector/WorkerRuntimeAgent.h:
Include InspectorDisconnectReason param.

Source/WebKit/efl:

* WebCoreSupport/InspectorClientEfl.cpp:
(WebCore::InspectorFrontendClientEfl::destroyInspectorWindow):
Include InspectorDisconnectReason.

Source/WebKit/gtk:

* WebCoreSupport/InspectorClientGtk.cpp:
(WebKit::InspectorFrontendClient::destroyInspectorWindow):
Include InspectorDisconnectReason.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController destroyInspectorView:]):
Include InspectorDisconnectReason.

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::destroyInspectorView):
Include InspectorDisconnectReason.

Source/WebKit2:

* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::closeWindow):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::remoteFrontendDisconnected):
Include InspectorDisconnectReason.

LayoutTests:

Remove "Breakpoints Enabled" output in tests. Breakpoints are already
enabled by default in tests. Also since the DebuggerAgent.enable() call
now immediately recompiles scripts, sourceParsed events are now sent to
the frontend earlier even before the setBreakpointsActive message has
been processed, so the "Breakpoints Enabled" output was showing up
later, seemingly randomly in tests, and is no longer helpful.

* inspector-protocol/debugger/breakpoint-action-detach-expected.txt:
* inspector-protocol/debugger/breakpoint-action-detach.html:
* inspector-protocol/debugger/breakpoint-action-with-exception-expected.txt:
* inspector-protocol/debugger/breakpoint-action-with-exception.html:
* inspector-protocol/debugger/breakpoint-condition-detach-expected.txt:
* inspector-protocol/debugger/breakpoint-condition-detach.html:
* inspector-protocol/debugger/breakpoint-condition-with-exception-expected.txt:
* inspector-protocol/debugger/breakpoint-condition-with-exception.html:
* inspector-protocol/debugger/breakpoint-eval-with-exception-expected.txt:
* inspector-protocol/debugger/breakpoint-eval-with-exception.html:
* inspector-protocol/debugger/breakpoint-inside-conditons-and-actions-expected.txt:
* inspector-protocol/debugger/breakpoint-inside-conditons-and-actions.html:
* inspector-protocol/debugger/call-frame-function-name-expected.txt:
* inspector-protocol/debugger/call-frame-function-name.html:
* inspector-protocol/debugger/call-frame-this-host-expected.txt:
* inspector-protocol/debugger/call-frame-this-host.html:
* inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt:
* inspector-protocol/debugger/call-frame-this-nonstrict.html:
* inspector-protocol/debugger/call-frame-this-strict-expected.txt:
* inspector-protocol/debugger/call-frame-this-strict.html:
* inspector-protocol/debugger/didSampleProbe-multiple-probes-expected.txt:
* inspector-protocol/debugger/didSampleProbe-multiple-probes.html:
* inspector-protocol/debugger/nested-inspectors-expected.txt:
* inspector-protocol/debugger/nested-inspectors.html:
* inspector-protocol/debugger/removeBreakpoint-expected.txt:
* inspector-protocol/debugger/removeBreakpoint.html:
* inspector-protocol/debugger/setBreakpoint-actions-expected.txt:
* inspector-protocol/debugger/setBreakpoint-actions.html:
* inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt:
* inspector-protocol/debugger/setBreakpoint-autoContinue.html:
* inspector-protocol/debugger/setBreakpoint-column-expected.txt:
* inspector-protocol/debugger/setBreakpoint-column.html:
* inspector-protocol/debugger/setBreakpoint-condition-expected.txt:
* inspector-protocol/debugger/setBreakpoint-condition.html:
* inspector-protocol/debugger/setBreakpoint-expected.txt:
* inspector-protocol/debugger/setBreakpoint-options-exception-expected.txt:
* inspector-protocol/debugger/setBreakpoint-options-exception.html:
* inspector-protocol/debugger/setBreakpoint.html:
* inspector-protocol/debugger/setBreakpointByUrl-sourceURL-expected.txt:
* inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html:
* inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt:
* inspector-protocol/debugger/setPauseOnExceptions-all.html:
* inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt:
* inspector-protocol/debugger/setPauseOnExceptions-none.html:
* inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt:
* inspector-protocol/debugger/setPauseOnExceptions-uncaught.html:
* inspector-protocol/dom-debugger/node-removed-expected.txt:
* inspector-protocol/dom-debugger/node-removed.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162676 268f45cc-cd09-0410-ab3c-d52691b4dbfc

132 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector-protocol/debugger/breakpoint-action-detach-expected.txt
LayoutTests/inspector-protocol/debugger/breakpoint-action-detach.html
LayoutTests/inspector-protocol/debugger/breakpoint-action-with-exception-expected.txt
LayoutTests/inspector-protocol/debugger/breakpoint-action-with-exception.html
LayoutTests/inspector-protocol/debugger/breakpoint-condition-detach-expected.txt
LayoutTests/inspector-protocol/debugger/breakpoint-condition-detach.html
LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-exception-expected.txt
LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-exception.html
LayoutTests/inspector-protocol/debugger/breakpoint-eval-with-exception-expected.txt
LayoutTests/inspector-protocol/debugger/breakpoint-eval-with-exception.html
LayoutTests/inspector-protocol/debugger/breakpoint-inside-conditons-and-actions-expected.txt
LayoutTests/inspector-protocol/debugger/breakpoint-inside-conditons-and-actions.html
LayoutTests/inspector-protocol/debugger/call-frame-function-name-expected.txt
LayoutTests/inspector-protocol/debugger/call-frame-function-name.html
LayoutTests/inspector-protocol/debugger/call-frame-this-host-expected.txt
LayoutTests/inspector-protocol/debugger/call-frame-this-host.html
LayoutTests/inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt
LayoutTests/inspector-protocol/debugger/call-frame-this-nonstrict.html
LayoutTests/inspector-protocol/debugger/call-frame-this-strict-expected.txt
LayoutTests/inspector-protocol/debugger/call-frame-this-strict.html
LayoutTests/inspector-protocol/debugger/didSampleProbe-multiple-probes-expected.txt
LayoutTests/inspector-protocol/debugger/didSampleProbe-multiple-probes.html
LayoutTests/inspector-protocol/debugger/nested-inspectors-expected.txt
LayoutTests/inspector-protocol/debugger/nested-inspectors.html
LayoutTests/inspector-protocol/debugger/removeBreakpoint-expected.txt
LayoutTests/inspector-protocol/debugger/removeBreakpoint.html
LayoutTests/inspector-protocol/debugger/setBreakpoint-actions-expected.txt
LayoutTests/inspector-protocol/debugger/setBreakpoint-actions.html
LayoutTests/inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt
LayoutTests/inspector-protocol/debugger/setBreakpoint-autoContinue.html
LayoutTests/inspector-protocol/debugger/setBreakpoint-column-expected.txt
LayoutTests/inspector-protocol/debugger/setBreakpoint-column.html
LayoutTests/inspector-protocol/debugger/setBreakpoint-condition-expected.txt
LayoutTests/inspector-protocol/debugger/setBreakpoint-condition.html
LayoutTests/inspector-protocol/debugger/setBreakpoint-expected.txt
LayoutTests/inspector-protocol/debugger/setBreakpoint-options-exception-expected.txt
LayoutTests/inspector-protocol/debugger/setBreakpoint-options-exception.html
LayoutTests/inspector-protocol/debugger/setBreakpoint.html
LayoutTests/inspector-protocol/debugger/setBreakpointByUrl-sourceURL-expected.txt
LayoutTests/inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html
LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt
LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-all.html
LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt
LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-none.html
LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt
LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-uncaught.html
LayoutTests/inspector-protocol/dom-debugger/node-removed-expected.txt
LayoutTests/inspector-protocol/dom-debugger/node-removed.html
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/InspectorAgentBase.h
Source/JavaScriptCore/inspector/InspectorAgentRegistry.cpp
Source/JavaScriptCore/inspector/InspectorAgentRegistry.h
Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp
Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.h
Source/JavaScriptCore/inspector/agents/InspectorAgent.cpp
Source/JavaScriptCore/inspector/agents/InspectorAgent.h
Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.cpp
Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.h
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/js/PageScriptDebugServer.cpp
Source/WebCore/bindings/js/PageScriptDebugServer.h
Source/WebCore/bindings/js/ScriptDebugServer.cpp
Source/WebCore/bindings/js/ScriptDebugServer.h
Source/WebCore/bindings/js/WorkerScriptDebugServer.cpp
Source/WebCore/bindings/js/WorkerScriptDebugServer.h
Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp
Source/WebCore/inspector/InspectorApplicationCacheAgent.h
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorCSSAgent.h
Source/WebCore/inspector/InspectorCanvasAgent.cpp
Source/WebCore/inspector/InspectorCanvasAgent.h
Source/WebCore/inspector/InspectorConsoleAgent.cpp
Source/WebCore/inspector/InspectorConsoleAgent.h
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/InspectorController.h
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/inspector/InspectorDOMAgent.h
Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp
Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
Source/WebCore/inspector/InspectorDOMStorageAgent.cpp
Source/WebCore/inspector/InspectorDOMStorageAgent.h
Source/WebCore/inspector/InspectorDatabaseAgent.cpp
Source/WebCore/inspector/InspectorDatabaseAgent.h
Source/WebCore/inspector/InspectorDebuggerAgent.cpp
Source/WebCore/inspector/InspectorDebuggerAgent.h
Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp
Source/WebCore/inspector/InspectorHeapProfilerAgent.h
Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
Source/WebCore/inspector/InspectorIndexedDBAgent.h
Source/WebCore/inspector/InspectorInputAgent.cpp
Source/WebCore/inspector/InspectorInputAgent.h
Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
Source/WebCore/inspector/InspectorLayerTreeAgent.h
Source/WebCore/inspector/InspectorMemoryAgent.cpp
Source/WebCore/inspector/InspectorMemoryAgent.h
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorPageAgent.h
Source/WebCore/inspector/InspectorProfilerAgent.cpp
Source/WebCore/inspector/InspectorProfilerAgent.h
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.h
Source/WebCore/inspector/InspectorTimelineAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.h
Source/WebCore/inspector/InspectorWorkerAgent.cpp
Source/WebCore/inspector/InspectorWorkerAgent.h
Source/WebCore/inspector/PageDebuggerAgent.cpp
Source/WebCore/inspector/PageDebuggerAgent.h
Source/WebCore/inspector/PageRuntimeAgent.cpp
Source/WebCore/inspector/PageRuntimeAgent.h
Source/WebCore/inspector/WorkerDebuggerAgent.cpp
Source/WebCore/inspector/WorkerDebuggerAgent.h
Source/WebCore/inspector/WorkerInspectorController.cpp
Source/WebCore/inspector/WorkerInspectorController.h
Source/WebCore/inspector/WorkerRuntimeAgent.cpp
Source/WebCore/inspector/WorkerRuntimeAgent.h
Source/WebCore/page/PageDebuggable.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/workers/WorkerMessagingProxy.cpp
Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp
Source/WebKit2/WebProcess/WebPage/WebInspector.cpp

index 768f741..387950c 100644 (file)
@@ -1,3 +1,66 @@
+2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
+        https://bugs.webkit.org/show_bug.cgi?id=127409
+
+        Reviewed by Geoffrey Garen.
+
+        Remove "Breakpoints Enabled" output in tests. Breakpoints are already
+        enabled by default in tests. Also since the DebuggerAgent.enable() call
+        now immediately recompiles scripts, sourceParsed events are now sent to
+        the frontend earlier even before the setBreakpointsActive message has
+        been processed, so the "Breakpoints Enabled" output was showing up
+        later, seemingly randomly in tests, and is no longer helpful.
+
+        * inspector-protocol/debugger/breakpoint-action-detach-expected.txt:
+        * inspector-protocol/debugger/breakpoint-action-detach.html:
+        * inspector-protocol/debugger/breakpoint-action-with-exception-expected.txt:
+        * inspector-protocol/debugger/breakpoint-action-with-exception.html:
+        * inspector-protocol/debugger/breakpoint-condition-detach-expected.txt:
+        * inspector-protocol/debugger/breakpoint-condition-detach.html:
+        * inspector-protocol/debugger/breakpoint-condition-with-exception-expected.txt:
+        * inspector-protocol/debugger/breakpoint-condition-with-exception.html:
+        * inspector-protocol/debugger/breakpoint-eval-with-exception-expected.txt:
+        * inspector-protocol/debugger/breakpoint-eval-with-exception.html:
+        * inspector-protocol/debugger/breakpoint-inside-conditons-and-actions-expected.txt:
+        * inspector-protocol/debugger/breakpoint-inside-conditons-and-actions.html:
+        * inspector-protocol/debugger/call-frame-function-name-expected.txt:
+        * inspector-protocol/debugger/call-frame-function-name.html:
+        * inspector-protocol/debugger/call-frame-this-host-expected.txt:
+        * inspector-protocol/debugger/call-frame-this-host.html:
+        * inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt:
+        * inspector-protocol/debugger/call-frame-this-nonstrict.html:
+        * inspector-protocol/debugger/call-frame-this-strict-expected.txt:
+        * inspector-protocol/debugger/call-frame-this-strict.html:
+        * inspector-protocol/debugger/didSampleProbe-multiple-probes-expected.txt:
+        * inspector-protocol/debugger/didSampleProbe-multiple-probes.html:
+        * inspector-protocol/debugger/nested-inspectors-expected.txt:
+        * inspector-protocol/debugger/nested-inspectors.html:
+        * inspector-protocol/debugger/removeBreakpoint-expected.txt:
+        * inspector-protocol/debugger/removeBreakpoint.html:
+        * inspector-protocol/debugger/setBreakpoint-actions-expected.txt:
+        * inspector-protocol/debugger/setBreakpoint-actions.html:
+        * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt:
+        * inspector-protocol/debugger/setBreakpoint-autoContinue.html:
+        * inspector-protocol/debugger/setBreakpoint-column-expected.txt:
+        * inspector-protocol/debugger/setBreakpoint-column.html:
+        * inspector-protocol/debugger/setBreakpoint-condition-expected.txt:
+        * inspector-protocol/debugger/setBreakpoint-condition.html:
+        * inspector-protocol/debugger/setBreakpoint-expected.txt:
+        * inspector-protocol/debugger/setBreakpoint-options-exception-expected.txt:
+        * inspector-protocol/debugger/setBreakpoint-options-exception.html:
+        * inspector-protocol/debugger/setBreakpoint.html:
+        * inspector-protocol/debugger/setBreakpointByUrl-sourceURL-expected.txt:
+        * inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html:
+        * inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt:
+        * inspector-protocol/debugger/setPauseOnExceptions-all.html:
+        * inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt:
+        * inspector-protocol/debugger/setPauseOnExceptions-none.html:
+        * inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt:
+        * inspector-protocol/debugger/setPauseOnExceptions-uncaught.html:
+        * inspector-protocol/dom-debugger/node-removed-expected.txt:
+        * inspector-protocol/dom-debugger/node-removed.html:
+
 2014-01-23  Hans Muller  <hmuller@adobe.com>
 
         [CSS Shapes] Image valued shape size and position should conform to the spec
index 646e390..a731b27 100644 (file)
@@ -1,6 +1,5 @@
 Closing the inspector while executing the code for a breakpoint action should continue executing code.
 
-Breakpoints Enabled
 Found breakpoint.js
 inside breakpointWithCondition a:(1) b:(2) a+b:(3)
 Closing the inspector.
index 9510211..bac8f87 100644 (file)
@@ -50,9 +50,6 @@ function test()
     }
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 }
 </script>
 </head>
index 57d2963..bd410f9 100644 (file)
@@ -1,7 +1,6 @@
 CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating 'this.will.cause')
 The debugger should not pause on exceptions thrown while executing the breakpoint actions.
 
-Breakpoints Enabled
 Found breakpoint.js
 inside breakpointWithCondition a:(1) b:(2) a+b:(3)
 PASS: Breakpoint action executed, but the exception did not cause the debugger to pause.
index de6c84c..3b9473c 100644 (file)
@@ -47,10 +47,6 @@ function test()
     }
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function(messageObject) {
-        InspectorTest.checkForError(messageObject);
-        InspectorTest.log("Breakpoints Enabled");
-    });
 }
 </script>
 </head>
index bae8772..7886d70 100644 (file)
@@ -1,6 +1,5 @@
 Debugger.setBreakpoint with an action that throws an exception should not pause the debugger.
 
-Breakpoints Enabled
 Found breakpoint.js
 inside breakpointWithCondition a:(1) b:(2) a+b:(3)
 Closing the inspector.
index 3520b49..617ed62 100644 (file)
@@ -50,10 +50,6 @@ function test()
     }
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function(messageObject) {
-        InspectorTest.checkForError(messageObject);
-        InspectorTest.log("Breakpoints Enabled");
-    });
 }
 </script>
 </head>
index 955aa05..5b1e25a 100644 (file)
@@ -1,7 +1,6 @@
 CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating 'this.will.cause')
 The debugger should not pause on exceptions thrown while executing the breakpoint conditions.
 
-Breakpoints Enabled
 Found breakpoint.js
 inside breakpointWithCondition a:(1) b:(2) a+b:(3)
 PASS: The debugger should not pause on the exception inside the condition.
index 878d654..c1fc216 100644 (file)
@@ -46,10 +46,6 @@ function test()
     }
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function(messageObject) {
-        InspectorTest.checkForError(messageObject);
-        InspectorTest.log("Breakpoints Enabled");
-    });
 }
 </script>
 </head>
index 01b84d8..e7012a2 100644 (file)
@@ -1,6 +1,5 @@
 While being paused on a breakpoint the debugger should ignore the exceptions from console commands.
 
-Breakpoints Enabled
 Found breakpoint.js
 inside breakpointBasic
 PASS: Paused in debugger: reason = "other"
index e2bce52..96a3029 100644 (file)
@@ -56,10 +56,6 @@ function test()
     }
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function(messageObject) {
-        InspectorTest.checkForError(messageObject);
-        InspectorTest.log("Breakpoints Enabled");
-    });
 }
 </script>
 </head>
index cb5af5e..a334849 100644 (file)
@@ -1,6 +1,5 @@
 The debugger should not pause on exceptions thrown while executing the breakpoint actions.
 
-Breakpoints Enabled
 Found breakpoint.js
 inside breakpointWithCondition a:(1) b:(2) a+b:(3)
 Executing condition
index 6c1cc59..a2e58aa 100644 (file)
@@ -60,10 +60,6 @@ function test()
     }
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function(messageObject) {
-        InspectorTest.checkForError(messageObject);
-        InspectorTest.log("Breakpoints Enabled");
-    });
 }
 </script>
 </head>
index 6d91f90..f6569da 100644 (file)
@@ -12,9 +12,6 @@ function test()
     // call frame functionNames are what we expect.
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
     {
index 88b92fb..f06e136 100644 (file)
@@ -12,9 +12,6 @@ function test()
     // call frame this values are what we expect.
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
     {
index c1db003..914d004 100644 (file)
@@ -1,6 +1,5 @@
 Debugger.setBreakpoint on line:column in <script>
 
-Breakpoints Enabled
 Found <script>
 Running testFunction
 PASS: step 0: type "object" className "Number"
index ac56444..5078909 100644 (file)
@@ -12,9 +12,6 @@ function test()
     // call frame this values are what we expect.
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
     {
index a9683f4..7c7b2a8 100644 (file)
@@ -1,6 +1,5 @@
 Debugger.setBreakpoint on line:column in <script>
 
-Breakpoints Enabled
 Found <script>
 Running testFunction
 PASS: step 0: type "number" value "2"
index 28b8c0f..a5ef8c1 100644 (file)
@@ -12,9 +12,6 @@ function test()
     // call frame this values are what we expect.
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
     {
index 3713705..d8b5ba6 100644 (file)
@@ -1,6 +1,5 @@
 Debugger.setBreakpoint with multiple probe actions at the same breakpoint. Test Debugger.didSampleProbe events for the probe samples.
 
-Breakpoints Enabled
 Found breakpoint.js
 PASS: Should receive two breakpoint action identifiers on Debugger.setBreakpoint callback.
 Running breakpointActions to trigger probe samples.
index cf0e3f5..16806ac 100644 (file)
@@ -8,9 +8,6 @@ function test()
     InspectorTest.importScript("../../../../inspector-protocol/resources/probe-helper.js");
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     var samples = [];
     const expectedSampleCount = 2;
index f790359..62c2df6 100644 (file)
@@ -1,7 +1,6 @@
 CONSOLE MESSAGE: line 1: Error: PASS: Expected exception
 Checking that the inspector code can be debugged using a second inspector window.
 
-Breakpoints Enabled
 Debugger.setPauseOnExceptions - all
 PASS: Paused!
 PASS: Resumed!
index b6bb73d..f45c023 100644 (file)
@@ -9,15 +9,12 @@ function test()
         // This function runs in the second inspector window. We can use this one to debug the first inspector.
 
         InspectorTest.sendCommand("Debugger.enable", {});
-        InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-            InspectorTest.log("Breakpoints Enabled");
-            InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, function(responseObject) {
-                InspectorTest.checkForError(responseObject);
-                InspectorTest.log("Debugger.setPauseOnExceptions - all");
+        InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, function(responseObject) {
+            InspectorTest.checkForError(responseObject);
+            InspectorTest.log("Debugger.setPauseOnExceptions - all");
 
-                // Trigger an exception in the main inspector.
-                InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throw new Error('PASS: Expected exception') }, 0);"});
-            });
+            // Trigger an exception in the main inspector.
+            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throw new Error('PASS: Expected exception') }, 0);"});
         });
 
         InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
index e4200a9..255610f 100644 (file)
@@ -6,9 +6,6 @@
 function test()
 {
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     var breakpointTriggered = 0;
 
index 821c62d..82421a4 100644 (file)
@@ -6,7 +6,6 @@ CONSOLE MESSAGE: line 1: eval-action
 CONSOLE MESSAGE: log-action-after
 Debugger.setBreakpoint options.actions
 
-Breakpoints Enabled
 Found breakpoint.js
 Running breakpointActions a few times that should not trigger
 inside breakpointActions a:(1) b:(undefined)
index 11b69aa..b46af3f 100644 (file)
@@ -10,9 +10,6 @@ function test()
 
     InspectorTest.sendCommand("Console.enable", {});
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     var isExpectingLogs = false;
     var isExpectingSamples = false;
index 8c6220f..6c6a4d5 100644 (file)
@@ -1,6 +1,5 @@
 Debugger.setBreakpoint options.autoContinue
 
-Breakpoints Enabled
 Found breakpoint.js
 Running breakpointAutomaticallyContinue multiple times with automatically continue
 inside breakpointAutomaticallyContinue
index 64b8345..d44ac3f 100644 (file)
@@ -6,9 +6,6 @@
 function test()
 {
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     var allowedToHitBreakpoint = false;
     var breakpointIdentifier = null;
index 73ea94b..87facd4 100644 (file)
@@ -12,9 +12,6 @@ function test()
     // by running some expressions at that call frame.
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
     {
index 9d777d0..a52e6b9 100644 (file)
@@ -1,6 +1,5 @@
 Debugger.setBreakpoint options.condition
 
-Breakpoints Enabled
 Found breakpoint.js
 Running breakpointWithCondition multiple times
 inside breakpointWithCondition a:(1) b:(2) a+b:(3)
index 1903587..e764e42 100644 (file)
@@ -6,9 +6,6 @@
 function test()
 {
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     var inBreakpoint = false;
     var breakpointTriggered = 0;
index 9ea4997..943dbc5 100644 (file)
@@ -1,6 +1,5 @@
 Debugger.setBreakpoint on line:0 in <script src="...">
 
-Breakpoints Enabled
 Found breakpoint.js
 PASS: Received error setting duplicate breakpoint: Breakpoint at specified location already exists.
 Running breakpointBasic
index 6debc7b..a997f46 100644 (file)
@@ -2,7 +2,6 @@ CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating 'this
 CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating 'this.will.cause')
 Debugger.setBreakpoint options.condition or options.action with exception
 
-Breakpoints Enabled
 Found breakpoint.js
 Running breakpointWithCondition to trigger condition exception.
 inside breakpointWithCondition a:(1) b:(2) a+b:(3)
index 5c93c41..b15bda4 100644 (file)
@@ -9,9 +9,6 @@ function test()
 
     InspectorTest.sendCommand("Console.enable", {});
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     var logsSeen = 0;
     const expectedLogs = 2;
index 90f035a..7e768bc 100644 (file)
@@ -6,9 +6,6 @@
 function test()
 {
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
     {
index 101c2d8..1a716bf 100644 (file)
@@ -9,9 +9,6 @@ eval("function sourceURLFunction() {\n    var a = 1;\n    var b = 2;\n    var c
 function test()
 {
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 
     InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
     {
index a99a0d7..69f7abd 100644 (file)
@@ -13,7 +13,6 @@ CONSOLE MESSAGE: line 18: [object Object]
 CONSOLE MESSAGE: line 18: Error: error message
 Debugger.setPauseOnExceptions all
 
-Breakpoints Enabled
 Debugger.setPauseOnExceptions - all
 PASS - did not pause on non-exception statements
 Paused!
index 3171dfb..bef337f 100644 (file)
@@ -102,15 +102,12 @@ function test()
 
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-        InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, function(responseObject) {
-            InspectorTest.checkForError(responseObject);
-            InspectorTest.log("Debugger.setPauseOnExceptions - all");
-            evaluateExpectedNoPauses(function() {
-                expectPause = true;
-                triggerNext();
-            });
+    InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, function(responseObject) {
+        InspectorTest.checkForError(responseObject);
+        InspectorTest.log("Debugger.setPauseOnExceptions - all");
+        evaluateExpectedNoPauses(function() {
+            expectPause = true;
+            triggerNext();
         });
     });
 
index 5718dcd..cdd443d 100644 (file)
@@ -12,7 +12,6 @@ CONSOLE MESSAGE: line 18: [object Object]
 CONSOLE MESSAGE: line 18: Error: error message
 Debugger.setPauseOnExceptions none
 
-Breakpoints Enabled
 Debugger.setPauseOnExceptions - none
 PASS: No pauses
 
index ba870f3..6c60707 100644 (file)
@@ -6,32 +6,29 @@
 function test()
 {
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-        InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "none"}, function(responseObject) {
-            InspectorTest.checkForError(responseObject);
-            InspectorTest.log("Debugger.setPauseOnExceptions - none");
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { 1+1; }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { noException(); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(noException, 7); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { try{ ({}).a.b.c.d } catch (e) { console.log('caught inline: ' + JSON.stringify(e)); } }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionBasic, 1); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionDOM, 2); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionInHostFunction, 3); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(throwString, 10); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(throwParam, 5, new Error('error message')); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { {}.a.b.c.d; }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionBasic(); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionDOM(); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionInHostFunction(); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwString(); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwParam({x:1}); }, 0);"});
-            InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwParam(new Error('error message')); }, 0);"}, function() {
-                setTimeout(function() {
-                    InspectorTest.log("PASS: No pauses");
-                    InspectorTest.completeTest();
-                }, 10);
-            });
+    InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "none"}, function(responseObject) {
+        InspectorTest.checkForError(responseObject);
+        InspectorTest.log("Debugger.setPauseOnExceptions - none");
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { 1+1; }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { noException(); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(noException, 7); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { try{ ({}).a.b.c.d } catch (e) { console.log('caught inline: ' + JSON.stringify(e)); } }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionBasic, 1); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionDOM, 2); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionInHostFunction, 3); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(throwString, 10); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(throwParam, 5, new Error('error message')); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { {}.a.b.c.d; }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionBasic(); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionDOM(); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionInHostFunction(); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwString(); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwParam({x:1}); }, 0);"});
+        InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwParam(new Error('error message')); }, 0);"}, function() {
+            setTimeout(function() {
+                InspectorTest.log("PASS: No pauses");
+                InspectorTest.completeTest();
+            }, 10);
         });
     });
 
index 6a16b67..889bf27 100644 (file)
@@ -19,7 +19,6 @@ CONSOLE MESSAGE: line 38: catchNested caught exception: "exception string"
 CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":18,"column":12,"sourceURL":"exception.js"}
 Debugger.setPauseOnExceptions uncaught
 
-Breakpoints Enabled
 Debugger.setPauseOnExceptions - uncaught
 PASS - did not pause on non-exception statements or caught exception statements
 Paused!
index bbb7c33..25e4062 100644 (file)
@@ -79,15 +79,12 @@ function test()
 
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-        InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "uncaught"}, function(responseObject) {
-            InspectorTest.checkForError(responseObject);
-            InspectorTest.log("Debugger.setPauseOnExceptions - uncaught");
-            evaluateExpectedNoPauses(function() {
-                expectPause = true;
-                triggerNextUncaughtException();
-            });
+    InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "uncaught"}, function(responseObject) {
+        InspectorTest.checkForError(responseObject);
+        InspectorTest.log("Debugger.setPauseOnExceptions - uncaught");
+        evaluateExpectedNoPauses(function() {
+            expectPause = true;
+            triggerNextUncaughtException();
         });
     });
 
index ecec50b..709ab62 100644 (file)
@@ -1,6 +1,5 @@
 Testing that DOM.childNodeRemoved is correctly triggered even when the element is moved while paused in the debugger on a DOMDebugger "node-removed" breakpoint.
 
-Breakpoints Enabled
 Found <script>
 Stopped on DOM breakpoint
 PASS: onChildNodeRemoved called for #target_element
index 2504e45..b6616e0 100644 (file)
@@ -118,13 +118,10 @@ function test()
         InspectorTest.sendCommand("DOMDebugger.setDOMBreakpoint", {nodeId: targetElementId, type: "node-removed"});
         InspectorTest.sendCommand("DOM.requestChildNodes", {nodeId: finalContainerId});
 
-        InspectorTest.sendCommand("Runtime.evaluate", {"expression": "removeNode()"});        
+        InspectorTest.sendCommand("Runtime.evaluate", {"expression": "removeNode()"});
     }
 
     InspectorTest.sendCommand("Debugger.enable", {});
-    InspectorTest.sendCommand("Debugger.setBreakpointsActive", {active: true}, function() {
-        InspectorTest.log("Breakpoints Enabled");
-    });
 }
 </script>
 </head>
index 1c583c4..79d978f 100644 (file)
@@ -1,3 +1,34 @@
+2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
+        https://bugs.webkit.org/show_bug.cgi?id=127409
+
+        Reviewed by Geoffrey Garen.
+
+        * inspector/InspectorAgentBase.h:
+        When disconnecting agents, provide a InspectorDisconnectReason for
+        the disconnection. It could be that an inspector frontend is just
+        disconnecting or that the inspected object is going away entirely
+        and we can avoid doing some work.
+
+        * runtime/JSGlobalObjectDebuggable.h:
+        * runtime/JSGlobalObjectDebuggable.cpp:
+        (JSC::JSGlobalObjectDebuggable::~JSGlobalObjectDebuggable):
+        (JSC::JSGlobalObjectDebuggable::disconnect):
+        (JSC::JSGlobalObjectDebuggable::disconnectInternal):
+        Pass different reasons for the different disconnects.
+
+        * inspector/InspectorAgentRegistry.cpp:
+        (Inspector::InspectorAgentRegistry::willDestroyFrontendAndBackend):
+        * inspector/InspectorAgentRegistry.h:
+        * inspector/JSGlobalObjectInspectorController.cpp:
+        (Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
+        * inspector/JSGlobalObjectInspectorController.h:
+        * inspector/agents/InspectorAgent.cpp:
+        (Inspector::InspectorAgent::willDestroyFrontendAndBackend):
+        * inspector/agents/InspectorAgent.h:
+        Pass InspectorDisconnectReason around where needed.
+
 2014-01-23  Mark Lam  <mark.lam@apple.com>
 
         Enable DFG for the Debugger and Profiler.
index 20ad71f..f6b6c55 100644 (file)
@@ -34,12 +34,17 @@ namespace Inspector {
 class InspectorBackendDispatcher;
 class InspectorFrontendChannel;
 
+enum class InspectorDisconnectReason {
+    InspectedTargetDestroyed,
+    InspectorDestroyed
+};
+
 class InspectorAgentBase {
 public:
     virtual ~InspectorAgentBase() { }
 
     virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) = 0;
-    virtual void willDestroyFrontendAndBackend() = 0;
+    virtual void willDestroyFrontendAndBackend(InspectorDisconnectReason reason) = 0;
     virtual void discardAgent() { }
 
 protected:
index 203c8f6..e0d9ede 100644 (file)
@@ -48,10 +48,10 @@ void InspectorAgentRegistry::didCreateFrontendAndBackend(InspectorFrontendChanne
         m_agents[i]->didCreateFrontendAndBackend(frontendChannel, backendDispatcher);
 }
 
-void InspectorAgentRegistry::willDestroyFrontendAndBackend()
+void InspectorAgentRegistry::willDestroyFrontendAndBackend(InspectorDisconnectReason reason)
 {
     for (size_t i = 0; i < m_agents.size(); i++)
-        m_agents[i]->willDestroyFrontendAndBackend();
+        m_agents[i]->willDestroyFrontendAndBackend(reason);
 }
 
 void InspectorAgentRegistry::discardAgents()
index 2e89039..17d65e7 100644 (file)
@@ -34,6 +34,7 @@ namespace Inspector {
 class InspectorAgentBase;
 class InspectorBackendDispatcher;
 class InspectorFrontendChannel;
+enum class InspectorDisconnectReason;
 
 class JS_EXPORT_PRIVATE InspectorAgentRegistry {
 public:
@@ -42,7 +43,7 @@ public:
     void append(std::unique_ptr<InspectorAgentBase>);
 
     void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*);
-    void willDestroyFrontendAndBackend();
+    void willDestroyFrontendAndBackend(InspectorDisconnectReason reason);
     void discardAgents();
 
 private:
index 7462aad..d7b46d3 100644 (file)
@@ -68,12 +68,12 @@ void JSGlobalObjectInspectorController::connectFrontend(InspectorFrontendChannel
     m_agents.didCreateFrontendAndBackend(frontendChannel, m_inspectorBackendDispatcher.get());
 }
 
-void JSGlobalObjectInspectorController::disconnectFrontend()
+void JSGlobalObjectInspectorController::disconnectFrontend(InspectorDisconnectReason reason)
 {
     if (!m_inspectorFrontendChannel)
         return;
 
-    m_agents.willDestroyFrontendAndBackend();
+    m_agents.willDestroyFrontendAndBackend(reason);
 
     m_inspectorBackendDispatcher->clearFrontend();
     m_inspectorBackendDispatcher.clear();
index ff41b59..c4fbe47 100644 (file)
@@ -53,7 +53,7 @@ public:
     ~JSGlobalObjectInspectorController();
 
     void connectFrontend(InspectorFrontendChannel*);
-    void disconnectFrontend();
+    void disconnectFrontend(InspectorDisconnectReason reason);
     void dispatchMessageFromFrontend(const String&);
 
     virtual bool developerExtrasEnabled() const override { return true; }
index 69ba5eb..fcee46e 100644 (file)
@@ -56,7 +56,7 @@ void InspectorAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* front
     m_backendDispatcher = InspectorInspectorBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorAgent::willDestroyFrontendAndBackend()
+void InspectorAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index 943ef16..c7dc9ba 100644 (file)
@@ -51,7 +51,7 @@ public:
     virtual ~InspectorAgent();
 
     virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(InspectorDisconnectReason reason) override;
 
     virtual void enable(ErrorString*) override;
     virtual void disable(ErrorString*) override;
index c933aa6..2b89507 100644 (file)
@@ -29,6 +29,7 @@
 #if ENABLE(REMOTE_INSPECTOR)
 
 #include "APIShims.h"
+#include "InspectorAgentBase.h"
 #include "InspectorFrontendChannel.h"
 #include "JSGlobalObject.h"
 #include "RemoteInspector.h"
@@ -45,7 +46,7 @@ JSGlobalObjectDebuggable::JSGlobalObjectDebuggable(JSGlobalObject& globalObject)
 JSGlobalObjectDebuggable::~JSGlobalObjectDebuggable()
 {
     if (m_inspectorController)
-        disconnect();
+        disconnectInternal(InspectorDisconnectReason::InspectedTargetDestroyed);
 }
 
 String JSGlobalObjectDebuggable::name() const
@@ -65,9 +66,14 @@ void JSGlobalObjectDebuggable::connect(InspectorFrontendChannel* frontendChannel
 
 void JSGlobalObjectDebuggable::disconnect()
 {
+    disconnectInternal(InspectorDisconnectReason::InspectorDestroyed);
+}
+
+void JSGlobalObjectDebuggable::disconnectInternal(InspectorDisconnectReason reason)
+{
     APIEntryShim entryShim(&m_globalObject.vm());
 
-    m_inspectorController->disconnectFrontend();
+    m_inspectorController->disconnectFrontend(reason);
     m_inspectorController = nullptr;
 }
 
index aaff199..cf3ef1e 100644 (file)
 #include "RemoteInspectorDebuggable.h"
 #include <wtf/Noncopyable.h>
 
+namespace Inspector {
+enum class InspectorDisconnectReason;
+}
+
 namespace JSC {
 
 class JSGlobalObject;
@@ -52,6 +56,8 @@ public:
     virtual void dispatchMessageFromRemoteFrontend(const String& message) override;
 
 private:
+    void disconnectInternal(Inspector::InspectorDisconnectReason reason);
+
     JSGlobalObject& m_globalObject;
     std::unique_ptr<Inspector::JSGlobalObjectInspectorController> m_inspectorController;
 };
index 5758728..4cd6d11 100644 (file)
@@ -1,3 +1,141 @@
+2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
+        https://bugs.webkit.org/show_bug.cgi?id=127409
+
+        Reviewed by Geoffrey Garen.
+
+        Covered by existing tests.
+
+        * bindings/js/ScriptDebugServer.h:
+        * bindings/js/ScriptDebugServer.cpp:
+        (WebCore::ScriptDebugServer::ScriptDebugServer):
+        Remove m_recompileTimer and the recompile soon function.
+        We can just recompile immediately in all existing cases.
+
+        * bindings/js/PageScriptDebugServer.h:
+        * bindings/js/PageScriptDebugServer.cpp:
+        (WebCore::PageScriptDebugServer::addListener):
+        (WebCore::PageScriptDebugServer::removeListener):
+        (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
+        (WebCore::PageScriptDebugServer::didAddFirstListener):
+        (WebCore::PageScriptDebugServer::didRemoveLastListener):
+        Add a "didAddFirstListener" to match "didRemoveLastListener".
+        Only recompile functions when we attach the debugger and when
+        we detach the last listener.
+
+        * bindings/js/WorkerScriptDebugServer.cpp:
+        (WebCore::WorkerScriptDebugServer::addListener):
+        (WebCore::WorkerScriptDebugServer::removeListener):
+        (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
+        Same thing. Also rearrange the functions to read better.
+
+        * inspector/InspectorProfilerAgent.cpp:
+        Use the direct recompile function instead of the removed "soon" version.
+
+        * WebCore.exp.in:
+        Update disconnectFrontend symbol.
+
+        * page/PageDebuggable.cpp:
+        (WebCore::PageDebuggable::disconnect):
+        * testing/Internals.cpp:
+        (WebCore::Internals::closeDummyInspectorFrontend):
+        * workers/WorkerMessagingProxy.cpp:
+        (WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
+        Include an InspectorDisconnectReason when calling disconnectFrontend.
+
+        * inspector/InspectorDatabaseAgent.h:
+        * inspector/InspectorDebuggerAgent.cpp:
+        (WebCore::InspectorDebuggerAgent::disable):
+        (WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
+        If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.
+
+        * inspector/InspectorProfilerAgent.h:
+        * inspector/InspectorProfilerAgent.cpp:
+        (WebCore::InspectorProfilerAgent::enable):
+        (WebCore::InspectorProfilerAgent::disable):
+        (WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend):
+        If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.
+
+        * inspector/InspectorController.h:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::inspectedPageDestroyed):
+        (WebCore::InspectorController::disconnectFrontend):
+        (WebCore::InspectorController::close):
+        Pass different reasons for the different disconnect reasons.
+
+        * inspector/WorkerInspectorController.h:
+        * inspector/WorkerInspectorController.cpp:
+        (WebCore::WorkerInspectorController::~WorkerInspectorController):
+        (WebCore::WorkerInspectorController::disconnectFrontend):
+        Pass different reasons for the different disconnect reasons.
+
+        * inspector/InspectorApplicationCacheAgent.cpp:
+        (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorApplicationCacheAgent.h:
+        * inspector/InspectorCSSAgent.cpp:
+        (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorCSSAgent.h:
+        * inspector/InspectorCanvasAgent.cpp:
+        (WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorCanvasAgent.h:
+        * inspector/InspectorConsoleAgent.cpp:
+        (WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorConsoleAgent.h:
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorDOMAgent.h:
+        * inspector/InspectorDOMDebuggerAgent.cpp:
+        (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorDOMDebuggerAgent.h:
+        * inspector/InspectorDOMStorageAgent.cpp:
+        (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorDOMStorageAgent.h:
+        * inspector/InspectorDatabaseAgent.cpp:
+        (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorDebuggerAgent.h:
+        * inspector/InspectorHeapProfilerAgent.cpp:
+        (WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorHeapProfilerAgent.h:
+        * inspector/InspectorIndexedDBAgent.cpp:
+        (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorIndexedDBAgent.h:
+        * inspector/InspectorInputAgent.cpp:
+        (WebCore::InspectorInputAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorInputAgent.h:
+        * inspector/InspectorLayerTreeAgent.cpp:
+        (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorLayerTreeAgent.h:
+        * inspector/InspectorMemoryAgent.cpp:
+        (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorMemoryAgent.h:
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorPageAgent.h:
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorResourceAgent.h:
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorTimelineAgent.h:
+        * inspector/InspectorWorkerAgent.cpp:
+        (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
+        * inspector/InspectorWorkerAgent.h:
+        * inspector/PageDebuggerAgent.cpp:
+        (WebCore::PageDebuggerAgent::disable):
+        (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
+        * inspector/PageDebuggerAgent.h:
+        * inspector/PageRuntimeAgent.cpp:
+        (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
+        * inspector/PageRuntimeAgent.h:
+        * inspector/WorkerDebuggerAgent.cpp:
+        (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer):
+        * inspector/WorkerDebuggerAgent.h:
+        * inspector/WorkerRuntimeAgent.cpp:
+        (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
+        * inspector/WorkerRuntimeAgent.h:
+        Include InspectorDisconnectReason param.
+
 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
 
         Another Windows fix: include <algorithm> for std::min and std::max.
index 34c30c4..cdf4818 100644 (file)
@@ -2765,7 +2765,7 @@ __ZN7WebCore16HTMLInputElement25selectColorInColorChooserERKNS_5ColorE
 __ZN7WebCore15InspectorClient31doDispatchMessageOnFrontendPageEPNS_4PageERKN3WTF6StringE
 __ZN7WebCore17InspectorCounters12counterValueENS0_11CounterTypeE
 __ZN7WebCore19InspectorController15connectFrontendEPN9Inspector24InspectorFrontendChannelE
-__ZN7WebCore19InspectorController18disconnectFrontendEv
+__ZN7WebCore19InspectorController18disconnectFrontendEN9Inspector25InspectorDisconnectReasonE
 __ZN7WebCore19InspectorController18setProfilerEnabledEb
 __ZN7WebCore19InspectorController25evaluateForTestInFrontendElRKN3WTF6StringE
 __ZN7WebCore19InspectorController26setInspectorFrontendClientENSt3__110unique_ptrINS_23InspectorFrontendClientENS1_14default_deleteIS3_EEEE
index 1cec7b3..840678f 100644 (file)
@@ -94,13 +94,15 @@ void PageScriptDebugServer::addListener(ScriptDebugListener* listener, Page* pag
     OwnPtr<ListenerSet>& listeners = m_pageListenersMap.add(page, nullptr).iterator->value;
     if (!listeners)
         listeners = adoptPtr(new ListenerSet);
+
+    bool wasEmpty = listeners->isEmpty();
     listeners->add(listener);
 
-    recompileAllJSFunctionsSoon();
-    page->setDebugger(this);
+    if (wasEmpty)
+        didAddFirstListener(page);
 }
 
-void PageScriptDebugServer::removeListener(ScriptDebugListener* listener, Page* page)
+void PageScriptDebugServer::removeListener(ScriptDebugListener* listener, Page* page, bool skipRecompile)
 {
     ASSERT_ARG(listener, listener);
     ASSERT_ARG(page, page);
@@ -111,20 +113,17 @@ void PageScriptDebugServer::removeListener(ScriptDebugListener* listener, Page*
 
     ListenerSet* listeners = it->value.get();
     listeners->remove(listener);
+
     if (listeners->isEmpty()) {
         m_pageListenersMap.remove(it);
-        didRemoveLastListener(page);
+        didRemoveLastListener(page, skipRecompile);
     }
 }
 
 void PageScriptDebugServer::recompileAllJSFunctions()
 {
     JSLockHolder lock(JSDOMWindow::commonVM());
-    // If JavaScript stack is not empty postpone recompilation.
-    if (JSDOMWindow::commonVM()->entryScope)
-        recompileAllJSFunctionsSoon();
-    else
-        Debugger::recompileAllJSFunctions(JSDOMWindow::commonVM());
+    Debugger::recompileAllJSFunctions(JSDOMWindow::commonVM());
 }
 
 ScriptDebugServer::ListenerSet* PageScriptDebugServer::getListenersForGlobalObject(JSGlobalObject* globalObject)
@@ -161,15 +160,25 @@ void PageScriptDebugServer::didContinue(JSC::JSGlobalObject* globalObject)
         setJavaScriptPaused(page->group(), false);
 }
 
-void PageScriptDebugServer::didRemoveLastListener(Page* page)
+void PageScriptDebugServer::didAddFirstListener(Page* page)
+{
+    // Set debugger before recompiling to get sourceParsed callbacks.
+    page->setDebugger(this);
+    recompileAllJSFunctions();
+}
+
+void PageScriptDebugServer::didRemoveLastListener(Page* page, bool skipRecompile)
 {
     ASSERT(page);
 
     if (m_pausedPage == page)
         m_doneProcessingDebuggerEvents = true;
 
-    recompileAllJSFunctionsSoon();
-    page->setDebugger(0);
+    // Clear debugger before recompiling because we do not need sourceParsed callbacks.
+    page->setDebugger(nullptr);
+
+    if (!skipRecompile)
+        recompileAllJSFunctions();
 }
 
 void PageScriptDebugServer::runEventLoopWhilePaused()
index ed7f24e..567ed91 100644 (file)
@@ -49,7 +49,7 @@ public:
     static PageScriptDebugServer& shared();
 
     void addListener(ScriptDebugListener*, Page*);
-    void removeListener(ScriptDebugListener*, Page*);
+    void removeListener(ScriptDebugListener*, Page*, bool skipRecompile);
 
     virtual void recompileAllJSFunctions() override;
 
@@ -65,7 +65,8 @@ private:
 
     virtual void runEventLoopWhilePaused();
 
-    void didRemoveLastListener(Page*);
+    void didAddFirstListener(Page*);
+    void didRemoveLastListener(Page*, bool skipRecompile);
 
     void setJavaScriptPaused(const PageGroup&, bool paused);
     void setJavaScriptPaused(Page*, bool paused);
index dac52a2..403dfe9 100644 (file)
@@ -40,6 +40,7 @@
 #include "JavaScriptCallFrame.h"
 #include "PageConsole.h"
 #include "Sound.h"
+#include "Timer.h"
 #include <bindings/ScriptValue.h>
 #include <debugger/DebuggerCallFrame.h>
 #include <parser/SourceProvider.h>
@@ -57,7 +58,6 @@ ScriptDebugServer::ScriptDebugServer(bool isInWorkerThread)
     : Debugger(isInWorkerThread)
     , m_doneProcessingDebuggerEvents(true)
     , m_callingListeners(false)
-    , m_recompileTimer(this, &ScriptDebugServer::recompileAllJSFunctionsTimerFired)
 {
 }
 
@@ -313,16 +313,6 @@ void ScriptDebugServer::handlePause(Debugger::ReasonForPause, JSGlobalObject* vm
     dispatchFunctionToListeners(&ScriptDebugServer::dispatchDidContinue, vmEntryGlobalObject);
 }
 
-void ScriptDebugServer::recompileAllJSFunctionsSoon()
-{
-    m_recompileTimer.startOneShot(0);
-}
-
-void ScriptDebugServer::recompileAllJSFunctionsTimerFired(Timer<ScriptDebugServer>&)
-{
-    recompileAllJSFunctions();
-}
-
 const Vector<ScriptBreakpointAction>& ScriptDebugServer::getActionsForBreakpoint(JSC::BreakpointID breakpointID)
 {
     ASSERT(breakpointID != JSC::noBreakpointID);
index fa0ee5d..93540ae 100644 (file)
@@ -34,7 +34,6 @@
 
 #include "ScriptBreakpoint.h"
 #include "ScriptDebugListener.h"
-#include "Timer.h"
 #include <bindings/ScriptObject.h>
 #include <debugger/Debugger.h>
 #include <wtf/HashMap.h>
@@ -59,7 +58,6 @@ public:
     void removeBreakpoint(JSC::BreakpointID);
     void clearBreakpoints();
 
-    void recompileAllJSFunctionsSoon();
     virtual void recompileAllJSFunctions() = 0;
 
     const Vector<ScriptBreakpointAction>& getActionsForBreakpoint(JSC::BreakpointID);
@@ -109,12 +107,9 @@ private:
     virtual void handlePause(JSC::Debugger::ReasonForPause, JSC::JSGlobalObject*) override final;
     virtual void notifyDoneProcessingDebuggerEvents() override final;
 
-    void recompileAllJSFunctionsTimerFired(Timer<ScriptDebugServer>&);
-
     unsigned m_hitCount;
     bool m_callingListeners;
     BreakpointIDToActionsMap m_breakpointIDToActions;
-    Timer<ScriptDebugServer> m_recompileTimer;
 
     friend class DebuggerCallFrameScope;
 };
index bec9e57..6951bfd 100644 (file)
@@ -55,32 +55,35 @@ void WorkerScriptDebugServer::addListener(ScriptDebugListener* listener)
     if (!listener)
         return;
 
-    if (m_listeners.isEmpty())
-        m_workerGlobalScope->script()->attachDebugger(this);
+    bool wasEmpty = m_listeners.isEmpty();
     m_listeners.add(listener);
-    recompileAllJSFunctions();
-}
-
-void WorkerScriptDebugServer::recompileAllJSFunctions()
-{
-    JSC::VM* vm = m_workerGlobalScope->script()->vm();
 
-    JSC::JSLockHolder lock(vm);
-    // If JavaScript stack is not empty postpone recompilation.
-    if (vm->entryScope)
-        recompileAllJSFunctionsSoon();
-    else
-        JSC::Debugger::recompileAllJSFunctions(vm);
+    if (wasEmpty) {
+        m_workerGlobalScope->script()->attachDebugger(this);
+        recompileAllJSFunctions();
+    }
 }
 
-void WorkerScriptDebugServer::removeListener(ScriptDebugListener* listener)
+void WorkerScriptDebugServer::removeListener(ScriptDebugListener* listener, bool skipRecompile)
 {
     if (!listener)
         return;
 
     m_listeners.remove(listener);
-    if (m_listeners.isEmpty())
+
+    if (m_listeners.isEmpty()) {
         m_workerGlobalScope->script()->detachDebugger(this);
+        if (!skipRecompile)
+            recompileAllJSFunctions();
+    }
+}
+
+void WorkerScriptDebugServer::recompileAllJSFunctions()
+{
+    JSC::VM* vm = m_workerGlobalScope->script()->vm();
+
+    JSC::JSLockHolder lock(vm);
+    JSC::Debugger::recompileAllJSFunctions(vm);
 }
 
 void WorkerScriptDebugServer::runEventLoopWhilePaused()
index bf616aa..762d217 100644 (file)
@@ -45,20 +45,17 @@ public:
     WorkerScriptDebugServer(WorkerGlobalScope*, const String&);
     ~WorkerScriptDebugServer() { }
 
+    virtual void recompileAllJSFunctions() override;
+
     void addListener(ScriptDebugListener*);
-    void removeListener(ScriptDebugListener*);
+    void removeListener(ScriptDebugListener*, bool skipRecompile);
 
     void interruptAndRunTask(PassOwnPtr<ScriptDebugServer::Task>);
 
-    void recompileAllJSFunctions() override;
-
 private:
     virtual ListenerSet* getListenersForGlobalObject(JSC::JSGlobalObject*) override { return &m_listeners; }
     virtual void didPause(JSC::JSGlobalObject*) override { }
     virtual void didContinue(JSC::JSGlobalObject*) override { }
-
-    virtual bool isContentScript(JSC::ExecState*) override { return false; }
-
     virtual void runEventLoopWhilePaused() override;
 
     WorkerGlobalScope* m_workerGlobalScope;
index 6c34bb2..2a7a691 100644 (file)
@@ -57,7 +57,7 @@ void InspectorApplicationCacheAgent::didCreateFrontendAndBackend(Inspector::Insp
     m_backendDispatcher = InspectorApplicationCacheBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorApplicationCacheAgent::willDestroyFrontendAndBackend()
+void InspectorApplicationCacheAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index 4b862aa..52d8e0e 100644 (file)
@@ -57,7 +57,7 @@ public:
     ~InspectorApplicationCacheAgent() { }
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     void updateApplicationCacheStatus(Frame*);
     void networkStateChanged();
index c084990..01a52da 100644 (file)
@@ -515,7 +515,7 @@ void InspectorCSSAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontend
     m_backendDispatcher = InspectorCSSBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorCSSAgent::willDestroyFrontendAndBackend()
+void InspectorCSSAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index dcba91a..10b4fe9 100644 (file)
@@ -96,7 +96,7 @@ public:
 
     bool forcePseudoState(Element*, CSSSelector::PseudoType);
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
     virtual void discardAgent() override;
     virtual void enable(ErrorString*) override;
     virtual void disable(ErrorString*) override;
index b306faa..95258ef 100644 (file)
@@ -80,7 +80,7 @@ void InspectorCanvasAgent::didCreateFrontendAndBackend(Inspector::InspectorFront
     m_backendDispatcher = InspectorCanvasBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorCanvasAgent::willDestroyFrontendAndBackend()
+void InspectorCanvasAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index 3bc7b11..a9a38e2 100644 (file)
@@ -66,7 +66,7 @@ public:
     ~InspectorCanvasAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     void frameNavigated(Frame*);
     void frameDetached(Frame*);
index a24325a..701aea7 100644 (file)
@@ -130,7 +130,7 @@ void InspectorConsoleAgent::didCreateFrontendAndBackend(Inspector::InspectorFron
     m_backendDispatcher = InspectorConsoleBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorConsoleAgent::willDestroyFrontendAndBackend()
+void InspectorConsoleAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index 5f98c36..623bcdd 100644 (file)
@@ -66,7 +66,7 @@ public:
     void reset();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
     void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
index a6eb510..ec64c2a 100644 (file)
@@ -197,7 +197,7 @@ InspectorController::~InspectorController()
 
 void InspectorController::inspectedPageDestroyed()
 {
-    disconnectFrontend();
+    disconnectFrontend(InspectorDisconnectReason::InspectedTargetDestroyed);
     m_injectedScriptManager->disconnect();
     m_inspectorClient->inspectorDestroyed();
     m_inspectorClient = nullptr;
@@ -266,12 +266,12 @@ void InspectorController::connectFrontend(InspectorFrontendChannel* frontendChan
 #endif
 }
 
-void InspectorController::disconnectFrontend()
+void InspectorController::disconnectFrontend(InspectorDisconnectReason reason)
 {
     if (!m_inspectorFrontendChannel)
         return;
 
-    m_agents.willDestroyFrontendAndBackend();
+    m_agents.willDestroyFrontendAndBackend(reason);
 
     m_inspectorBackendDispatcher->clearFrontend();
     m_inspectorBackendDispatcher.clear();
@@ -308,7 +308,7 @@ void InspectorController::close()
 {
     if (!m_inspectorFrontendChannel)
         return;
-    disconnectFrontend();
+    disconnectFrontend(InspectorDisconnectReason::InspectorDestroyed);
     m_inspectorClient->closeInspectorFrontend();
 }
 
index 89e9780..405e693 100644 (file)
@@ -99,7 +99,7 @@ public:
     bool hasRemoteFrontend() const;
 
     void connectFrontend(Inspector::InspectorFrontendChannel*);
-    void disconnectFrontend();
+    void disconnectFrontend(Inspector::InspectorDisconnectReason);
     void setProcessId(long);
 
 #if ENABLE(REMOTE_INSPECTOR)
index 72bf855..f24caaa 100644 (file)
@@ -244,7 +244,7 @@ void InspectorDOMAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontend
         focusNode();
 }
 
-void InspectorDOMAgent::willDestroyFrontendAndBackend()
+void InspectorDOMAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index ab29990..1345bcb 100644 (file)
@@ -112,7 +112,7 @@ public:
     static String toErrorString(const ExceptionCode&);
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     Vector<Document*> documents();
     void reset();
index 7f921a3..97b291d 100644 (file)
@@ -112,7 +112,7 @@ void InspectorDOMDebuggerAgent::didCreateFrontendAndBackend(Inspector::Inspector
     m_backendDispatcher = InspectorDOMDebuggerBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend()
+void InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_backendDispatcher.clear();
 
index a58f48d..c32378c 100644 (file)
@@ -82,7 +82,7 @@ public:
     void pauseOnNativeEventIfNeeded(bool isDOMEvent, const String& eventName, bool synchronous);
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
     virtual void discardAgent() override;
 
 private:
index 9f529ab..25c6fc0 100644 (file)
@@ -76,7 +76,7 @@ void InspectorDOMStorageAgent::didCreateFrontendAndBackend(Inspector::InspectorF
     m_backendDispatcher = InspectorDOMStorageBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorDOMStorageAgent::willDestroyFrontendAndBackend()
+void InspectorDOMStorageAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index c62aa71..5ad2b7e 100644 (file)
@@ -58,7 +58,7 @@ public:
     ~InspectorDOMStorageAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     // Called from the front-end.
     virtual void enable(ErrorString*) override;
index 31a61d8..2861ed5 100644 (file)
@@ -228,7 +228,7 @@ void InspectorDatabaseAgent::didCreateFrontendAndBackend(Inspector::InspectorFro
     m_backendDispatcher = InspectorDatabaseBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorDatabaseAgent::willDestroyFrontendAndBackend()
+void InspectorDatabaseAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index 6fb7108..3229607 100644 (file)
@@ -56,7 +56,7 @@ public:
     ~InspectorDatabaseAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     void clearResources();
 
index 6e90b34..049bcd6 100644 (file)
@@ -95,12 +95,12 @@ void InspectorDebuggerAgent::enable()
     m_enabled = true;
 }
 
-void InspectorDebuggerAgent::disable()
+void InspectorDebuggerAgent::disable(bool isBeingDestroyed)
 {
     m_javaScriptBreakpoints.clear();
     m_instrumentingAgents->setInspectorDebuggerAgent(nullptr);
 
-    stopListeningScriptDebugServer();
+    stopListeningScriptDebugServer(isBeingDestroyed);
     clearResolvedBreakpointState();
 
     if (m_listener)
@@ -124,7 +124,8 @@ void InspectorDebuggerAgent::disable(ErrorString*)
     if (!m_enabled)
         return;
 
-    disable();
+    bool skipRecompile = false;
+    disable(skipRecompile);
 }
 
 void InspectorDebuggerAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
@@ -133,12 +134,13 @@ void InspectorDebuggerAgent::didCreateFrontendAndBackend(Inspector::InspectorFro
     m_backendDispatcher = InspectorDebuggerBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorDebuggerAgent::willDestroyFrontendAndBackend()
+void InspectorDebuggerAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason reason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
 
-    disable();
+    bool skipRecompile = reason == InspectorDisconnectReason::InspectedTargetDestroyed;
+    disable(skipRecompile);
 }
 
 void InspectorDebuggerAgent::setBreakpointsActive(ErrorString*, bool active)
index f99aa38..adb779a 100644 (file)
@@ -71,7 +71,7 @@ public:
     virtual ~InspectorDebuggerAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     bool isPaused();
     void addMessageToConsole(MessageSource, MessageType);
@@ -128,14 +128,14 @@ protected:
     InspectorDebuggerAgent(InstrumentingAgents*, Inspector::InjectedScriptManager*);
 
     virtual void startListeningScriptDebugServer() = 0;
-    virtual void stopListeningScriptDebugServer() = 0;
+    virtual void stopListeningScriptDebugServer(bool isBeingDestroyed) = 0;
     virtual void muteConsole() = 0;
     virtual void unmuteConsole() = 0;
     Inspector::InjectedScriptManager* injectedScriptManager() const { return m_injectedScriptManager; }
     virtual Inspector::InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId) = 0;
 
     virtual void enable();
-    virtual void disable();
+    virtual void disable(bool isBeingDestroyed);
     virtual void didPause(JSC::ExecState*, const Deprecated::ScriptValue& callFrames, const Deprecated::ScriptValue& exception) override;
     virtual void didContinue() override;
     void didClearGlobalObject();
index 54830bc..777533d 100644 (file)
@@ -85,7 +85,7 @@ void InspectorHeapProfilerAgent::didCreateFrontendAndBackend(Inspector::Inspecto
     m_backendDispatcher = InspectorHeapProfilerBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorHeapProfilerAgent::willDestroyFrontendAndBackend()
+void InspectorHeapProfilerAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index 9804fe4..c948218 100644 (file)
@@ -67,7 +67,7 @@ public:
     virtual void removeProfile(ErrorString*, int uid) override;
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     virtual void takeHeapSnapshot(ErrorString*, const bool* reportProgress) override;
 
index db451fd..af3c598 100644 (file)
@@ -574,7 +574,7 @@ void InspectorIndexedDBAgent::didCreateFrontendAndBackend(Inspector::InspectorFr
     m_backendDispatcher = InspectorIndexedDBBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorIndexedDBAgent::willDestroyFrontendAndBackend()
+void InspectorIndexedDBAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_backendDispatcher.clear();
 
index ae61988..d071a00 100644 (file)
@@ -54,7 +54,7 @@ public:
     ~InspectorIndexedDBAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     // Called from the front-end.
     virtual void enable(ErrorString*) override;
index c4b8789..c45a040 100644 (file)
@@ -68,7 +68,7 @@ void InspectorInputAgent::didCreateFrontendAndBackend(Inspector::InspectorFronte
     m_backendDispatcher = InspectorInputBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorInputAgent::willDestroyFrontendAndBackend()
+void InspectorInputAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_backendDispatcher.clear();
 }
index 88eb933..f152af6 100644 (file)
@@ -51,7 +51,7 @@ public:
     ~InspectorInputAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     // Methods called from the frontend for simulating input.
     virtual void dispatchKeyEvent(ErrorString*, const String& type, const int* modifiers, const double* timestamp, const String* text, const String* unmodifiedText, const String* keyIdentifier, const int* windowsVirtualKeyCode, const int* nativeVirtualKeyCode, const int* macCharCode, const bool* autoRepeat, const bool* isKeypad, const bool* isSystemKey) override;
index c0fc260..086e3c8 100644 (file)
@@ -66,7 +66,7 @@ void InspectorLayerTreeAgent::didCreateFrontendAndBackend(Inspector::InspectorFr
     m_backendDispatcher = InspectorLayerTreeBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorLayerTreeAgent::willDestroyFrontendAndBackend()
+void InspectorLayerTreeAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index 721b310..7561ac7 100644 (file)
@@ -53,7 +53,7 @@ public:
     ~InspectorLayerTreeAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
     void reset();
 
     void layerTreeDidChange();
index b74c353..164d914 100644 (file)
@@ -73,7 +73,7 @@ void InspectorMemoryAgent::didCreateFrontendAndBackend(Inspector::InspectorFront
     m_backendDispatcher = InspectorMemoryBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorMemoryAgent::willDestroyFrontendAndBackend()
+void InspectorMemoryAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_backendDispatcher.clear();
 }
index c5c10af..12f3a9c 100644 (file)
@@ -52,7 +52,7 @@ public:
     virtual ~InspectorMemoryAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     virtual void getDOMCounters(ErrorString*, int* documents, int* nodes, int* jsEventListeners) override;
 
index e47ffdd..0ed0e11 100644 (file)
@@ -362,7 +362,7 @@ void InspectorPageAgent::didCreateFrontendAndBackend(Inspector::InspectorFronten
     m_backendDispatcher = InspectorPageBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorPageAgent::willDestroyFrontendAndBackend()
+void InspectorPageAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index 774153a..83d12d5 100644 (file)
@@ -148,7 +148,7 @@ public:
 
     // Inspector Controller API
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     // Cross-agents API
     Page* page() { return m_page; }
index 1f25a3e..64ec670 100644 (file)
@@ -73,7 +73,7 @@ public:
 private:
     virtual void recompileScript() override
     {
-        PageScriptDebugServer::shared().recompileAllJSFunctionsSoon();
+        PageScriptDebugServer::shared().recompileAllJSFunctions();
     }
 
     virtual void startProfiling(const String& title) override
@@ -202,23 +202,22 @@ void InspectorProfilerAgent::hasHeapProfiler(ErrorString*, bool* result)
 
 void InspectorProfilerAgent::enable(ErrorString*)
 {
-    if (enabled())
-        return;
     enable(false);
 }
 
 void InspectorProfilerAgent::disable(ErrorString*)
 {
-    disable();
+    disable(false);
 }
 
-void InspectorProfilerAgent::disable()
+void InspectorProfilerAgent::disable(bool skipRecompile)
 {
     if (!m_enabled)
         return;
     m_enabled = false;
     m_profileHeadersRequested = false;
-    recompileScript();
+    if (!skipRecompile)
+        recompileScript();
 }
 
 void InspectorProfilerAgent::enable(bool skipRecompile)
@@ -333,14 +332,15 @@ void InspectorProfilerAgent::didCreateFrontendAndBackend(Inspector::InspectorFro
     m_backendDispatcher = InspectorProfilerBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorProfilerAgent::willDestroyFrontendAndBackend()
+void InspectorProfilerAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason reason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
 
     stop();
-    ErrorString error;
-    disable(&error);
+
+    bool skipRecompile = reason == InspectorDisconnectReason::InspectedTargetDestroyed;
+    disable(skipRecompile);
 }
 
 void InspectorProfilerAgent::start(ErrorString*)
index 2a2b7fb..d37939f 100644 (file)
@@ -82,7 +82,7 @@ public:
     virtual void start(ErrorString* = nullptr) override;
     virtual void stop(ErrorString* = nullptr) override;
 
-    void disable();
+    void disable(bool skipRecompile);
     void enable(bool skipRecompile);
     bool enabled() const { return m_enabled; }
     String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false);
@@ -92,7 +92,7 @@ public:
     virtual void removeProfile(ErrorString*, const String& type, int uid) override;
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     virtual void takeHeapSnapshot(ErrorString*, const bool* reportProgress) override;
     void toggleRecordButton(bool isProfiling);
index 3244d7e..783d017 100644 (file)
@@ -83,7 +83,7 @@ void InspectorResourceAgent::didCreateFrontendAndBackend(Inspector::InspectorFro
     m_backendDispatcher = InspectorNetworkBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorResourceAgent::willDestroyFrontendAndBackend()
+void InspectorResourceAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index c950b71..d2ca2a2 100644 (file)
@@ -81,7 +81,7 @@ public:
     ~InspectorResourceAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
     void markResourceAsCached(unsigned long identifier);
index e4a4d57..f8a6c38 100644 (file)
@@ -73,7 +73,7 @@ void InspectorTimelineAgent::didCreateFrontendAndBackend(Inspector::InspectorFro
     m_backendDispatcher = InspectorTimelineBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorTimelineAgent::willDestroyFrontendAndBackend()
+void InspectorTimelineAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index 2f4f7de..4c5ed25 100644 (file)
@@ -132,7 +132,7 @@ public:
     ~InspectorTimelineAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* includeDomCounters) override;
     virtual void stop(ErrorString*) override;
index 0fbdbdd..b8108b5 100644 (file)
@@ -122,7 +122,7 @@ void InspectorWorkerAgent::didCreateFrontendAndBackend(Inspector::InspectorFront
     m_backendDispatcher = InspectorWorkerBackendDispatcher::create(backendDispatcher, this);
 }
 
-void InspectorWorkerAgent::willDestroyFrontendAndBackend()
+void InspectorWorkerAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_shouldPauseDedicatedWorkerOnStart = false;
     disable(nullptr);
index 3a95144..753c983 100644 (file)
@@ -54,7 +54,7 @@ public:
     ~InspectorWorkerAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     // Called from InspectorInstrumentation
     bool shouldPauseDedicatedWorkerOnStart() const;
index 0c018be..5a735e4 100644 (file)
@@ -65,9 +65,9 @@ void PageDebuggerAgent::enable()
     m_instrumentingAgents->setPageDebuggerAgent(this);
 }
 
-void PageDebuggerAgent::disable()
+void PageDebuggerAgent::disable(bool isBeingDestroyed)
 {
-    InspectorDebuggerAgent::disable();
+    InspectorDebuggerAgent::disable(isBeingDestroyed);
     m_instrumentingAgents->setPageDebuggerAgent(nullptr);
 }
 
@@ -76,9 +76,9 @@ void PageDebuggerAgent::startListeningScriptDebugServer()
     scriptDebugServer().addListener(this, m_pageAgent->page());
 }
 
-void PageDebuggerAgent::stopListeningScriptDebugServer()
+void PageDebuggerAgent::stopListeningScriptDebugServer(bool isBeingDestroyed)
 {
-    scriptDebugServer().removeListener(this, m_pageAgent->page());
+    scriptDebugServer().removeListener(this, m_pageAgent->page(), isBeingDestroyed);
 }
 
 PageScriptDebugServer& PageDebuggerAgent::scriptDebugServer()
index 0a579ac..4dd1733 100644 (file)
@@ -54,11 +54,11 @@ public:
 
 protected:
     virtual void enable() override;
-    virtual void disable() override;
+    virtual void disable(bool isBeingDestroyed) override;
 
 private:
     virtual void startListeningScriptDebugServer() override;
-    virtual void stopListeningScriptDebugServer() override;
+    virtual void stopListeningScriptDebugServer(bool isBeingDestroyed) override;
     virtual PageScriptDebugServer& scriptDebugServer() override;
     virtual void muteConsole() override;
     virtual void unmuteConsole() override;
index d3f6f56..0342664 100644 (file)
@@ -71,7 +71,7 @@ void PageRuntimeAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendC
     m_backendDispatcher = InspectorRuntimeBackendDispatcher::create(backendDispatcher, this);
 }
 
-void PageRuntimeAgent::willDestroyFrontendAndBackend()
+void PageRuntimeAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_frontendDispatcher = nullptr;
     m_backendDispatcher.clear();
index f0cba44..e62c33c 100644 (file)
@@ -54,7 +54,7 @@ public:
     virtual ~PageRuntimeAgent();
     
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
     virtual void enable(ErrorString*) override;
     virtual void disable(ErrorString*) override;
 
index 558f9ca..8f33746 100644 (file)
@@ -122,9 +122,9 @@ void WorkerDebuggerAgent::startListeningScriptDebugServer()
     scriptDebugServer().addListener(this);
 }
 
-void WorkerDebuggerAgent::stopListeningScriptDebugServer()
+void WorkerDebuggerAgent::stopListeningScriptDebugServer(bool isBeingDestroyed)
 {
-    scriptDebugServer().removeListener(this);
+    scriptDebugServer().removeListener(this, isBeingDestroyed);
 }
 
 WorkerScriptDebugServer& WorkerDebuggerAgent::scriptDebugServer()
index eadd742..8a032b2 100644 (file)
@@ -51,7 +51,7 @@ public:
     static void interruptAndDispatchInspectorCommands(WorkerThread*);
 
     virtual void startListeningScriptDebugServer() override;
-    virtual void stopListeningScriptDebugServer() override;
+    virtual void stopListeningScriptDebugServer(bool isBeingDestroyed) override;
     virtual WorkerScriptDebugServer& scriptDebugServer() override;
     virtual Inspector::InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId) override;
     virtual void muteConsole() override;
index cd69854..fd0727a 100644 (file)
@@ -116,7 +116,7 @@ WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope& workerGl
 WorkerInspectorController::~WorkerInspectorController()
 {
     m_instrumentingAgents->reset();
-    disconnectFrontend();
+    disconnectFrontend(InspectorDisconnectReason::InspectedTargetDestroyed);
 }
 
 void WorkerInspectorController::connectFrontend()
@@ -127,11 +127,12 @@ void WorkerInspectorController::connectFrontend()
     m_agents.didCreateFrontendAndBackend(m_frontendChannel.get(), m_backendDispatcher.get());
 }
 
-void WorkerInspectorController::disconnectFrontend()
+void WorkerInspectorController::disconnectFrontend(InspectorDisconnectReason reason)
 {
     if (!m_frontendChannel)
         return;
-    m_agents.willDestroyFrontendAndBackend();
+
+    m_agents.willDestroyFrontendAndBackend(reason);
     m_backendDispatcher->clearFrontend();
     m_backendDispatcher.clear();
     m_frontendChannel = nullptr;
index fe6fda7..7b243f4 100644 (file)
@@ -63,7 +63,7 @@ public:
     ~WorkerInspectorController();
 
     void connectFrontend();
-    void disconnectFrontend();
+    void disconnectFrontend(Inspector::InspectorDisconnectReason);
     void dispatchMessageFromFrontend(const String&);
 #if ENABLE(JAVASCRIPT_DEBUGGER)
     void resume();
index 9b640d7..6c40170 100644 (file)
@@ -64,7 +64,7 @@ void WorkerRuntimeAgent::didCreateFrontendAndBackend(Inspector::InspectorFronten
     m_backendDispatcher = InspectorRuntimeBackendDispatcher::create(backendDispatcher, this);
 }
 
-void WorkerRuntimeAgent::willDestroyFrontendAndBackend()
+void WorkerRuntimeAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
 {
     m_backendDispatcher.clear();
 }
index e9022b2..03ead86 100644 (file)
@@ -46,7 +46,7 @@ public:
     virtual ~WorkerRuntimeAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend() override;
+    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
 
     // Protocol commands.
     virtual void run(ErrorString*) override;
index c1f2652..067df5a 100644 (file)
@@ -34,6 +34,7 @@
 #include "InspectorForwarding.h"
 #include "MainFrame.h"
 #include "Page.h"
+#include <inspector/InspectorAgentBase.h>
 
 using namespace Inspector;
 
@@ -84,7 +85,7 @@ void PageDebuggable::connect(Inspector::InspectorFrontendChannel* channel)
 void PageDebuggable::disconnect()
 {
     InspectorController& inspectorController = m_page.inspectorController();
-    inspectorController.disconnectFrontend();
+    inspectorController.disconnectFrontend(InspectorDisconnectReason::InspectorDestroyed);
     inspectorController.setHasRemoteFrontend(false);
 }
 
index beb69d9..7390c2d 100644 (file)
@@ -96,6 +96,7 @@
 #include "ViewportArguments.h"
 #include "WorkerThread.h"
 #include <bytecode/CodeBlock.h>
+#include <inspector/InspectorAgentBase.h>
 #include <inspector/InspectorValues.h>
 #include <runtime/JSCJSValue.h>
 #include <wtf/text/CString.h>
@@ -1464,7 +1465,8 @@ void Internals::closeDummyInspectorFrontend()
     ASSERT(page);
     ASSERT(m_frontendWindow);
 
-    page->inspectorController().disconnectFrontend();
+    // Treat this as if the page we are inspecting is closing.
+    page->inspectorController().disconnectFrontend(InspectorDisconnectReason::InspectedTargetDestroyed);
 
     m_frontendChannel.release();
 
index d504ad2..ef360ac 100644 (file)
@@ -48,6 +48,7 @@
 #include "Worker.h"
 #include "WorkerDebuggerAgent.h"
 #include "WorkerInspectorController.h"
+#include <inspector/InspectorAgentBase.h>
 #include <wtf/MainThread.h>
 
 namespace WebCore {
@@ -428,7 +429,7 @@ void WorkerMessagingProxy::connectToInspector(WorkerGlobalScopeProxy::PageInspec
 static void disconnectFromWorkerGlobalScopeInspectorTask(ScriptExecutionContext* context, bool)
 {
     ASSERT_WITH_SECURITY_IMPLICATION(context->isWorkerGlobalScope());
-    static_cast<WorkerGlobalScope*>(context)->workerInspectorController().disconnectFrontend();
+    static_cast<WorkerGlobalScope*>(context)->workerInspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed);
 }
 #endif
 
index 76118d8..bfa8c34 100644 (file)
@@ -234,7 +234,7 @@ EXPORTS
         symbolWithPointer(?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z, ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QEAAXHH@Z)
         symbolWithPointer(?pathByAppendingComponent@WebCore@@YA?AVString@WTF@@ABV23@0@Z, ?pathByAppendingComponent@WebCore@@YA?AVString@WTF@@AEBV23@0@Z)
         symbolWithPointer(?setProfilerEnabled@InspectorController@WebCore@@QAEX_N@Z, ?setProfilerEnabled@InspectorController@WebCore@@QEAAX_N@Z)
-        symbolWithPointer(?disconnectFrontend@InspectorController@WebCore@@QAEXXZ, ?disconnectFrontend@InspectorController@WebCore@@QEAAXXZ)
+        symbolWithPointer(?disconnectFrontend@InspectorController@WebCore@@QAEXW4InspectorDisconnectReason@Inspector@@@Z, ?disconnectFrontend@InspectorController@WebCore@@QAEXW4InspectorDisconnectReason@Inspector@@@Z)
 #endif
         symbolWithPointer(?isActiveInsertionPoint@WebCore@@YA_NPBVNode@1@@Z, ?isActiveInsertionPoint@WebCore@@YA_NPEBVNode@1@@Z)
         symbolWithPointer(?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z, ?isPreloaded@CachedResourceLoader@WebCore@@QEBA_NAEBVString@WTF@@@Z)
index 579b2ac..e077d4b 100644 (file)
@@ -1,3 +1,14 @@
+2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
+        https://bugs.webkit.org/show_bug.cgi?id=127409
+
+        Reviewed by Geoffrey Garen.
+
+        * WebCoreSupport/InspectorClientEfl.cpp:
+        (WebCore::InspectorFrontendClientEfl::destroyInspectorWindow):
+        Include InspectorDisconnectReason.
+
 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
 
         Fix EFL.
index ca18f96..bcf28c9 100644 (file)
@@ -28,6 +28,7 @@
 #include "MainFrame.h"
 #include "NotImplemented.h"
 #include "ewk_view_private.h"
+#include <inspector/InspectorAgentBase.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
@@ -213,7 +214,7 @@ void InspectorFrontendClientEfl::setToolbarHeight(unsigned)
 void InspectorFrontendClientEfl::destroyInspectorWindow(bool notifyInspectorController)
 {
     if (notifyInspectorController)
-        EWKPrivate::corePage(m_inspectedView)->inspectorController().disconnectFrontend();
+        EWKPrivate::corePage(m_inspectedView)->inspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed);
 
     if (m_inspectorClient)
         m_inspectorClient->releaseFrontendPage();
index cbd81fa..134f1a5 100644 (file)
@@ -1,3 +1,14 @@
+2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
+        https://bugs.webkit.org/show_bug.cgi?id=127409
+
+        Reviewed by Geoffrey Garen.
+
+        * WebCoreSupport/InspectorClientGtk.cpp:
+        (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+        Include InspectorDisconnectReason.
+
 2014-01-23  Max Vujovic  <mvujovic@adobe.com>
 
         Remove CSS Custom Filters code and tests
index cdad8f7..cd94934 100644 (file)
@@ -30,6 +30,7 @@
 #include "webkitwebinspectorprivate.h"
 #include "webkitwebview.h"
 #include "webkitwebviewprivate.h"
+#include <inspector/InspectorAgentBase.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
@@ -189,7 +190,7 @@ void InspectorFrontendClient::destroyInspectorWindow(bool notifyInspectorControl
     }
 
     if (notifyInspectorController)
-        core(m_inspectedWebView)->inspectorController().disconnectFrontend();
+        core(m_inspectedWebView)->inspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed);
 
     if (m_inspectorClient)
         m_inspectorClient->releaseFrontendPage();
index 9aaa3b2..8844d00 100644 (file)
@@ -1,3 +1,14 @@
+2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
+        https://bugs.webkit.org/show_bug.cgi?id=127409
+
+        Reviewed by Geoffrey Garen.
+
+        * WebCoreSupport/WebInspectorClient.mm:
+        (-[WebInspectorWindowController destroyInspectorView:]):
+        Include InspectorDisconnectReason.
+
 2014-01-23  Max Vujovic  <mvujovic@adobe.com>
 
         Remove CSS Custom Filters code and tests
index 32a7270..af89d94 100644 (file)
@@ -44,6 +44,7 @@
 #import "WebViewInternal.h"
 #import <algorithm>
 #import <bindings/ScriptValue.h>
+#import <inspector/InspectorAgentBase.h>
 #import <WebCore/InspectorController.h>
 #import <WebCore/InspectorFrontendClient.h>
 #import <WebCore/MainFrame.h>
@@ -693,7 +694,7 @@ void WebInspectorFrontendClient::append(const String& suggestedURL, const String
 
     if (notifyInspectorController) {
         if (Page* inspectedPage = [_inspectedWebView.get() page])
-            inspectedPage->inspectorController().disconnectFrontend();
+            inspectedPage->inspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed);
     }
 
     RetainPtr<WebInspectorWindowController> protect(self);
index 5483bf0..47d622d 100644 (file)
@@ -1,3 +1,14 @@
+2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
+        https://bugs.webkit.org/show_bug.cgi?id=127409
+
+        Reviewed by Geoffrey Garen.
+
+        * WebCoreSupport/WebInspectorClient.cpp:
+        (WebInspectorFrontendClient::destroyInspectorView):
+        Include InspectorDisconnectReason.
+
 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
 
         Another Windows fix.
index f22b709..8b8e6fc 100644 (file)
@@ -48,6 +48,7 @@
 #include <WebCore/RenderObject.h>
 #include <WebCore/WindowMessageBroadcaster.h>
 
+#include <inspector/InspectorAgentBase.h>
 #include <wchar.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/text/StringConcatenate.h>
@@ -438,7 +439,7 @@ void WebInspectorFrontendClient::destroyInspectorView(bool notifyInspectorContro
     closeWindowWithoutNotifications();
 
     if (notifyInspectorController) {
-        m_inspectedWebView->page()->inspectorController().disconnectFrontend();
+        m_inspectedWebView->page()->inspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed);
         m_inspectorClient->updateHighlight();
     }
     ::DestroyWindow(m_frontendHwnd);
index 0db1082..6b7339c 100644 (file)
@@ -1,3 +1,16 @@
+2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
+        https://bugs.webkit.org/show_bug.cgi?id=127409
+
+        Reviewed by Geoffrey Garen.
+
+        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
+        (WebKit::WebInspectorFrontendClient::closeWindow):
+        * WebProcess/WebPage/WebInspector.cpp:
+        (WebKit::WebInspector::remoteFrontendDisconnected):
+        Include InspectorDisconnectReason.
+
 2014-01-23  Anders Carlsson  <andersca@apple.com>
 
         Only WKPage should know about WebPolicyClient
index 058f0ff..b3e6e45 100644 (file)
@@ -33,6 +33,7 @@
 #include <WebCore/InspectorController.h>
 #include <WebCore/NotImplemented.h>
 #include <WebCore/Page.h>
+#include <inspector/InspectorAgentBase.h>
 #include <wtf/text/WTFString.h>
 
 using namespace WebCore;
@@ -57,7 +58,7 @@ void WebInspectorFrontendClient::bringToFront()
 
 void WebInspectorFrontendClient::closeWindow()
 {
-    m_page->corePage()->inspectorController().disconnectFrontend();
+    m_page->corePage()->inspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed);
     m_page->inspector()->didClose();
 }
 
index 430522b..ccf455f 100644 (file)
@@ -38,6 +38,7 @@
 #include <WebCore/MainFrame.h>
 #include <WebCore/Page.h>
 #include <WebCore/ScriptController.h>
+#include <inspector/InspectorAgentBase.h>
 #include <bindings/ScriptValue.h>
 #include <wtf/text/StringConcatenate.h>
 
@@ -326,7 +327,7 @@ void WebInspector::remoteFrontendConnected()
 void WebInspector::remoteFrontendDisconnected()
 {
     ASSERT(m_remoteFrontendConnected);
-    m_page->corePage()->inspectorController().disconnectFrontend();
+    m_page->corePage()->inspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed);
     m_remoteFrontendConnected = false;
 }
 #endif