Commit aace956a authored by sergeyv@chromium.org's avatar sergeyv@chromium.org

DevTools: Support properly multiple targets in sources panel

BUG=

Review URL: https://codereview.chromium.org/341803002

git-svn-id: svn://svn.chromium.org/blink/trunk@176541 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e5cb6961
......@@ -114,7 +114,7 @@ InspectorTest.waitUntilResumed = function(callback)
InspectorTest.resumeExecution = function(callback)
{
if (WebInspector.panels.sources.paused)
if (WebInspector.panels.sources.paused())
WebInspector.panels.sources.togglePause();
InspectorTest.waitUntilResumed(callback);
};
......
......@@ -51,6 +51,7 @@ WebInspector.DebuggerModel = function(target)
/** @type {!WebInspector.Object} */
this._breakpointResolvedEventTarget = new WebInspector.Object();
this._isPausing = false;
WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(this._pauseOnExceptionStateChanged, this);
WebInspector.settings.pauseOnCaughtException.addChangeListener(this._pauseOnExceptionStateChanged, this);
......@@ -190,6 +191,7 @@ WebInspector.DebuggerModel.prototype = {
_debuggerWasDisabled: function()
{
this._debuggerEnabled = false;
this._isPausing = false;
this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.DebuggerWasDisabled);
},
......@@ -239,6 +241,14 @@ WebInspector.DebuggerModel.prototype = {
this._agent.resume();
}
this._agent.setOverlayMessage(undefined, callback.bind(this));
this._isPausing = false;
},
pause: function()
{
this._isPausing = true;
this.skipAllPauses(false);
this._agent.pause();
},
/**
......@@ -435,6 +445,7 @@ WebInspector.DebuggerModel.prototype = {
*/
_setDebuggerPausedDetails: function(debuggerPausedDetails)
{
this._isPausing = false;
if (this._debuggerPausedDetails)
this._debuggerPausedDetails.dispose();
this._debuggerPausedDetails = debuggerPausedDetails;
......@@ -547,6 +558,14 @@ WebInspector.DebuggerModel.prototype = {
return !!this.debuggerPausedDetails();
},
/**
* @return {boolean}
*/
isPausing: function()
{
return this._isPausing;
},
/**
* @param {?WebInspector.DebuggerModel.CallFrame} callFrame
*/
......
......@@ -825,7 +825,7 @@ WebInspector.JavaScriptSourceFrame.prototype = {
if (!executionContext)
return;
var rawLocation = /** @type {!WebInspector.DebuggerModel.Location} */ (this._uiSourceCode.uiLocationToRawLocation(executionContext.target(), lineNumber, 0));
rawLocation.continueToLocation();
this._scriptsPanel.continueToLocation(rawLocation);
},
dispose: function()
......
......@@ -52,6 +52,7 @@ WebInspector.WatchExpressionsSidebarPane = function()
addButton.title = WebInspector.UIString("Add watch expression");
this._requiresUpdate = true;
WebInspector.context.addFlavorChangeListener(WebInspector.ExecutionContext ,this.refreshExpressions, this);
}
WebInspector.WatchExpressionsSidebarPane.prototype = {
......@@ -60,11 +61,6 @@ WebInspector.WatchExpressionsSidebarPane.prototype = {
this._refreshExpressionsIfNeeded();
},
reset: function()
{
this.refreshExpressions();
},
refreshExpressions: function()
{
this._requiresUpdate = true;
......
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