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 "V8TestInterfaceEventInitConstructor.h" | 7 #include "V8TestInterfaceEventInitConstructor.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/V8DOMConfiguration.h" | 10 #include "bindings/core/v8/V8DOMConfiguration.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 static void isTrustedAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 70 static void isTrustedAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
71 { | 71 { |
72 TestInterfaceEventInitConstructorV8Internal::isTrustedAttributeGetter(info); | 72 TestInterfaceEventInitConstructorV8Internal::isTrustedAttributeGetter(info); |
73 } | 73 } |
74 | 74 |
75 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 75 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
76 { | 76 { |
77 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceEventInitConstructor", info.Holder(), info.GetIsolate()); | 77 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceEventInitConstructor", info.Holder(), info.GetIsolate()); |
78 if (UNLIKELY(info.Length() < 2)) { | 78 if (UNLIKELY(info.Length() < 2)) { |
79 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 79 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
80 exceptionState.throwIfNeeded(); | |
81 return; | 80 return; |
82 } | 81 } |
83 V8StringResource<> type; | 82 V8StringResource<> type; |
84 TestInterfaceEventInit testInterfaceEventInit; | 83 TestInterfaceEventInit testInterfaceEventInit; |
85 { | 84 { |
86 type = info[0]; | 85 type = info[0]; |
87 if (!type.prepare()) | 86 if (!type.prepare()) |
88 return; | 87 return; |
89 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { | 88 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { |
90 exceptionState.throwTypeError("parameter 2 ('testInterfaceEventInit'
) is not an object."); | 89 exceptionState.throwTypeError("parameter 2 ('testInterfaceEventInit'
) is not an object."); |
91 exceptionState.throwIfNeeded(); | |
92 return; | 90 return; |
93 } | 91 } |
94 V8TestInterfaceEventInit::toImpl(info.GetIsolate(), info[1], testInterfa
ceEventInit, exceptionState); | 92 V8TestInterfaceEventInit::toImpl(info.GetIsolate(), info[1], testInterfa
ceEventInit, exceptionState); |
95 if (exceptionState.throwIfNeeded()) | 93 if (exceptionState.hadException()) |
96 return; | 94 return; |
97 } | 95 } |
98 TestInterfaceEventInitConstructor* impl = TestInterfaceEventInitConstructor:
:create(type, testInterfaceEventInit); | 96 TestInterfaceEventInitConstructor* impl = TestInterfaceEventInitConstructor:
:create(type, testInterfaceEventInit); |
99 v8::Local<v8::Object> wrapper = info.Holder(); | 97 v8::Local<v8::Object> wrapper = info.Holder(); |
100 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEven
tInitConstructor::wrapperTypeInfo, wrapper); | 98 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEven
tInitConstructor::wrapperTypeInfo, wrapper); |
101 v8SetReturnValue(info, wrapper); | 99 v8SetReturnValue(info, wrapper); |
102 } | 100 } |
103 | 101 |
104 } // namespace TestInterfaceEventInitConstructorV8Internal | 102 } // namespace TestInterfaceEventInitConstructorV8Internal |
105 | 103 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 { | 151 { |
154 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 152 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
155 } | 153 } |
156 | 154 |
157 TestInterfaceEventInitConstructor* V8TestInterfaceEventInitConstructor::toImplWi
thTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) | 155 TestInterfaceEventInitConstructor* V8TestInterfaceEventInitConstructor::toImplWi
thTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) |
158 { | 156 { |
159 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; | 157 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; |
160 } | 158 } |
161 | 159 |
162 } // namespace blink | 160 } // namespace blink |
OLD | NEW |