Commit 3d78324a authored by pfeldman@chromium.org's avatar pfeldman@chromium.org
Browse files

2011-01-18 Pavel Feldman <pfeldman@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: preserve pause on exception state in settings.
        https://bugs.webkit.org/show_bug.cgi?id=52619

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::getInspectorState):
        * inspector/InspectorDebuggerAgent.cpp:
        (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
        * inspector/InspectorDebuggerAgent.h:
        * inspector/front-end/ScriptsPanel.js:
        (WebInspector.ScriptsPanel):
        (WebInspector.ScriptsPanel.prototype.debuggerWasEnabled):
        (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsState):
        (WebInspector.ScriptsPanel.prototype._togglePauseOnExceptions):
        (WebInspector.ScriptsPanel.prototype._setPauseOnExceptions):
        * inspector/front-end/Settings.js:
        (WebInspector.Settings):
        * inspector/front-end/inspector.js:
        (WebInspector.doLoadedDone.populateInspectorState):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 37dda3c5
......@@ -3068,9 +3068,6 @@ BUGCR69300 LINUX : svg/batik/text/textOnPath.svg = IMAGE PASS
// Test added in r75567
BUGWK52266 WIN : plugins/no-mime-with-valid-extension.html = TEXT
// Test added in r75064
BUGCR69395 WIN : inspector/timeline-network-resource.html = TEXT
// Flaky since r75548; transformed character is occasionally corrupt
BUGCR69411 LINUX : svg/custom/linking-a-03-b-transform.svg = IMAGE PASS
......
2011-01-18 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: preserve pause on exception state in settings.
https://bugs.webkit.org/show_bug.cgi?id=52619
* inspector/InspectorController.cpp:
(WebCore::InspectorController::getInspectorState):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
* inspector/InspectorDebuggerAgent.h:
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
(WebInspector.ScriptsPanel.prototype.debuggerWasEnabled):
(WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsState):
(WebInspector.ScriptsPanel.prototype._togglePauseOnExceptions):
(WebInspector.ScriptsPanel.prototype._setPauseOnExceptions):
* inspector/front-end/Settings.js:
(WebInspector.Settings):
* inspector/front-end/inspector.js:
(WebInspector.doLoadedDone.populateInspectorState):
2011-01-18 Pavel Podivilov <podivilov@chromium.org>
 
Reviewed by Yury Semikhatsky.
......@@ -215,10 +215,6 @@ bool InspectorController::searchingForNodeInPage() const
void InspectorController::getInspectorState(RefPtr<InspectorObject>* state)
{
#if ENABLE(JAVASCRIPT_DEBUGGER)
if (m_debuggerAgent)
m_state->setLong(InspectorState::pauseOnExceptionsState, m_debuggerAgent->pauseOnExceptionsState());
#endif
*state = m_state->generateStateObjectForFrontend();
}
......
......@@ -173,11 +173,6 @@ void InspectorDebuggerAgent::setPauseOnExceptionsState(long pauseState, long* ne
*newState = ScriptDebugServer::shared().pauseOnExceptionsState();
}
long InspectorDebuggerAgent::pauseOnExceptionsState()
{
return ScriptDebugServer::shared().pauseOnExceptionsState();
}
void InspectorDebuggerAgent::clearForPageNavigation()
{
m_scriptIDToContent.clear();
......
......@@ -78,7 +78,6 @@ public:
void stepOut();
void setPauseOnExceptionsState(long pauseState, long* newState);
long pauseOnExceptionsState();
void clearForPageNavigation();
......
......@@ -177,8 +177,6 @@ WebInspector.ScriptsPanel = function()
this._pauseOnExceptionButton = new WebInspector.StatusBarButton("", "scripts-pause-on-exceptions-status-bar-item", 3);
this._pauseOnExceptionButton.addEventListener("click", this._togglePauseOnExceptions.bind(this), false);
this._pauseOnExceptionButton.state = WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions;
this._pauseOnExceptionButton.title = WebInspector.UIString("Don't pause on exceptions.\nClick to Pause on all exceptions.");
this._registerShortcuts();
......@@ -401,9 +399,10 @@ WebInspector.ScriptsPanel.prototype = {
debuggerWasEnabled: function()
{
this._setPauseOnExceptions(WebInspector.settings.pauseOnExceptionState);
if (this._debuggerEnabled)
return;
this._debuggerEnabled = true;
this.reset(true);
},
......@@ -753,16 +752,21 @@ WebInspector.ScriptsPanel.prototype = {
this.resize();
},
updatePauseOnExceptionsState: function(pauseOnExceptionsState)
_setPauseOnExceptions: function(pauseOnExceptionsState)
{
if (pauseOnExceptionsState == WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions)
this._pauseOnExceptionButton.title = WebInspector.UIString("Don't pause on exceptions.\nClick to Pause on all exceptions.");
else if (pauseOnExceptionsState == WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnAllExceptions)
this._pauseOnExceptionButton.title = WebInspector.UIString("Pause on all exceptions.\nClick to Pause on uncaught exceptions.");
else if (pauseOnExceptionsState == WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions)
this._pauseOnExceptionButton.title = WebInspector.UIString("Pause on uncaught exceptions.\nClick to Not pause on exceptions.");
this._pauseOnExceptionButton.state = pauseOnExceptionsState;
function callback(pauseOnExceptionsState)
{
if (pauseOnExceptionsState == WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions)
this._pauseOnExceptionButton.title = WebInspector.UIString("Don't pause on exceptions.\nClick to Pause on all exceptions.");
else if (pauseOnExceptionsState == WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnAllExceptions)
this._pauseOnExceptionButton.title = WebInspector.UIString("Pause on all exceptions.\nClick to Pause on uncaught exceptions.");
else if (pauseOnExceptionsState == WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions)
this._pauseOnExceptionButton.title = WebInspector.UIString("Pause on uncaught exceptions.\nClick to Not pause on exceptions.");
this._pauseOnExceptionButton.state = pauseOnExceptionsState;
WebInspector.settings.pauseOnExceptionState = pauseOnExceptionsState;
}
InspectorBackend.setPauseOnExceptionsState(pauseOnExceptionsState, callback.bind(this));
},
_updateDebuggerButtons: function()
......@@ -869,7 +873,7 @@ WebInspector.ScriptsPanel.prototype = {
_togglePauseOnExceptions: function()
{
InspectorBackend.setPauseOnExceptionsState((this._pauseOnExceptionButton.state + 1) % this._pauseOnExceptionButton.states, this.updatePauseOnExceptionsState.bind(this));
this._setPauseOnExceptions((this._pauseOnExceptionButton.state + 1) % this._pauseOnExceptionButton.states);
},
_togglePause: function()
......
......@@ -65,6 +65,7 @@ WebInspector.Settings = function()
this.installApplicationSetting("showUserAgentStyles", true);
this.installApplicationSetting("watchExpressions", []);
this.installApplicationSetting("lastActivePanel", "elements");
this.installApplicationSetting("pauseOnExceptionState", WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions);
this.installProjectSetting("breakpoints", {});
this.installProjectSetting("nativeBreakpoints", []);
......
......@@ -604,8 +604,6 @@ WebInspector.doLoadedDone = function()
function populateInspectorState(inspectorState)
{
WebInspector.monitoringXHREnabled = inspectorState.monitoringXHREnabled;
if ("pauseOnExceptionsState" in inspectorState)
WebInspector.panels.scripts.updatePauseOnExceptionsState(inspectorState.pauseOnExceptionsState);
}
InspectorBackend.getInspectorState(populateInspectorState);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment