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

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

Issue 1950303004: [DevTools] Add additional accessor check in InjectedScriptSource.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 af0a99d9003e1cc739b226463f7c4f8ac6916eff..64a4b5c5eea10841e24c3f0208c79f2c1ff5ff6e 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
@@ -67,9 +67,13 @@ void V8InjectedScriptHost::internalConstructorNameCallback(const v8::FunctionCal
void V8InjectedScriptHost::formatAccessorsAsProperties(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- if (info.Length() < 1)
+ DCHECK_EQ(info.Length(), 2);
+ info.GetReturnValue().Set(false);
+ if (!info[1]->IsFunction())
+ return;
+ // Check that function is user-defined.
+ if (info[1].As<v8::Function>()->ScriptId() != v8::UnboundScript::kNoScriptId)
return;
-
info.GetReturnValue().Set(unwrapDebugger(info)->client()->formatAccessorsAsProperties(info[0]));
}
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698