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

Side by Side Diff: webkit/glue/devtools/js/debugger_agent.js

Issue 140059: DevTools: Mute aftercompile events until 'scripts' result is ready.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Provides communication interface to remote v8 debugger. See 6 * @fileoverview Provides communication interface to remote v8 debugger. See
7 * protocol decription at http://code.google.com/p/v8/wiki/DebuggerProtocol 7 * protocol decription at http://code.google.com/p/v8/wiki/DebuggerProtocol
8 */ 8 */
9 goog.provide('devtools.DebuggerAgent'); 9 goog.provide('devtools.DebuggerAgent');
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 /** 93 /**
94 * Resets debugger agent to its initial state. 94 * Resets debugger agent to its initial state.
95 */ 95 */
96 devtools.DebuggerAgent.prototype.reset = function() { 96 devtools.DebuggerAgent.prototype.reset = function() {
97 this.scriptsCacheInitialized_ = false; 97 this.scriptsCacheInitialized_ = false;
98 this.contextId_ = null; 98 this.contextId_ = null;
99 this.parsedScripts_ = {}; 99 this.parsedScripts_ = {};
100 this.requestNumberToBreakpointInfo_ = {}; 100 this.requestNumberToBreakpointInfo_ = {};
101 this.currentCallFrame_ = null; 101 this.currentCallFrame_ = null;
102 this.requestSeqToCallback_ = {}; 102 this.requestSeqToCallback_ = {};
103 103 if (WebInspector.panels &&
104 WebInspector.panels.scripts.element.parentElement) {
105 // Scripts panel has been enabled already.
106 devtools.tools.getDebuggerAgent().initializeScriptsCache();
107 }
108
104 // Profiler isn't reset because it contains no data that is 109 // Profiler isn't reset because it contains no data that is
105 // specific for a particular V8 instance. All such data is 110 // specific for a particular V8 instance. All such data is
106 // managed by an agent on the Render's side. 111 // managed by an agent on the Render's side.
107 }; 112 };
108 113
109 114
110 /** 115 /**
111 * Requests scripts list if it has not been requested yet. 116 * Requests scripts list if it has not been requested yet.
112 */ 117 */
113 devtools.DebuggerAgent.prototype.initializeScriptsCache = function() { 118 devtools.DebuggerAgent.prototype.initializeScriptsCache = function() {
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 if (breakpointInfo.isRemoved()) { 667 if (breakpointInfo.isRemoved()) {
663 this.requestClearBreakpoint_(idInV8); 668 this.requestClearBreakpoint_(idInV8);
664 } 669 }
665 }; 670 };
666 671
667 672
668 /** 673 /**
669 * @param {devtools.DebuggerMessage} msg 674 * @param {devtools.DebuggerMessage} msg
670 */ 675 */
671 devtools.DebuggerAgent.prototype.handleAfterCompileEvent_ = function(msg) { 676 devtools.DebuggerAgent.prototype.handleAfterCompileEvent_ = function(msg) {
677 if (!this.scriptsCacheInitialized_) {
678 // Ignore scripts delta if main request has not been issued yet.
679 return;
680 }
672 var script = msg.getBody().script; 681 var script = msg.getBody().script;
673 // Ignore scripts from other tabs. 682 // Ignore scripts from other tabs.
674 if (!this.isScriptFromInspectedContext_(script, msg)) { 683 if (!this.isScriptFromInspectedContext_(script, msg)) {
675 return; 684 return;
676 } 685 }
677 this.addScriptInfo_(script, msg); 686 this.addScriptInfo_(script, msg);
678 }; 687 };
679 688
680 689
681 /** 690 /**
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 1240
1232 1241
1233 /** 1242 /**
1234 * @param {number} handle Object handle. 1243 * @param {number} handle Object handle.
1235 * @return {?Object} Returns the object with the handle if it was sent in this 1244 * @return {?Object} Returns the object with the handle if it was sent in this
1236 * message(some objects referenced by handles may be missing in the message). 1245 * message(some objects referenced by handles may be missing in the message).
1237 */ 1246 */
1238 devtools.DebuggerMessage.prototype.lookup = function(handle) { 1247 devtools.DebuggerMessage.prototype.lookup = function(handle) {
1239 return this.refs_[handle]; 1248 return this.refs_[handle];
1240 }; 1249 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698