| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 throwMinimumArityTypeErrorForMethod("func", "TestInterfaceWillBeGarbageC
ollected", 1, info.Length(), 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 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceWillBeGarbageCollected::toNat
iveWithTypeCheck(info.GetIsolate(), info[0])); | 87 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceWillBeGarbageCollected::toNat
iveWithTypeCheck(info.GetIsolate(), info[0])); |
| 87 } | 88 } |
| 88 impl->func(arg); | 89 impl->func(arg); |
| 89 } | 90 } |
| 90 | 91 |
| 91 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 92 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 92 { | 93 { |
| 93 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 94 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 94 TestInterfaceWillBeGarbageCollectedV8Internal::funcMethod(info); | 95 TestInterfaceWillBeGarbageCollectedV8Internal::funcMethod(info); |
| 95 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 96 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 96 } | 97 } |
| 97 | 98 |
| 98 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 99 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 99 { | 100 { |
| 100 v8::Isolate* isolate = info.GetIsolate(); | 101 v8::Isolate* isolate = info.GetIsolate(); |
| 101 if (UNLIKELY(info.Length() < 1)) { | 102 if (UNLIKELY(info.Length() < 1)) { |
| 102 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl
ected", 1, info.Length(), info.GetIsolate()); | 103 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl
ected", 1, info.Length(), info.GetIsolate()); |
| 103 return; | 104 return; |
| 104 } | 105 } |
| 105 V8StringResource<> str; | 106 V8StringResource<> str; |
| 106 { | 107 { |
| 107 TOSTRING_VOID_INTERNAL_NOTRYCATCH(str, info[0]); | 108 TOSTRING_VOID_INTERNAL(str, info[0]); |
| 108 } | 109 } |
| 109 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); | 110 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); |
| 110 | 111 |
| 111 v8::Handle<v8::Object> wrapper = info.Holder(); | 112 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 112 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo, wra
pper, isolate, WrapperConfiguration::Independent); | 113 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo, wra
pper, isolate, WrapperConfiguration::Independent); |
| 113 v8SetReturnValue(info, wrapper); | 114 v8SetReturnValue(info, wrapper); |
| 114 } | 115 } |
| 115 | 116 |
| 116 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal | 117 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal |
| 117 | 118 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 144 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceWillBeGarbageCollected instance | 145 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceWillBeGarbageCollected instance |
| 145 // may end up being the only node in the map and get garbage-collected prema
turely. | 146 // may end up being the only node in the map and get garbage-collected prema
turely. |
| 146 toV8(document, info.Holder(), isolate); | 147 toV8(document, info.Holder(), isolate); |
| 147 | 148 |
| 148 if (UNLIKELY(info.Length() < 1)) { | 149 if (UNLIKELY(info.Length() < 1)) { |
| 149 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl
ected", 1, info.Length(), info.GetIsolate()); | 150 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl
ected", 1, info.Length(), info.GetIsolate()); |
| 150 return; | 151 return; |
| 151 } | 152 } |
| 152 V8StringResource<> str; | 153 V8StringResource<> str; |
| 153 { | 154 { |
| 154 TOSTRING_VOID_INTERNAL_NOTRYCATCH(str, info[0]); | 155 TOSTRING_VOID_INTERNAL(str, info[0]); |
| 155 } | 156 } |
| 156 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(*document, str); | 157 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(*document, str); |
| 157 | 158 |
| 158 v8::Handle<v8::Object> wrapper = info.Holder(); | 159 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 159 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperTy
peInfo, wrapper, isolate, WrapperConfiguration::Independent); | 160 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperTy
peInfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 160 v8SetReturnValue(info, wrapper); | 161 v8SetReturnValue(info, wrapper); |
| 161 } | 162 } |
| 162 | 163 |
| 163 v8::Handle<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate(v8::Isolate* isolate) | 164 v8::Handle<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate(v8::Isolate* isolate) |
| 164 { | 165 { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 #endif // !ENABLE(OILPAN) | 275 #endif // !ENABLE(OILPAN) |
| 275 } | 276 } |
| 276 | 277 |
| 277 template<> | 278 template<> |
| 278 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 279 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 279 { | 280 { |
| 280 return toV8(impl, creationContext, isolate); | 281 return toV8(impl, creationContext, isolate); |
| 281 } | 282 } |
| 282 | 283 |
| 283 } // namespace WebCore | 284 } // namespace WebCore |
| OLD | NEW |