| 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 "V8TestDictionary.h" | 8 #include "V8TestDictionary.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/Dictionary.h" |
| 10 #include "bindings/core/v8/ExceptionState.h" | 11 #include "bindings/core/v8/ExceptionState.h" |
| 11 #include "bindings/core/v8/ScriptValue.h" | 12 #include "bindings/core/v8/ScriptValue.h" |
| 12 #include "bindings/core/v8/UnionTypesCore.h" | 13 #include "bindings/core/v8/UnionTypesCore.h" |
| 13 #include "bindings/core/v8/V8ArrayBufferView.h" | 14 #include "bindings/core/v8/V8ArrayBufferView.h" |
| 14 #include "bindings/core/v8/V8Element.h" | 15 #include "bindings/core/v8/V8Element.h" |
| 15 #include "bindings/core/v8/V8EventTarget.h" | 16 #include "bindings/core/v8/V8EventTarget.h" |
| 16 #include "bindings/core/v8/V8InternalDictionary.h" | 17 #include "bindings/core/v8/V8InternalDictionary.h" |
| 17 #include "bindings/core/v8/V8TestInterface.h" | 18 #include "bindings/core/v8/V8TestInterface.h" |
| 18 #include "bindings/core/v8/V8TestInterface2.h" | 19 #include "bindings/core/v8/V8TestInterface2.h" |
| 19 #include "bindings/core/v8/V8TestInterfaceGarbageCollected.h" | 20 #include "bindings/core/v8/V8TestInterfaceGarbageCollected.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 } else { | 97 } else { |
| 97 UseCounter::countDeprecationIfNotPrivateScript(isolate, callingExecu
tionContext(isolate), UseCounter::CreateMember); | 98 UseCounter::countDeprecationIfNotPrivateScript(isolate, callingExecu
tionContext(isolate), UseCounter::CreateMember); |
| 98 bool deprecatedCreateMember = toBoolean(isolate, deprecatedCreateMem
berValue, exceptionState); | 99 bool deprecatedCreateMember = toBoolean(isolate, deprecatedCreateMem
berValue, exceptionState); |
| 99 if (exceptionState.hadException()) | 100 if (exceptionState.hadException()) |
| 100 return; | 101 return; |
| 101 impl.setCreateMember(deprecatedCreateMember); | 102 impl.setCreateMember(deprecatedCreateMember); |
| 102 } | 103 } |
| 103 } | 104 } |
| 104 | 105 |
| 105 { | 106 { |
| 107 v8::Local<v8::Value> dictionaryMemberValue; |
| 108 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "dict
ionaryMember")).ToLocal(&dictionaryMemberValue)) { |
| 109 exceptionState.rethrowV8Exception(block.Exception()); |
| 110 return; |
| 111 } |
| 112 if (dictionaryMemberValue.IsEmpty() || dictionaryMemberValue->IsUndefine
d()) { |
| 113 // Do nothing. |
| 114 } else { |
| 115 Dictionary dictionaryMember = Dictionary(dictionaryMemberValue, isol
ate, exceptionState); |
| 116 if (exceptionState.hadException()) |
| 117 return; |
| 118 if (!dictionaryMember.isObject()) { |
| 119 exceptionState.throwTypeError("member dictionaryMember is not an
object."); |
| 120 return; |
| 121 } |
| 122 impl.setDictionaryMember(dictionaryMember); |
| 123 } |
| 124 } |
| 125 |
| 126 { |
| 106 v8::Local<v8::Value> doubleOrNullMemberValue; | 127 v8::Local<v8::Value> doubleOrNullMemberValue; |
| 107 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "doub
leOrNullMember")).ToLocal(&doubleOrNullMemberValue)) { | 128 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "doub
leOrNullMember")).ToLocal(&doubleOrNullMemberValue)) { |
| 108 exceptionState.rethrowV8Exception(block.Exception()); | 129 exceptionState.rethrowV8Exception(block.Exception()); |
| 109 return; | 130 return; |
| 110 } | 131 } |
| 111 if (doubleOrNullMemberValue.IsEmpty() || doubleOrNullMemberValue->IsUnde
fined()) { | 132 if (doubleOrNullMemberValue.IsEmpty() || doubleOrNullMemberValue->IsUnde
fined()) { |
| 112 // Do nothing. | 133 // Do nothing. |
| 113 } else if (doubleOrNullMemberValue->IsNull()) { | 134 } else if (doubleOrNullMemberValue->IsNull()) { |
| 114 impl.setDoubleOrNullMemberToNull(); | 135 impl.setDoubleOrNullMemberToNull(); |
| 115 } else { | 136 } else { |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 if (impl.hasCreateMember()) { | 670 if (impl.hasCreateMember()) { |
| 650 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "create"), v8Boolean(impl.createMember(), isolate)))) | 671 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "create"), v8Boolean(impl.createMember(), isolate)))) |
| 651 return false; | 672 return false; |
| 652 } | 673 } |
| 653 | 674 |
| 654 if (impl.hasCreateMember()) { | 675 if (impl.hasCreateMember()) { |
| 655 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "deprecatedCreateMember"), v8Boolean(impl.createMember
(), isolate)))) | 676 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "deprecatedCreateMember"), v8Boolean(impl.createMember
(), isolate)))) |
| 656 return false; | 677 return false; |
| 657 } | 678 } |
| 658 | 679 |
| 680 if (impl.hasDictionaryMember()) { |
| 681 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "dictionaryMember"), impl.dictionaryMember().v8Value()
))) |
| 682 return false; |
| 683 } |
| 684 |
| 659 if (impl.hasDoubleOrNullMember()) { | 685 if (impl.hasDoubleOrNullMember()) { |
| 660 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "doubleOrNullMember"), v8::Number::New(isolate, impl.d
oubleOrNullMember())))) | 686 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "doubleOrNullMember"), v8::Number::New(isolate, impl.d
oubleOrNullMember())))) |
| 661 return false; | 687 return false; |
| 662 } else { | 688 } else { |
| 663 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "doubleOrNullMember"), v8::Null(isolate)))) | 689 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "doubleOrNullMember"), v8::Null(isolate)))) |
| 664 return false; | 690 return false; |
| 665 } | 691 } |
| 666 | 692 |
| 667 if (impl.hasDoubleOrStringMember()) { | 693 if (impl.hasDoubleOrStringMember()) { |
| 668 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "doubleOrStringMember"), toV8(impl.doubleOrStringMembe
r(), creationContext, isolate)))) | 694 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentCon
text(), v8String(isolate, "doubleOrStringMember"), toV8(impl.doubleOrStringMembe
r(), creationContext, isolate)))) |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 } | 869 } |
| 844 | 870 |
| 845 TestDictionary NativeValueTraits<TestDictionary>::nativeValue(v8::Isolate* isola
te, v8::Local<v8::Value> value, ExceptionState& exceptionState) | 871 TestDictionary NativeValueTraits<TestDictionary>::nativeValue(v8::Isolate* isola
te, v8::Local<v8::Value> value, ExceptionState& exceptionState) |
| 846 { | 872 { |
| 847 TestDictionary impl; | 873 TestDictionary impl; |
| 848 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); | 874 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); |
| 849 return impl; | 875 return impl; |
| 850 } | 876 } |
| 851 | 877 |
| 852 } // namespace blink | 878 } // namespace blink |
| OLD | NEW |