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

Side by Side 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: Fixed comment 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 */ 118 */
119 debuggerEnabled: function() 119 debuggerEnabled: function()
120 { 120 {
121 return !!this._debuggerEnabled; 121 return !!this._debuggerEnabled;
122 }, 122 },
123 123
124 enableDebugger: function() 124 enableDebugger: function()
125 { 125 {
126 if (this._debuggerEnabled) 126 if (this._debuggerEnabled)
127 return; 127 return;
128 this._agent.enable(); 128 this._agent.enable(this._wasEnabled.bind(this));
129 this._debuggerEnabled = true;
130 if (this._hasStaleState) { 129 if (this._hasStaleState) {
131 this._globalObjectCleared(); 130 this._globalObjectCleared();
132 this._hasStaleState = false; 131 this._hasStaleState = false;
133 } 132 }
133 },
134
135 /**
136 * @param {?Protocol.Error} error
137 */
138 _wasEnabled: function(error)
139 {
140 if (error)
141 console.error(error);
142 this._debuggerEnabled = true;
134 this._pauseOnExceptionStateChanged(); 143 this._pauseOnExceptionStateChanged();
135 this.asyncStackTracesStateChanged(); 144 this.asyncStackTracesStateChanged();
136 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Debugger WasEnabled); 145 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Debugger WasEnabled);
137 }, 146 },
138 147
139 disableDebugger: function() 148 disableDebugger: function()
140 { 149 {
141 if (!this._debuggerEnabled) 150 if (!this._debuggerEnabled)
142 return; 151 return;
143 152
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 /** 1463 /**
1455 * @param {?WebInspector.Target} target 1464 * @param {?WebInspector.Target} target
1456 * @return {?WebInspector.DebuggerModel} 1465 * @return {?WebInspector.DebuggerModel}
1457 */ 1466 */
1458 WebInspector.DebuggerModel.fromTarget = function(target) 1467 WebInspector.DebuggerModel.fromTarget = function(target)
1459 { 1468 {
1460 if (!target || !target.hasJSContext()) 1469 if (!target || !target.hasJSContext())
1461 return null; 1470 return null;
1462 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); 1471 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel));
1463 } 1472 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698