| 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 "V8TestInterfaceWillBeGarbageCollected.h" | 8 #include "V8TestInterfaceWillBeGarbageCollected.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 56 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 57 { | 57 { |
| 58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 59 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); | 59 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); |
| 60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 61 } | 61 } |
| 62 | 62 |
| 63 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 63 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 64 { | 64 { |
| 65 if (UNLIKELY(info.Length() < 1)) { | 65 if (UNLIKELY(info.Length() < 1)) { |
| 66 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f
unc", "TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate()
), info.GetIsolate()); | 66 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "func", "TestInterfaceWillBeGarbageCollected", 1, info.Length()
), info.GetIsolate()); |
| 67 return; | 67 return; |
| 68 } | 68 } |
| 69 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(info.Holder()); | 69 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(info.Holder()); |
| 70 TestInterfaceWillBeGarbageCollected* arg; | 70 TestInterfaceWillBeGarbageCollected* arg; |
| 71 { | 71 { |
| 72 arg = V8TestInterfaceWillBeGarbageCollected::toImplWithTypeCheck(info.Ge
tIsolate(), info[0]); | 72 arg = V8TestInterfaceWillBeGarbageCollected::toImplWithTypeCheck(info.Ge
tIsolate(), info[0]); |
| 73 } | 73 } |
| 74 impl->func(arg); | 74 impl->func(arg); |
| 75 } | 75 } |
| 76 | 76 |
| 77 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 77 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 78 { | 78 { |
| 79 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 79 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 80 TestInterfaceWillBeGarbageCollectedV8Internal::funcMethod(info); | 80 TestInterfaceWillBeGarbageCollectedV8Internal::funcMethod(info); |
| 81 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 81 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 82 } | 82 } |
| 83 | 83 |
| 84 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 84 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 85 { | 85 { |
| 86 if (UNLIKELY(info.Length() < 1)) { | 86 if (UNLIKELY(info.Length() < 1)) { |
| 87 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or("TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate()),
info.GetIsolate()); | 87 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceWillBeGarbageCollected", 1, info.Length()),
info.GetIsolate()); |
| 88 return; | 88 return; |
| 89 } | 89 } |
| 90 V8StringResource<> str; | 90 V8StringResource<> str; |
| 91 { | 91 { |
| 92 TOSTRING_VOID_INTERNAL(str, info[0]); | 92 TOSTRING_VOID_INTERNAL(str, info[0]); |
| 93 } | 93 } |
| 94 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); | 94 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); |
| 95 v8::Handle<v8::Object> wrapper = info.Holder(); | 95 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 96 impl->associateWithWrapper(&V8TestInterfaceWillBeGarbageCollected::wrapperTy
peInfo, wrapper, info.GetIsolate()); | 96 impl->associateWithWrapper(&V8TestInterfaceWillBeGarbageCollected::wrapperTy
peInfo, wrapper, info.GetIsolate()); |
| 97 v8SetReturnValue(info, wrapper); | 97 v8SetReturnValue(info, wrapper); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 114 if (!info.IsConstructCall()) { | 114 if (!info.IsConstructCall()) { |
| 115 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("TestInterface"), info.GetIsolate()); | 115 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("TestInterface"), info.GetIsolate()); |
| 116 return; | 116 return; |
| 117 } | 117 } |
| 118 | 118 |
| 119 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 119 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
| 120 v8SetReturnValue(info, info.Holder()); | 120 v8SetReturnValue(info, info.Holder()); |
| 121 return; | 121 return; |
| 122 } | 122 } |
| 123 if (UNLIKELY(info.Length() < 1)) { | 123 if (UNLIKELY(info.Length() < 1)) { |
| 124 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or("TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate()),
info.GetIsolate()); | 124 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceWillBeGarbageCollected", 1, info.Length()),
info.GetIsolate()); |
| 125 return; | 125 return; |
| 126 } | 126 } |
| 127 V8StringResource<> str; | 127 V8StringResource<> str; |
| 128 { | 128 { |
| 129 TOSTRING_VOID_INTERNAL(str, info[0]); | 129 TOSTRING_VOID_INTERNAL(str, info[0]); |
| 130 } | 130 } |
| 131 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); | 131 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); |
| 132 v8::Handle<v8::Object> wrapper = info.Holder(); | 132 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 133 impl->associateWithWrapper(&V8TestInterfaceWillBeGarbageCollectedConstructor
::wrapperTypeInfo, wrapper, info.GetIsolate()); | 133 impl->associateWithWrapper(&V8TestInterfaceWillBeGarbageCollectedConstructor
::wrapperTypeInfo, wrapper, info.GetIsolate()); |
| 134 v8SetReturnValue(info, wrapper); | 134 v8SetReturnValue(info, wrapper); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 #endif | 228 #endif |
| 229 } | 229 } |
| 230 | 230 |
| 231 template<> | 231 template<> |
| 232 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 232 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 233 { | 233 { |
| 234 return toV8(impl, creationContext, isolate); | 234 return toV8(impl, creationContext, isolate); |
| 235 } | 235 } |
| 236 | 236 |
| 237 } // namespace blink | 237 } // namespace blink |
| OLD | NEW |