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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp

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/V8InjectedScriptHost.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
index 22767809e838f004bba312a4fbd7a93e65650bae..4eb458a3c2fb4bbf4dd1df8e58ea53520736c747 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
@@ -548,13 +548,24 @@ bool V8Debugger::isCommandLineAPIMethod(const String16& name)
if (methods.size() == 0) {
const char* members[] = { "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd",
"monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventListeners",
- "debug", "undebug", "monitor", "unmonitor", "table", "$_", "$0", "$1", "$2", "$3", "$4" };
+ "debug", "undebug", "monitor", "unmonitor", "table", "$_" };
for (size_t i = 0; i < sizeof(members) / sizeof(const char*); ++i)
methods.add(members[i]);
}
return methods.find(name) != methods.end();
}
+bool V8Debugger::isCommandLineAPIGetter(const String16& name)
+{
+ DEFINE_STATIC_LOCAL(protocol::HashSet<String16>, getters, ());
+ if (getters.size() == 0) {
+ const char* members[] = { "$0", "$1", "$2", "$3", "$4" };
+ for (size_t i = 0; i < sizeof(members) / sizeof(const char*); ++i)
+ getters.add(members[i]);
+ }
+ return getters.find(name) != getters.end();
+}
+
namespace {
char hiddenPropertyName[] = "v8inspector::InjectedScriptHost";

Powered by Google App Engine
This is Rietveld 408576698