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

Unified Diff: Source/bindings/tests/results/core/V8TestDictionary.cpp

Issue 568703002: IDL: Values for dictionaries should be a object, null or undefined (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove assertion and added a guard Created 6 years, 3 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: Source/bindings/tests/results/core/V8TestDictionary.cpp
diff --git a/Source/bindings/tests/results/core/V8TestDictionary.cpp b/Source/bindings/tests/results/core/V8TestDictionary.cpp
index 0d247f75fce624cc1e194214ccfe41f126ce22a5..06c4a55777c874c249cb999e5c62690d2f5a6ff2 100644
--- a/Source/bindings/tests/results/core/V8TestDictionary.cpp
+++ b/Source/bindings/tests/results/core/V8TestDictionary.cpp
@@ -17,6 +17,11 @@ namespace blink {
TestDictionary* V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Handle<v8::Value> v8Value, ExceptionState& exceptionState)
{
+ if (!isUndefinedOrNull(v8Value) && !v8Value->IsObject()) {
+ // Just returns 0. A TypeError will be thrown later.
+ return 0;
+ }
+
TestDictionary* impl = TestDictionary::create();
// FIXME: Do not use Dictionary and DictionaryHelper
// https://crbug.com/321462

Powered by Google App Engine
This is Rietveld 408576698