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

Side by Side Diff: Source/devtools/front_end/sdk/DebuggerModel.js

Issue 1240373002: Revert of [DevTools] Remove edited scripts from debugger agent, move knowledge to frontend. (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 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(this._wasEnabled.bind(this)); 128 this._agent.enable();
129 this._debuggerEnabled = true;
129 if (this._hasStaleState) { 130 if (this._hasStaleState) {
130 this._globalObjectCleared(); 131 this._globalObjectCleared();
131 this._hasStaleState = false; 132 this._hasStaleState = false;
132 } 133 }
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;
143 this._pauseOnExceptionStateChanged(); 134 this._pauseOnExceptionStateChanged();
144 this.asyncStackTracesStateChanged(); 135 this.asyncStackTracesStateChanged();
145 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Debugger WasEnabled); 136 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Debugger WasEnabled);
146 }, 137 },
147 138
148 disableDebugger: function() 139 disableDebugger: function()
149 { 140 {
150 if (!this._debuggerEnabled) 141 if (!this._debuggerEnabled)
151 return; 142 return;
152 143
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 /** 1454 /**
1464 * @param {?WebInspector.Target} target 1455 * @param {?WebInspector.Target} target
1465 * @return {?WebInspector.DebuggerModel} 1456 * @return {?WebInspector.DebuggerModel}
1466 */ 1457 */
1467 WebInspector.DebuggerModel.fromTarget = function(target) 1458 WebInspector.DebuggerModel.fromTarget = function(target)
1468 { 1459 {
1469 if (!target || !target.hasJSContext()) 1460 if (!target || !target.hasJSContext())
1470 return null; 1461 return null;
1471 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); 1462 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel));
1472 } 1463 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/bindings/ResourceScriptMapping.js ('k') | Source/devtools/front_end/workspace/UISourceCode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698