| 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 "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 68 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 69 { | 69 { |
| 70 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 70 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 71 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); | 71 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); |
| 72 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 72 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 73 } | 73 } |
| 74 | 74 |
| 75 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 75 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 76 { | 76 { |
| 77 if (UNLIKELY(info.Length() < 1)) { | 77 if (UNLIKELY(info.Length() < 1)) { |
| 78 throwTypeError(ExceptionMessages::failedToExecute("func", "TestInterface
WillBeGarbageCollected", ExceptionMessages::notEnoughArguments(1, info.Length())
), info.GetIsolate()); | 78 throwArityTypeErrorForMethod("func", "TestInterfaceWillBeGarbageCollecte
d", 1, info.Length(), info.GetIsolate()); |
| 79 return; | 79 return; |
| 80 } | 80 } |
| 81 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toNative(info.Holder()); | 81 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toNative(info.Holder()); |
| 82 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, arg, V8TestInterfaceWi
llBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 82 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, arg, V8TestInterfaceWi
llBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), info[0])); |
| 83 impl->func(arg); | 83 impl->func(arg); |
| 84 } | 84 } |
| 85 | 85 |
| 86 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 86 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 87 { | 87 { |
| 88 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 88 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 89 TestInterfaceWillBeGarbageCollectedV8Internal::funcMethod(info); | 89 TestInterfaceWillBeGarbageCollectedV8Internal::funcMethod(info); |
| 90 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 90 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 91 } | 91 } |
| 92 | 92 |
| 93 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 93 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 94 { | 94 { |
| 95 v8::Isolate* isolate = info.GetIsolate(); | 95 v8::Isolate* isolate = info.GetIsolate(); |
| 96 if (UNLIKELY(info.Length() < 1)) { | 96 if (UNLIKELY(info.Length() < 1)) { |
| 97 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceWillBe
GarbageCollected", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 97 throwArityTypeErrorForConstructor("TestInterfaceWillBeGarbageCollected",
1, info.Length(), info.GetIsolate()); |
| 98 return; | 98 return; |
| 99 } | 99 } |
| 100 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); | 100 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); |
| 101 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); | 101 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); |
| 102 | 102 |
| 103 v8::Handle<v8::Object> wrapper = info.Holder(); | 103 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 104 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo, wra
pper, isolate, WrapperConfiguration::Independent); | 104 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo, wra
pper, isolate, WrapperConfiguration::Independent); |
| 105 v8SetReturnValue(info, wrapper); | 105 v8SetReturnValue(info, wrapper); |
| 106 } | 106 } |
| 107 | 107 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 #endif // !ENABLE(OILPAN) | 211 #endif // !ENABLE(OILPAN) |
| 212 } | 212 } |
| 213 | 213 |
| 214 template<> | 214 template<> |
| 215 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 215 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 216 { | 216 { |
| 217 return toV8(impl, creationContext, isolate); | 217 return toV8(impl, creationContext, isolate); |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace WebCore | 220 } // namespace WebCore |
| OLD | NEW |