Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: Source/devtools/front_end/sdk/DebuggerModel.js

Issue 1238103002: [DevTools] Do not report edited resources via Page.getResourceContent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/sdk/DebuggerModel.js
diff --git a/Source/devtools/front_end/sdk/DebuggerModel.js b/Source/devtools/front_end/sdk/DebuggerModel.js
index 9e18b1813515fff702b90322aabb23567c536800..3596de6bd2a2008bf7fe160f99760c2b1fadf10f 100644
--- a/Source/devtools/front_end/sdk/DebuggerModel.js
+++ b/Source/devtools/front_end/sdk/DebuggerModel.js
@@ -125,14 +125,23 @@ WebInspector.DebuggerModel.prototype = {
{
if (this._debuggerEnabled)
return;
- this._agent.enable();
- this._debuggerEnabled = true;
+ this._agent.enable(this._wasEnabled.bind(this));
if (this._hasStaleState) {
this._globalObjectCleared();
this._hasStaleState = false;
}
this._pauseOnExceptionStateChanged();
yurys 2015/07/16 16:30:35 I'd expect all of these code to be executed after
dgozman 2015/07/17 14:39:16 Done.
this.asyncStackTracesStateChanged();
+ },
+
+ /**
+ * @param {?Protocol.Error} error
+ */
+ _wasEnabled: function(error)
+ {
+ if (error)
+ console.error(error);
+ this._debuggerEnabled = true;
this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.DebuggerWasEnabled);
},

Powered by Google App Engine
This is Rietveld 408576698