[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

loislo at chromium.org loislo at chromium.org
Wed Dec 22 13:54:28 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b05398cb12412b6f9b65099ae5f5526aab37c5a0
Author: loislo at chromium.org <loislo at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 29 07:59:52 2010 +0000

    2010-09-28  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: move pauseOnExceptionState under control of InspectorState
            It is Inspector Protocol cleanup activity.
            The actual state of this flag can be obtained as a return value of setPauseOnExceptionState command
            or as a value in InspectorState object.
    
            https://bugs.webkit.org/show_bug.cgi?id=46724
    
            * inspector/Inspector.idl:
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::getInspectorState):
            (WebCore::InspectorController::populateScriptObjects):
            * inspector/InspectorDebuggerAgent.cpp:
            (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
            (WebCore::InspectorDebuggerAgent::pauseOnExceptionsState):
            * inspector/InspectorDebuggerAgent.h:
            * inspector/front-end/ScriptsPanel.js:
            (WebInspector.ScriptsPanel.prototype._togglePauseOnExceptions):
            * inspector/front-end/inspector.js:
            (WebInspector.doLoadedDone.populateInspectorState):
            (WebInspector.doLoadedDone):
            (WebInspector.reportProtocolError):
    
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68635 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4976376..6162c51 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2010-09-28  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: move pauseOnExceptionState under control of InspectorState
+        It is Inspector Protocol cleanup activity.
+        The actual state of this flag can be obtained as a return value of setPauseOnExceptionState command
+        or as a value in InspectorState object.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46724
+
+        * inspector/Inspector.idl:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::getInspectorState):
+        (WebCore::InspectorController::populateScriptObjects):
+        * inspector/InspectorDebuggerAgent.cpp:
+        (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
+        (WebCore::InspectorDebuggerAgent::pauseOnExceptionsState):
+        * inspector/InspectorDebuggerAgent.h:
+        * inspector/front-end/ScriptsPanel.js:
+        (WebInspector.ScriptsPanel.prototype._togglePauseOnExceptions):
+        * inspector/front-end/inspector.js:
+        (WebInspector.doLoadedDone.populateInspectorState):
+        (WebInspector.doLoadedDone):
+        (WebInspector.reportProtocolError):
+
 2010-09-28  Philippe Normand  <pnormand at igalia.com>
 
         Reviewed by Martin Robinson.
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index ce2b03f..a08a622 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -130,7 +130,7 @@ module core {
         [handler=Debug] void stepIntoStatement();
         [handler=Debug] void stepOutOfFunction();
 
-        [handler=Debug] void setPauseOnExceptionsState(in long pauseOnExceptionsState);
+        [handler=Debug] void setPauseOnExceptionsState(in long pauseOnExceptionsState, out long newState);
 
         [handler=Debug] void editScriptSource(in String sourceID, in String newContent, out boolean success, out String result, out Value newCallFrames);
         [handler=Debug] void getScriptSource(in String sourceID, out String scriptSource);
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index d106d56..f2ee2c1 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -111,10 +111,6 @@
 #include "StorageArea.h"
 #endif
 
-#if ENABLE(JAVASCRIPT_DEBUGGER)
-#include "ScriptDebugServer.h"
-#endif
-
 using namespace std;
 
 namespace WebCore {
@@ -131,6 +127,7 @@ static const char* const monitoringXHRStateName = "monitoringXHREnabled";
 static const char* const resourceTrackingEnabledStateName = "resourceTrackingEnabled";
 static const char* const searchingForNodeEnabledStateName = "searchingForNodeEnabled";
 static const char* const timelineProfilerEnabledStateName = "timelineProfilerEnabled";
+static const char* const pauseOnExceptionsStateStateName = "pauseOnExceptionsState";
 
 static const char* const inspectorAttachedHeightName = "inspectorAttachedHeight";
 
@@ -258,6 +255,10 @@ void InspectorController::getInspectorState(RefPtr<InspectorObject>* state)
 {
     (*state)->setBoolean(monitoringXHRStateName, m_monitoringXHR);
     (*state)->setBoolean(resourceTrackingEnabledStateName, m_resourceTrackingEnabled);
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+    if (m_debuggerAgent)
+        (*state)->setNumber(pauseOnExceptionsStateStateName, m_debuggerAgent->pauseOnExceptionsState());
+#endif
 }
 
 void InspectorController::updateInspectorStateCookie()
@@ -675,10 +676,6 @@ void InspectorController::populateScriptObjects()
     for (unsigned i = 0; i < messageCount; ++i)
         m_consoleMessages[i]->addToFrontend(m_frontend.get(), m_injectedScriptHost.get());
 
-#if ENABLE(JAVASCRIPT_DEBUGGER)
-    if (debuggerEnabled())
-        m_frontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState());
-#endif
 #if ENABLE(DATABASE)
     DatabaseResourcesMap::iterator databasesEnd = m_databaseResources.end();
     for (DatabaseResourcesMap::iterator it = m_databaseResources.begin(); it != databasesEnd; ++it)
diff --git a/WebCore/inspector/InspectorDebuggerAgent.cpp b/WebCore/inspector/InspectorDebuggerAgent.cpp
index 9275961..4964c09 100644
--- a/WebCore/inspector/InspectorDebuggerAgent.cpp
+++ b/WebCore/inspector/InspectorDebuggerAgent.cpp
@@ -172,10 +172,15 @@ void InspectorDebuggerAgent::stepOutOfFunction()
     ScriptDebugServer::shared().stepOutOfFunction();
 }
 
-void InspectorDebuggerAgent::setPauseOnExceptionsState(long pauseState)
+void InspectorDebuggerAgent::setPauseOnExceptionsState(long pauseState, long* newState)
 {
     ScriptDebugServer::shared().setPauseOnExceptionsState(static_cast<ScriptDebugServer::PauseOnExceptionsState>(pauseState));
-    m_frontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState());
+    *newState = ScriptDebugServer::shared().pauseOnExceptionsState();
+}
+
+long InspectorDebuggerAgent::pauseOnExceptionsState()
+{
+    return ScriptDebugServer::shared().pauseOnExceptionsState();
 }
 
 void InspectorDebuggerAgent::clearForPageNavigation()
