| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 69 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 70 { | 70 { |
| 71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 72 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); | 72 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); |
| 73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 74 } | 74 } |
| 75 | 75 |
| 76 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 76 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 77 { | 77 { |
| 78 if (UNLIKELY(info.Length() < 1)) { | 78 if (UNLIKELY(info.Length() < 1)) { |
| 79 throwMinimumArityTypeErrorForMethod("func", "TestInterfaceWillBeGarbageC
ollected", 1, info.Length(), info.GetIsolate()); | 79 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f
unc", "TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate()
), info.GetIsolate()); |
| 80 return; | 80 return; |
| 81 } | 81 } |
| 82 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toNative(info.Holder()); | 82 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toNative(info.Holder()); |
| 83 TestInterfaceWillBeGarbageCollected* arg; | 83 TestInterfaceWillBeGarbageCollected* arg; |
| 84 { | 84 { |
| 85 v8::TryCatch block; | 85 v8::TryCatch block; |
| 86 V8RethrowTryCatchScope rethrow(block); | 86 V8RethrowTryCatchScope rethrow(block); |
| 87 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceWillBeGarbageCollected::toNat
iveWithTypeCheck(info.GetIsolate(), info[0])); | 87 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceWillBeGarbageCollected::toNat
iveWithTypeCheck(info.GetIsolate(), info[0])); |
| 88 } | 88 } |
| 89 impl->func(arg); | 89 impl->func(arg); |
| 90 } | 90 } |
| 91 | 91 |
| 92 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 92 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 93 { | 93 { |
| 94 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 94 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 95 TestInterfaceWillBeGarbageCollectedV8Internal::funcMethod(info); | 95 TestInterfaceWillBeGarbageCollectedV8Internal::funcMethod(info); |
| 96 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 96 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 97 } | 97 } |
| 98 | 98 |
| 99 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 99 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 100 { | 100 { |
| 101 if (UNLIKELY(info.Length() < 1)) { | 101 if (UNLIKELY(info.Length() < 1)) { |
| 102 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl
ected", 1, info.Length(), info.GetIsolate()); | 102 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or("TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate()),
info.GetIsolate()); |
| 103 return; | 103 return; |
| 104 } | 104 } |
| 105 V8StringResource<> str; | 105 V8StringResource<> str; |
| 106 { | 106 { |
| 107 TOSTRING_VOID_INTERNAL(str, info[0]); | 107 TOSTRING_VOID_INTERNAL(str, info[0]); |
| 108 } | 108 } |
| 109 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); | 109 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); |
| 110 v8::Handle<v8::Object> wrapper = info.Holder(); | 110 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 111 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo, wra
pper, info.GetIsolate(), WrapperConfiguration::Independent); | 111 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo, wra
pper, info.GetIsolate(), WrapperConfiguration::Independent); |
| 112 v8SetReturnValue(info, wrapper); | 112 v8SetReturnValue(info, wrapper); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 129 if (!info.IsConstructCall()) { | 129 if (!info.IsConstructCall()) { |
| 130 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("TestInterface"), info.GetIsolate()); | 130 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("TestInterface"), info.GetIsolate()); |
| 131 return; | 131 return; |
| 132 } | 132 } |
| 133 | 133 |
| 134 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 134 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
| 135 v8SetReturnValue(info, info.Holder()); | 135 v8SetReturnValue(info, info.Holder()); |
| 136 return; | 136 return; |
| 137 } | 137 } |
| 138 if (UNLIKELY(info.Length() < 1)) { | 138 if (UNLIKELY(info.Length() < 1)) { |
| 139 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl
ected", 1, info.Length(), info.GetIsolate()); | 139 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or("TestInterfaceWillBeGarbageCollected", 1, info.Length(), info.GetIsolate()),
info.GetIsolate()); |
| 140 return; | 140 return; |
| 141 } | 141 } |
| 142 V8StringResource<> str; | 142 V8StringResource<> str; |
| 143 { | 143 { |
| 144 TOSTRING_VOID_INTERNAL(str, info[0]); | 144 TOSTRING_VOID_INTERNAL(str, info[0]); |
| 145 } | 145 } |
| 146 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); | 146 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); |
| 147 v8::Handle<v8::Object> wrapper = info.Holder(); | 147 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 148 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperTy
peInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Independent); | 148 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperTy
peInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Independent); |
| 149 v8SetReturnValue(info, wrapper); | 149 v8SetReturnValue(info, wrapper); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 #endif // !ENABLE(OILPAN) | 261 #endif // !ENABLE(OILPAN) |
| 262 } | 262 } |
| 263 | 263 |
| 264 template<> | 264 template<> |
| 265 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 265 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 266 { | 266 { |
| 267 return toV8(impl, creationContext, isolate); | 267 return toV8(impl, creationContext, isolate); |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace blink | 270 } // namespace blink |
| OLD | NEW |