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

Unified Diff: webkit/glue/devtools/js/devtools.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 | « webkit/glue/devtools/js/debugger_agent.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/js/devtools.js
===================================================================
--- webkit/glue/devtools/js/devtools.js (revision 19931)
+++ webkit/glue/devtools/js/devtools.js (working copy)
@@ -883,12 +883,22 @@
WebInspector.Console.prototype.doEvalInWindow =
function(expression, callback) {
+ if (!expression ) {
+ // Empty expression should evaluate to the global object for completions to
+ // work.
+ expression = "this";
+ }
devtools.tools.evaluateJavaScript(expression, callback);
};
WebInspector.ScriptsPanel.prototype.doEvalInCallFrame =
function(callFrame, expression, callback) {
+ if (!expression) {
+ // Empty expression should eval to scope roots for completions to work.
+ devtools.CallFrame.getVariablesInScopeAsync(callFrame, callback);
+ return;
+ }
devtools.CallFrame.doEvalInCallFrame(callFrame, expression, callback);
};
« no previous file with comments | « webkit/glue/devtools/js/debugger_agent.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698