diff --git a/WebCore/inspector/InspectorDebuggerAgent.h b/WebCore/inspector/InspectorDebuggerAgent.h
index f5baabc..8a5379d 100644
--- a/WebCore/inspector/InspectorDebuggerAgent.h
+++ b/WebCore/inspector/InspectorDebuggerAgent.h
@@ -73,7 +73,8 @@ public:
     void stepIntoStatement();
     void stepOutOfFunction();
 
-    void setPauseOnExceptionsState(long pauseState);
+    void setPauseOnExceptionsState(long pauseState, long* newState);
+    long pauseOnExceptionsState();
 
     void clearForPageNavigation();
 
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index b82b996..8283528 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -895,7 +895,7 @@ WebInspector.ScriptsPanel.prototype = {
 
     _togglePauseOnExceptions: function()
     {
-        InspectorBackend.setPauseOnExceptionsState((this._pauseOnExceptionButton.state + 1) % this._pauseOnExceptionButton.states);
+        InspectorBackend.setPauseOnExceptionsState((this._pauseOnExceptionButton.state + 1) % this._pauseOnExceptionButton.states, this.updatePauseOnExceptionsState.bind(this));
     },
 
     _togglePause: function()
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index fe02cf4..211b4fc 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -592,6 +592,8 @@ WebInspector.doLoadedDone = function()
     function populateInspectorState(inspectorState)
     {
         WebInspector.monitoringXHREnabled = inspectorState.monitoringXHREnabled;
+        if ("pauseOnExceptionsState" in inspectorState)
+            WebInspector.panels.scripts.updatePauseOnExceptionsState(inspectorState.pauseOnExceptionsState);
         if (inspectorState.resourceTrackingEnabled)
             WebInspector.panels.resources.resourceTrackingWasEnabled();
         else
@@ -684,8 +686,8 @@ WebInspector.dispatchMessageFromBackend = function(messageObject)
 WebInspector.reportProtocolError = function(messageObject)
 {
     console.error("Protocol Error: InspectorBackend request with seq = %d failed.", messageObject.seq);
-    for (var error in messageObject.errors)
-        console.error("    " + error);
+    for (var i = 0; i < messageObject.errors.length; ++i)
+        console.error("    " + messageObject.errors[i]);
     WebInspector.removeResponseCallbackEntry(messageObject.seq);
 }
 
@@ -1409,11 +1411,6 @@ WebInspector.debuggerWasEnabled = function()
     this.panels.scripts.debuggerWasEnabled();
 }
 
-WebInspector.updatePauseOnExceptionsState = function(pauseOnExceptionsState)
-{
-    this.panels.scripts.updatePauseOnExceptionsState(pauseOnExceptionsState);
-}
-
 WebInspector.debuggerWasDisabled = function()
 {
     this.panels.scripts.debuggerWasDisabled();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list