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. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); | 72 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); |
73 | 73 |
74 V8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute())); | 74 V8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute())); |
75 } | 75 } |
76 | 76 |
77 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { | 77 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::FunctionCallbackInfo<v8::Value>& info) { |
78 v8::Isolate* isolate = info.GetIsolate(); | 78 v8::Isolate* isolate = info.GetIsolate(); |
79 ALLOW_UNUSED_LOCAL(isolate); | 79 ALLOW_UNUSED_LOCAL(isolate); |
80 | 80 |
81 v8::Local<v8::Object> holder = info.Holder(); | 81 v8::Local<v8::Object> holder = info.Holder(); |
| 82 ALLOW_UNUSED_LOCAL(holder); |
| 83 |
82 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); | 84 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); |
83 | 85 |
84 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestTy
pedefs", "uLongLongAttribute"); | 86 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestTy
pedefs", "uLongLongAttribute"); |
85 | 87 |
86 // Prepare the value to be set. | 88 // Prepare the value to be set. |
87 uint64_t cppValue = NativeValueTraits<IDLUnsignedLongLong>::NativeValue(info.G
etIsolate(), v8Value, exceptionState, kNormalConversion); | 89 uint64_t cppValue = NativeValueTraits<IDLUnsignedLongLong>::NativeValue(info.G
etIsolate(), v8Value, exceptionState, kNormalConversion); |
88 if (exceptionState.HadException()) | 90 if (exceptionState.HadException()) |
89 return; | 91 return; |
90 | 92 |
91 impl->setULongLongAttribute(cppValue); | 93 impl->setULongLongAttribute(cppValue); |
92 } | 94 } |
93 | 95 |
94 static void domStringOrDoubleOrNullAttributeAttributeGetter(const v8::FunctionCa
llbackInfo<v8::Value>& info) { | 96 static void domStringOrDoubleOrNullAttributeAttributeGetter(const v8::FunctionCa
llbackInfo<v8::Value>& info) { |
95 v8::Local<v8::Object> holder = info.Holder(); | 97 v8::Local<v8::Object> holder = info.Holder(); |
96 | 98 |
97 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); | 99 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); |
98 | 100 |
99 StringOrDouble result; | 101 StringOrDouble result; |
100 impl->domStringOrDoubleOrNullAttribute(result); | 102 impl->domStringOrDoubleOrNullAttribute(result); |
101 | 103 |
102 V8SetReturnValue(info, result); | 104 V8SetReturnValue(info, result); |
103 } | 105 } |
104 | 106 |
105 static void domStringOrDoubleOrNullAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { | 107 static void domStringOrDoubleOrNullAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { |
106 v8::Isolate* isolate = info.GetIsolate(); | 108 v8::Isolate* isolate = info.GetIsolate(); |
107 ALLOW_UNUSED_LOCAL(isolate); | 109 ALLOW_UNUSED_LOCAL(isolate); |
108 | 110 |
109 v8::Local<v8::Object> holder = info.Holder(); | 111 v8::Local<v8::Object> holder = info.Holder(); |
| 112 ALLOW_UNUSED_LOCAL(holder); |
| 113 |
110 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); | 114 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); |
111 | 115 |
112 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestTy
pedefs", "domStringOrDoubleOrNullAttribute"); | 116 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestTy
pedefs", "domStringOrDoubleOrNullAttribute"); |
113 | 117 |
114 // Prepare the value to be set. | 118 // Prepare the value to be set. |
115 StringOrDouble cppValue; | 119 StringOrDouble cppValue; |
116 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConver
sionMode::kNullable, exceptionState); | 120 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConver
sionMode::kNullable, exceptionState); |
117 if (exceptionState.HadException()) | 121 if (exceptionState.HadException()) |
118 return; | 122 return; |
119 | 123 |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 TestTypedefs* NativeValueTraits<TestTypedefs>::NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value, ExceptionState& exceptionState) { | 537 TestTypedefs* NativeValueTraits<TestTypedefs>::NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value, ExceptionState& exceptionState) { |
534 TestTypedefs* nativeValue = V8TestTypedefs::toImplWithTypeCheck(isolate, value
); | 538 TestTypedefs* nativeValue = V8TestTypedefs::toImplWithTypeCheck(isolate, value
); |
535 if (!nativeValue) { | 539 if (!nativeValue) { |
536 exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue( | 540 exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue( |
537 "TestTypedefs")); | 541 "TestTypedefs")); |
538 } | 542 } |
539 return nativeValue; | 543 return nativeValue; |
540 } | 544 } |
541 | 545 |
542 } // namespace blink | 546 } // namespace blink |
OLD | NEW |