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 "V8TestInterfaceConstructor.h" | 8 #include "V8TestInterfaceConstructor.h" |
9 | 9 |
10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 } | 33 } |
34 | 34 |
35 } // namespace blink | 35 } // namespace blink |
36 | 36 |
37 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceConstructo
r* object) | 37 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceConstructo
r* object) |
38 { | 38 { |
39 blink::initializeScriptWrappableForInterface(object); | 39 blink::initializeScriptWrappableForInterface(object); |
40 } | 40 } |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe
dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor::
derefObject, 0, 0, 0, V8TestInterfaceConstructor::installPerContextEnabledMethod
s, 0, WrapperTypeObjectPrototype, RefCountedObject }; | 43 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe
dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor::
derefObject, 0, 0, 0, V8TestInterfaceConstructor::installConditionallyEnabledMet
hods, 0, WrapperTypeObjectPrototype, RefCountedObject }; |
44 | 44 |
45 namespace TestInterfaceConstructorV8Internal { | 45 namespace TestInterfaceConstructorV8Internal { |
46 | 46 |
47 template <typename T> void V8_USE(T) { } | 47 template <typename T> void V8_USE(T) { } |
48 | 48 |
49 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) | 49 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
50 { | 50 { |
51 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 51 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
52 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 52 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
53 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 53 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | 217 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); |
218 exceptionState.throwIfNeeded(); | 218 exceptionState.throwIfNeeded(); |
219 return; | 219 return; |
220 } | 220 } |
221 exceptionState.throwTypeError("No matching constructor signature."); | 221 exceptionState.throwTypeError("No matching constructor signature."); |
222 exceptionState.throwIfNeeded(); | 222 exceptionState.throwIfNeeded(); |
223 } | 223 } |
224 | 224 |
225 } // namespace TestInterfaceConstructorV8Internal | 225 } // namespace TestInterfaceConstructorV8Internal |
226 | 226 |
227 const WrapperTypeInfo V8TestInterfaceConstructorConstructor::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceConstructorConstructor::domTemplate, V8Test
InterfaceConstructor::derefObject, 0, 0, 0, V8TestInterfaceConstructor::installP
erContextEnabledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject }; | 227 const WrapperTypeInfo V8TestInterfaceConstructorConstructor::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceConstructorConstructor::domTemplate, V8Test
InterfaceConstructor::derefObject, 0, 0, 0, V8TestInterfaceConstructor::installC
onditionallyEnabledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject }; |
228 | 228 |
229 static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 229 static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
230 { | 230 { |
231 if (!info.IsConstructCall()) { | 231 if (!info.IsConstructCall()) { |
232 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("Audio"), info.GetIsolate()); | 232 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("Audio"), info.GetIsolate()); |
233 return; | 233 return; |
234 } | 234 } |
235 | 235 |
236 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 236 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
237 v8SetReturnValue(info, info.Holder()); | 237 v8SetReturnValue(info, info.Holder()); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); | 362 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); |
363 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 363 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
364 // the same object de-ref functions, though, so use that as the basis of
the check. | 364 // the same object de-ref functions, though, so use that as the basis of
the check. |
365 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 365 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
366 } | 366 } |
367 | 367 |
368 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 368 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
369 if (UNLIKELY(wrapper.IsEmpty())) | 369 if (UNLIKELY(wrapper.IsEmpty())) |
370 return wrapper; | 370 return wrapper; |
371 | 371 |
372 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 372 installConditionallyEnabledProperties(wrapper, isolate); |
373 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl, &
wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 373 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl, &
wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
374 return wrapper; | 374 return wrapper; |
375 } | 375 } |
376 | 376 |
377 void V8TestInterfaceConstructor::derefObject(ScriptWrappableBase* internalPointe
r) | 377 void V8TestInterfaceConstructor::derefObject(ScriptWrappableBase* internalPointe
r) |
378 { | 378 { |
379 fromInternalPointer(internalPointer)->deref(); | 379 fromInternalPointer(internalPointer)->deref(); |
380 } | 380 } |
381 | 381 |
382 template<> | 382 template<> |
383 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 383 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
384 { | 384 { |
385 return toV8(impl, creationContext, isolate); | 385 return toV8(impl, creationContext, isolate); |
386 } | 386 } |
387 | 387 |
388 } // namespace blink | 388 } // namespace blink |
OLD | NEW |