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/GeneratedCodeHelper.h" | 10 #include "bindings/core/v8/GeneratedCodeHelper.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 v8SetReturnValueBool(info, impl->isTrusted()); | 68 v8SetReturnValueBool(info, impl->isTrusted()); |
69 } | 69 } |
70 | 70 |
71 void isTrustedAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 71 void isTrustedAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
72 { | 72 { |
73 TestInterfaceEventInitConstructorV8Internal::isTrustedAttributeGetter(info); | 73 TestInterfaceEventInitConstructorV8Internal::isTrustedAttributeGetter(info); |
74 } | 74 } |
75 | 75 |
76 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 76 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
77 { | 77 { |
78 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceEventInitConstructor", info.Holder(), info.GetIsolate()); | 78 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::Constructio
nContext, "TestInterfaceEventInitConstructor"); |
| 79 |
79 if (UNLIKELY(info.Length() < 2)) { | 80 if (UNLIKELY(info.Length() < 2)) { |
80 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 81 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
81 return; | 82 return; |
82 } | 83 } |
| 84 |
83 V8StringResource<> type; | 85 V8StringResource<> type; |
84 TestInterfaceEventInit testInterfaceEventInit; | 86 TestInterfaceEventInit testInterfaceEventInit; |
85 { | 87 type = info[0]; |
86 type = info[0]; | 88 if (!type.prepare()) |
87 if (!type.prepare()) | 89 return; |
88 return; | 90 |
89 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { | 91 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { |
90 exceptionState.throwTypeError("parameter 2 ('testInterfaceEventInit'
) is not an object."); | 92 exceptionState.throwTypeError("parameter 2 ('testInterfaceEventInit') is
not an object."); |
91 return; | 93 |
92 } | 94 return; |
93 V8TestInterfaceEventInit::toImpl(info.GetIsolate(), info[1], testInterfa
ceEventInit, exceptionState); | |
94 if (exceptionState.hadException()) | |
95 return; | |
96 } | 95 } |
| 96 V8TestInterfaceEventInit::toImpl(info.GetIsolate(), info[1], testInterfaceEv
entInit, exceptionState); |
| 97 if (exceptionState.hadException()) |
| 98 return; |
| 99 |
97 TestInterfaceEventInitConstructor* impl = TestInterfaceEventInitConstructor:
:create(type, testInterfaceEventInit); | 100 TestInterfaceEventInitConstructor* impl = TestInterfaceEventInitConstructor:
:create(type, testInterfaceEventInit); |
98 v8::Local<v8::Object> wrapper = info.Holder(); | 101 v8::Local<v8::Object> wrapper = info.Holder(); |
99 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEven
tInitConstructor::wrapperTypeInfo, wrapper); | 102 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEven
tInitConstructor::wrapperTypeInfo, wrapper); |
100 v8SetReturnValue(info, wrapper); | 103 v8SetReturnValue(info, wrapper); |
101 } | 104 } |
102 | 105 |
103 } // namespace TestInterfaceEventInitConstructorV8Internal | 106 } // namespace TestInterfaceEventInitConstructorV8Internal |
104 | 107 |
105 const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceEventInitConstruc
torAccessors[] = { | 108 const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceEventInitConstruc
torAccessors[] = { |
106 {"readonlyStringAttribute", TestInterfaceEventInitConstructorV8Internal::rea
donlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cas
t<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 109 {"readonlyStringAttribute", TestInterfaceEventInitConstructorV8Internal::rea
donlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cas
t<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 { | 155 { |
153 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 156 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
154 } | 157 } |
155 | 158 |
156 TestInterfaceEventInitConstructor* V8TestInterfaceEventInitConstructor::toImplWi
thTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) | 159 TestInterfaceEventInitConstructor* V8TestInterfaceEventInitConstructor::toImplWi
thTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) |
157 { | 160 { |
158 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; | 161 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; |
159 } | 162 } |
160 | 163 |
161 } // namespace blink | 164 } // namespace blink |
OLD | NEW |