| 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 "V8TestDictionaryDerived.h" | 8 #include "V8TestDictionaryDerived.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 if (!derivedStringMemberWithDefaultValue.IsEmpty() && !isUndefinedOrNull(der
ivedStringMemberWithDefaultValue)) { | 40 if (!derivedStringMemberWithDefaultValue.IsEmpty() && !isUndefinedOrNull(der
ivedStringMemberWithDefaultValue)) { |
| 41 TOSTRING_VOID(V8StringResource<>, derivedStringMemberWithDefault, derive
dStringMemberWithDefaultValue); | 41 TOSTRING_VOID(V8StringResource<>, derivedStringMemberWithDefault, derive
dStringMemberWithDefaultValue); |
| 42 impl.setDerivedStringMemberWithDefault(derivedStringMemberWithDefault); | 42 impl.setDerivedStringMemberWithDefault(derivedStringMemberWithDefault); |
| 43 } else if (block.HasCaught()) { | 43 } else if (block.HasCaught()) { |
| 44 exceptionState.rethrowV8Exception(block.Exception()); | 44 exceptionState.rethrowV8Exception(block.Exception()); |
| 45 return; | 45 return; |
| 46 } | 46 } |
| 47 | 47 |
| 48 } | 48 } |
| 49 | 49 |
| 50 v8::Handle<v8::Value> toV8(TestDictionaryDerivedImplementedAs& impl, v8::Handle<
v8::Object> creationContext, v8::Isolate* isolate) | 50 v8::Handle<v8::Value> toV8(const TestDictionaryDerivedImplementedAs& impl, v8::H
andle<v8::Object> creationContext, v8::Isolate* isolate) |
| 51 { | 51 { |
| 52 v8::Handle<v8::Object> v8Object = v8::Object::New(isolate); | 52 v8::Handle<v8::Object> v8Object = v8::Object::New(isolate); |
| 53 toV8TestDictionary(impl, v8Object, creationContext, isolate); | 53 toV8TestDictionary(impl, v8Object, creationContext, isolate); |
| 54 toV8TestDictionaryDerivedImplementedAs(impl, v8Object, creationContext, isol
ate); | 54 toV8TestDictionaryDerivedImplementedAs(impl, v8Object, creationContext, isol
ate); |
| 55 return v8Object; | 55 return v8Object; |
| 56 } | 56 } |
| 57 | 57 |
| 58 void toV8TestDictionaryDerivedImplementedAs(TestDictionaryDerivedImplementedAs&
impl, v8::Handle<v8::Object> dictionary, v8::Handle<v8::Object> creationContext,
v8::Isolate* isolate) | 58 template<> |
| 59 v8::Handle<v8::Value> toV8NoInline(const TestDictionaryDerivedImplementedAs* imp
l, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 60 { |
| 61 return toV8(*impl, creationContext, isolate); |
| 62 } |
| 63 |
| 64 void toV8TestDictionaryDerivedImplementedAs(const TestDictionaryDerivedImplement
edAs& impl, v8::Handle<v8::Object> dictionary, v8::Handle<v8::Object> creationCo
ntext, v8::Isolate* isolate) |
| 59 { | 65 { |
| 60 if (impl.hasDerivedStringMember()) { | 66 if (impl.hasDerivedStringMember()) { |
| 61 dictionary->Set(v8String(isolate, "derivedStringMember"), v8String(isola
te, impl.derivedStringMember())); | 67 dictionary->Set(v8String(isolate, "derivedStringMember"), v8String(isola
te, impl.derivedStringMember())); |
| 62 } | 68 } |
| 63 | 69 |
| 64 if (impl.hasDerivedStringMemberWithDefault()) { | 70 if (impl.hasDerivedStringMemberWithDefault()) { |
| 65 dictionary->Set(v8String(isolate, "derivedStringMemberWithDefault"), v8S
tring(isolate, impl.derivedStringMemberWithDefault())); | 71 dictionary->Set(v8String(isolate, "derivedStringMemberWithDefault"), v8S
tring(isolate, impl.derivedStringMemberWithDefault())); |
| 66 } else { | 72 } else { |
| 67 dictionary->Set(v8String(isolate, "derivedStringMemberWithDefault"), v8S
tring(isolate, String("default string value"))); | 73 dictionary->Set(v8String(isolate, "derivedStringMemberWithDefault"), v8S
tring(isolate, String("default string value"))); |
| 68 } | 74 } |
| 69 | 75 |
| 70 } | 76 } |
| 71 | 77 |
| 78 TestDictionaryDerivedImplementedAs NativeValueTraits<TestDictionaryDerivedImplem
entedAs>::nativeValue(const v8::Handle<v8::Value>& value, v8::Isolate* isolate,
ExceptionState& exceptionState) |
| 79 { |
| 80 TestDictionaryDerivedImplementedAs impl; |
| 81 V8TestDictionaryDerivedImplementedAs::toImpl(isolate, value, impl, exception
State); |
| 82 return impl; |
| 83 } |
| 84 |
| 72 } // namespace blink | 85 } // namespace blink |
| OLD | NEW |