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

Unified Diff: webkit/glue/devtools/js/debugger_agent.js

Issue 155074: DevTools: Provisional support for global properties' and scope roots completi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/glue/devtools/js/devtools.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/js/debugger_agent.js
===================================================================
--- webkit/glue/devtools/js/debugger_agent.js (revision 19931)
+++ webkit/glue/devtools/js/debugger_agent.js (working copy)
@@ -1171,6 +1171,29 @@
/**
+ * Returns variables visible on a given callframe.
+ * @param {devtools.CallFrame} callFrame Call frame to get variables for.
+ * @param {function(Object):undefined} callback Callback to report result to.
+ */
+devtools.CallFrame.getVariablesInScopeAsync = function(callFrame, callback) {
+ var result = {};
+ var scopeChain = callFrame.scopeChain;
+ var resolvedScopeCount = 0;
+ for (var i = 0; i < scopeChain.length; ++i) {
+ devtools.tools.getDebuggerAgent().resolveScope(scopeChain[i],
+ function(scopeObject) {
+ for (var property in scopeObject.resolvedValue) {
+ result[property] = true;
+ }
+ if (++resolvedScopeCount == scopeChain.length) {
+ callback(result);
+ }
+ });
+ }
+};
+
+
+/**
* JSON based commands sent to v8 debugger.
* @param {string} command Name of the command to execute.
* @param {Object} opt_arguments Command-specific arguments map.
« no previous file with comments | « no previous file | webkit/glue/devtools/js/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698