| OLD | NEW |
| 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 17 matching lines...) Expand all Loading... |
| 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 (block.HasCaught()) { | 31 if (block.HasCaught()) { |
| 32 exceptionState.rethrowV8Exception(block.Exception()); | 32 exceptionState.rethrowV8Exception(block.Exception()); |
| 33 return; | 33 return; |
| 34 } | 34 } |
| 35 if (stringMemberValue.IsEmpty() || stringMemberValue->IsUndefined()) { | 35 if (stringMemberValue.IsEmpty() || stringMemberValue->IsUndefined()) { |
| 36 // Do nothing. | 36 // Do nothing. |
| 37 } else { | 37 } else { |
| 38 TOSTRING_VOID(V8StringResource<>, stringMember, stringMemberValue); | 38 V8StringResource<> stringMember = stringMemberValue; |
| 39 if (!stringMember.prepare(exceptionState)) |
| 40 return; |
| 39 impl.setStringMember(stringMember); | 41 impl.setStringMember(stringMember); |
| 40 } | 42 } |
| 41 | 43 |
| 42 } | 44 } |
| 43 | 45 |
| 44 v8::Local<v8::Value> toV8(const TestInterfaceEventInit& impl, v8::Local<v8::Obje
ct> creationContext, v8::Isolate* isolate) | 46 v8::Local<v8::Value> toV8(const TestInterfaceEventInit& impl, v8::Local<v8::Obje
ct> creationContext, v8::Isolate* isolate) |
| 45 { | 47 { |
| 46 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); | 48 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); |
| 47 toV8EventInitDictionary(impl, v8Object, creationContext, isolate); | 49 toV8EventInitDictionary(impl, v8Object, creationContext, isolate); |
| 48 toV8TestInterfaceEventInit(impl, v8Object, creationContext, isolate); | 50 toV8TestInterfaceEventInit(impl, v8Object, creationContext, isolate); |
| 49 return v8Object; | 51 return v8Object; |
| 50 } | 52 } |
| 51 | 53 |
| 52 void toV8TestInterfaceEventInit(const TestInterfaceEventInit& impl, v8::Local<v8
::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* isolat
e) | 54 void toV8TestInterfaceEventInit(const TestInterfaceEventInit& impl, v8::Local<v8
::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* isolat
e) |
| 53 { | 55 { |
| 54 if (impl.hasStringMember()) { | 56 if (impl.hasStringMember()) { |
| 55 dictionary->Set(v8String(isolate, "stringMember"), v8String(isolate, imp
l.stringMember())); | 57 dictionary->Set(v8String(isolate, "stringMember"), v8String(isolate, imp
l.stringMember())); |
| 56 } | 58 } |
| 57 | 59 |
| 58 } | 60 } |
| 59 | 61 |
| 60 TestInterfaceEventInit NativeValueTraits<TestInterfaceEventInit>::nativeValue(co
nst v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exception
State) | 62 TestInterfaceEventInit NativeValueTraits<TestInterfaceEventInit>::nativeValue(co
nst v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exception
State) |
| 61 { | 63 { |
| 62 TestInterfaceEventInit impl; | 64 TestInterfaceEventInit impl; |
| 63 V8TestInterfaceEventInit::toImpl(isolate, value, impl, exceptionState); | 65 V8TestInterfaceEventInit::toImpl(isolate, value, impl, exceptionState); |
| 64 return impl; | 66 return impl; |
| 65 } | 67 } |
| 66 | 68 |
| 67 } // namespace blink | 69 } // namespace blink |
| OLD | NEW |