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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 1967453002: Always check that a Name is a String before converting it. (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
Index: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
index 7af861c21e587c3cbb666b5bdb9f4a70facdfb43..40017926e7ec1b6624cba135bab9bc025993a1fd 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -282,6 +282,8 @@ static bool namedPropertyFromDebuggerScopeExtension(v8::Local<v8::Name> name, co
void V8Window::namedPropertyGetterCustom(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
+ if (!name->IsString())
+ return;
auto nameString = name.As<v8::String>();
DOMWindow* window = V8Window::toImpl(info.Holder());
if (!window)

Powered by Google App Engine
This is Rietveld 408576698