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

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

Issue 149174: DevTools: do console evaluations in the global context of the inspected window (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/js/inject.js
===================================================================
--- webkit/glue/devtools/js/inject.js (revision 19808)
+++ webkit/glue/devtools/js/inject.js (working copy)
@@ -544,7 +544,8 @@
*/
devtools.Injected.prototype.evaluate = function(expression) {
try {
- return [ this.wrapConsoleObject(window.eval(expression)), false ];
+ // Evaluate the expression in the global context of the inspected window.
+ return [ this.wrapConsoleObject(contentWindow.eval(expression)), false ];
} catch (e) {
return [ e.toString(), true ];
}
« 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