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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestDictionary.h" 8 #include "V8TestDictionary.h"
9 9
10 #include "bindings/core/v8/Dictionary.h" 10 #include "bindings/core/v8/Dictionary.h"
11 #include "bindings/core/v8/ExceptionState.h" 11 #include "bindings/core/v8/ExceptionState.h"
12 #include "bindings/core/v8/V8TestInterface.h" 12 #include "bindings/core/v8/V8TestInterface.h"
13 #include "bindings/core/v8/V8TestInterfaceGarbageCollected.h" 13 #include "bindings/core/v8/V8TestInterfaceGarbageCollected.h"
14 #include "bindings/core/v8/V8TestInterfaceWillBeGarbageCollected.h" 14 #include "bindings/core/v8/V8TestInterfaceWillBeGarbageCollected.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 TestDictionary* V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Handle<v8::Va lue> v8Value, ExceptionState& exceptionState) 18 TestDictionary* V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Handle<v8::Va lue> v8Value, ExceptionState& exceptionState)
19 { 19 {
20 if (!isUndefinedOrNull(v8Value) && !v8Value->IsObject()) {
21 // Just returns 0. A TypeError will be thrown later.
22 return 0;
23 }
24
20 TestDictionary* impl = TestDictionary::create(); 25 TestDictionary* impl = TestDictionary::create();
21 // FIXME: Do not use Dictionary and DictionaryHelper 26 // FIXME: Do not use Dictionary and DictionaryHelper
22 // https://crbug.com/321462 27 // https://crbug.com/321462
23 Dictionary dictionary(v8Value, isolate); 28 Dictionary dictionary(v8Value, isolate);
24 // FIXME: Remove this v8::TryCatch once the code is switched from 29 // FIXME: Remove this v8::TryCatch once the code is switched from
25 // Dictionary/DictionaryHelper to something that uses ExceptionState. 30 // Dictionary/DictionaryHelper to something that uses ExceptionState.
26 v8::TryCatch block; 31 v8::TryCatch block;
27 bool booleanMember; 32 bool booleanMember;
28 if (DictionaryHelper::getWithUndefinedOrNullCheck(dictionary, "booleanMember ", booleanMember)) { 33 if (DictionaryHelper::getWithUndefinedOrNullCheck(dictionary, "booleanMember ", booleanMember)) {
29 impl->setBooleanMember(booleanMember); 34 impl->setBooleanMember(booleanMember);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 if (impl->hasTestInterfaceOrNullMember()) 171 if (impl->hasTestInterfaceOrNullMember())
167 v8Object->Set(v8String(isolate, "testInterfaceOrNullMember"), toV8(impl- >testInterfaceOrNullMember(), creationContext, isolate)); 172 v8Object->Set(v8String(isolate, "testInterfaceOrNullMember"), toV8(impl- >testInterfaceOrNullMember(), creationContext, isolate));
168 if (impl->hasTestInterfaceWillBeGarbageCollectedMember()) 173 if (impl->hasTestInterfaceWillBeGarbageCollectedMember())
169 v8Object->Set(v8String(isolate, "testInterfaceWillBeGarbageCollectedMemb er"), toV8(impl->testInterfaceWillBeGarbageCollectedMember(), creationContext, i solate)); 174 v8Object->Set(v8String(isolate, "testInterfaceWillBeGarbageCollectedMemb er"), toV8(impl->testInterfaceWillBeGarbageCollectedMember(), creationContext, i solate));
170 if (impl->hasTestInterfaceWillBeGarbageCollectedOrNullMember()) 175 if (impl->hasTestInterfaceWillBeGarbageCollectedOrNullMember())
171 v8Object->Set(v8String(isolate, "testInterfaceWillBeGarbageCollectedOrNu llMember"), toV8(impl->testInterfaceWillBeGarbageCollectedOrNullMember(), creati onContext, isolate)); 176 v8Object->Set(v8String(isolate, "testInterfaceWillBeGarbageCollectedOrNu llMember"), toV8(impl->testInterfaceWillBeGarbageCollectedOrNullMember(), creati onContext, isolate));
172 return v8Object; 177 return v8Object;
173 } 178 }
174 179
175 } // namespace blink 180 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698