OLD | NEW |
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // specific for a particular V8 instance. All such data is | 147 // specific for a particular V8 instance. All such data is |
148 // managed by an agent on the Render's side. | 148 // managed by an agent on the Render's side. |
149 }; | 149 }; |
150 | 150 |
151 | 151 |
152 /** | 152 /** |
153 * Initializes scripts UI. This method is called every time Scripts panel | 153 * Initializes scripts UI. This method is called every time Scripts panel |
154 * is shown. It will send request for context id if it's not set yet. | 154 * is shown. It will send request for context id if it's not set yet. |
155 */ | 155 */ |
156 devtools.DebuggerAgent.prototype.initUI = function() { | 156 devtools.DebuggerAgent.prototype.initUI = function() { |
157 // There can be a number of scripts from after-compile events that are | |
158 // pending addition into the UI. | |
159 for (var scriptId in this.parsedScripts_) { | |
160 var script = this.parsedScripts_[scriptId]; | |
161 WebInspector.parsedScriptSource(scriptId, script.getUrl(), | |
162 undefined /* script source */, script.getLineOffset()); | |
163 } | |
164 | |
165 // Initialize scripts cache when Scripts panel is shown first time. | 157 // Initialize scripts cache when Scripts panel is shown first time. |
166 if (this.scriptsCacheInitialized_) { | 158 if (this.scriptsCacheInitialized_) { |
167 return; | 159 return; |
168 } | 160 } |
169 this.scriptsCacheInitialized_ = true; | 161 this.scriptsCacheInitialized_ = true; |
170 if (this.contextId_) { | 162 if (this.contextId_) { |
171 // We already have context id. This means that we are here from the | 163 // We already have context id. This means that we are here from the |
172 // very beginning of the page load cycle and hence will get all scripts | 164 // very beginning of the page load cycle and hence will get all scripts |
173 // via after-compile events. No need to request scripts for this session. | 165 // via after-compile events. No need to request scripts for this session. |
174 return; | 166 return; |
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 | 1473 |
1482 | 1474 |
1483 /** | 1475 /** |
1484 * @param {number} handle Object handle. | 1476 * @param {number} handle Object handle. |
1485 * @return {?Object} Returns the object with the handle if it was sent in this | 1477 * @return {?Object} Returns the object with the handle if it was sent in this |
1486 * message(some objects referenced by handles may be missing in the message). | 1478 * message(some objects referenced by handles may be missing in the message). |
1487 */ | 1479 */ |
1488 devtools.DebuggerMessage.prototype.lookup = function(handle) { | 1480 devtools.DebuggerMessage.prototype.lookup = function(handle) { |
1489 return this.refs_[handle]; | 1481 return this.refs_[handle]; |
1490 }; | 1482 }; |
OLD | NEW |