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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp

Issue 765673005: IDL: Null values should be converted for non-nullable dictionary members (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: GN fix Created 6 years 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
« no previous file with comments | « Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "V8TestInterfaceEventInit.h" 8 #include "V8TestInterfaceEventInit.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 10 matching lines...) Expand all
21 return; 21 return;
22 } 22 }
23 23
24 V8EventInitDictionary::toImpl(isolate, v8Value, impl, exceptionState); 24 V8EventInitDictionary::toImpl(isolate, v8Value, impl, exceptionState);
25 if (exceptionState.hadException()) 25 if (exceptionState.hadException())
26 return; 26 return;
27 27
28 v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate); 28 v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate);
29 v8::TryCatch block; 29 v8::TryCatch block;
30 v8::Local<v8::Value> stringMemberValue = v8Object->Get(v8String(isolate, "st ringMember")); 30 v8::Local<v8::Value> stringMemberValue = v8Object->Get(v8String(isolate, "st ringMember"));
31 if (!stringMemberValue.IsEmpty() && !isUndefinedOrNull(stringMemberValue)) { 31 if (block.HasCaught()) {
32 exceptionState.rethrowV8Exception(block.Exception());
33 return;
34 }
35 if (stringMemberValue.IsEmpty() || stringMemberValue->IsUndefined()) {
36 // Do nothing.
37 } else {
32 TOSTRING_VOID(V8StringResource<>, stringMember, stringMemberValue); 38 TOSTRING_VOID(V8StringResource<>, stringMember, stringMemberValue);
33 impl.setStringMember(stringMember); 39 impl.setStringMember(stringMember);
34 } else if (block.HasCaught()) {
35 exceptionState.rethrowV8Exception(block.Exception());
36 return;
37 } 40 }
38 41
39 } 42 }
40 43
41 v8::Handle<v8::Value> toV8(const TestInterfaceEventInit& impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate) 44 v8::Handle<v8::Value> toV8(const TestInterfaceEventInit& impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate)
42 { 45 {
43 v8::Handle<v8::Object> v8Object = v8::Object::New(isolate); 46 v8::Handle<v8::Object> v8Object = v8::Object::New(isolate);
44 toV8EventInitDictionary(impl, v8Object, creationContext, isolate); 47 toV8EventInitDictionary(impl, v8Object, creationContext, isolate);
45 toV8TestInterfaceEventInit(impl, v8Object, creationContext, isolate); 48 toV8TestInterfaceEventInit(impl, v8Object, creationContext, isolate);
46 return v8Object; 49 return v8Object;
(...skipping 14 matching lines...) Expand all
61 } 64 }
62 65
63 TestInterfaceEventInit NativeValueTraits<TestInterfaceEventInit>::nativeValue(co nst v8::Handle<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exceptio nState) 66 TestInterfaceEventInit NativeValueTraits<TestInterfaceEventInit>::nativeValue(co nst v8::Handle<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exceptio nState)
64 { 67 {
65 TestInterfaceEventInit impl; 68 TestInterfaceEventInit impl;
66 V8TestInterfaceEventInit::toImpl(isolate, value, impl, exceptionState); 69 V8TestInterfaceEventInit::toImpl(isolate, value, impl, exceptionState);
67 return impl; 70 return impl;
68 } 71 }
69 72
70 } // namespace blink 73 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698