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

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

Issue 200039: DevTools: provisional support for scopes of type 'Catch' (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 106
107 /** 107 /**
108 * A copy of the scope types from v8/src/mirror-delay.js 108 * A copy of the scope types from v8/src/mirror-delay.js
109 * @enum {number} 109 * @enum {number}
110 */ 110 */
111 devtools.DebuggerAgent.ScopeType = { 111 devtools.DebuggerAgent.ScopeType = {
112 Global: 0, 112 Global: 0,
113 Local: 1, 113 Local: 1,
114 With: 2, 114 With: 2,
115 Closure: 3 115 Closure: 3,
116 Catch: 4
116 }; 117 };
117 118
118 119
119 /** 120 /**
120 * A copy of enum from include/v8.h 121 * A copy of enum from include/v8.h
121 * @enum {number} 122 * @enum {number}
122 */ 123 */
123 devtools.DebuggerAgent.ProfilerModules = { 124 devtools.DebuggerAgent.ProfilerModules = {
124 PROFILER_MODULE_NONE: 0, 125 PROFILER_MODULE_NONE: 0,
125 PROFILER_MODULE_CPU: 1, 126 PROFILER_MODULE_CPU: 1,
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 switch(scope.type) { 1041 switch(scope.type) {
1041 case ScopeType.Global: 1042 case ScopeType.Global:
1042 scopeObjectProxy.isDocument = true; 1043 scopeObjectProxy.isDocument = true;
1043 break; 1044 break;
1044 case ScopeType.Local: 1045 case ScopeType.Local:
1045 scopeObjectProxy.isLocal = true; 1046 scopeObjectProxy.isLocal = true;
1046 scopeObjectProxy.thisObject = 1047 scopeObjectProxy.thisObject =
1047 devtools.DebuggerAgent.formatObjectProxy_(stackFrame.receiver); 1048 devtools.DebuggerAgent.formatObjectProxy_(stackFrame.receiver);
1048 break; 1049 break;
1049 case ScopeType.With: 1050 case ScopeType.With:
1051 // Catch scope is treated as a regular with scope by WebKit so we
1052 // also treat it this way.
1053 case ScopeType.Catch:
1050 scopeObjectProxy.isWithBlock = true; 1054 scopeObjectProxy.isWithBlock = true;
1051 break; 1055 break;
1052 case ScopeType.Closure: 1056 case ScopeType.Closure:
1053 scopeObjectProxy.isClosure = true; 1057 scopeObjectProxy.isClosure = true;
1054 break; 1058 break;
1055 } 1059 }
1056 scopeChain.push(scopeObjectProxy); 1060 scopeChain.push(scopeObjectProxy);
1057 } 1061 }
1058 return new devtools.CallFrame(stackFrame.index, 'function', funcName, 1062 return new devtools.CallFrame(stackFrame.index, 'function', funcName,
1059 sourceId, line, scopeChain); 1063 sourceId, line, scopeChain);
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 1481
1478 1482
1479 /** 1483 /**
1480 * @param {number} handle Object handle. 1484 * @param {number} handle Object handle.
1481 * @return {?Object} Returns the object with the handle if it was sent in this 1485 * @return {?Object} Returns the object with the handle if it was sent in this
1482 * message(some objects referenced by handles may be missing in the message). 1486 * message(some objects referenced by handles may be missing in the message).
1483 */ 1487 */
1484 devtools.DebuggerMessage.prototype.lookup = function(handle) { 1488 devtools.DebuggerMessage.prototype.lookup = function(handle) {
1485 return this.refs_[handle]; 1489 return this.refs_[handle];
1486 }; 1490 };
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