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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js

Issue 1798143002: [DevTools] Removed __defineGetter__ from InjectedScriptSource.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
index 2713ce63b077c5fe97b529d1da3fb8862d35b1ed..c764e55d6e57c872fdf93c1384c731353602d1be 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -1555,9 +1555,6 @@ function CommandLineAPI(commandLineAPIImpl, callFrame)
*/
function inScopeVariables(member)
{
- if (!callFrame)
- return (member in inspectedGlobalObject);
-
var scopeChain = callFrame.scopeChain;
for (var i = 0; i < scopeChain.length; ++i) {
if (member in scopeChain[i])
@@ -1590,7 +1587,7 @@ function CommandLineAPI(commandLineAPIImpl, callFrame)
for (var i = 0; i < CommandLineAPI.members_.length; ++i) {
var member = CommandLineAPI.members_[i];
- if (inScopeVariables(member))
+ if (callFrame && inScopeVariables(member))
continue;
this[member] = bind(commandLineAPIImpl[member], commandLineAPIImpl);
@@ -1599,10 +1596,10 @@ function CommandLineAPI(commandLineAPIImpl, callFrame)
for (var i = 0; i < 5; ++i) {
var member = "$" + i;
- if (inScopeVariables(member))
+ if (callFrame && inScopeVariables(member))
continue;
- this.__defineGetter__("$" + i, bind(commandLineAPIImpl._inspectedObject, commandLineAPIImpl, i));
+ this[member] = bind(commandLineAPIImpl._inspectedObject, commandLineAPIImpl, i);
}
this.$_ = injectedScript._lastResult;

Powered by Google App Engine
This is Rietveld 408576698