| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 if (!info.IsConstructCall()) { | 132 if (!info.IsConstructCall()) { |
| 133 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Test
Interface"), isolate); | 133 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Test
Interface"), isolate); |
| 134 return; | 134 return; |
| 135 } | 135 } |
| 136 | 136 |
| 137 if (ConstructorMode::current(isolate) == ConstructorMode::WrapExistingObject
) { | 137 if (ConstructorMode::current(isolate) == ConstructorMode::WrapExistingObject
) { |
| 138 v8SetReturnValue(info, info.Holder()); | 138 v8SetReturnValue(info, info.Holder()); |
| 139 return; | 139 return; |
| 140 } | 140 } |
| 141 | 141 |
| 142 Document* document = currentDOMWindow(isolate)->document(); | 142 Document* documentPtr = currentDOMWindow(isolate)->document(); |
| 143 ASSERT(document); | 143 ASSERT(documentPtr); |
| 144 Document& document = *documentPtr; |
| 144 | 145 |
| 145 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceWillBeGarbageCollected instance | 146 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceWillBeGarbageCollected instance |
| 146 // may end up being the only node in the map and get garbage-collected prema
turely. | 147 // may end up being the only node in the map and get garbage-collected prema
turely. |
| 147 toV8(document, info.Holder(), isolate); | 148 toV8(documentPtr, info.Holder(), isolate); |
| 148 | 149 |
| 149 if (UNLIKELY(info.Length() < 1)) { | 150 if (UNLIKELY(info.Length() < 1)) { |
| 150 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl
ected", 1, info.Length(), info.GetIsolate()); | 151 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl
ected", 1, info.Length(), info.GetIsolate()); |
| 151 return; | 152 return; |
| 152 } | 153 } |
| 153 V8StringResource<> str; | 154 V8StringResource<> str; |
| 154 { | 155 { |
| 155 TOSTRING_VOID_INTERNAL(str, info[0]); | 156 TOSTRING_VOID_INTERNAL(str, info[0]); |
| 156 } | 157 } |
| 157 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(*document, str); | 158 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); |
| 158 | 159 |
| 159 v8::Handle<v8::Object> wrapper = info.Holder(); | 160 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 160 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperTy
peInfo, wrapper, isolate, WrapperConfiguration::Independent); | 161 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect
ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperTy
peInfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 161 v8SetReturnValue(info, wrapper); | 162 v8SetReturnValue(info, wrapper); |
| 162 } | 163 } |
| 163 | 164 |
| 164 v8::Handle<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate(v8::Isolate* isolate) | 165 v8::Handle<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate(v8::Isolate* isolate) |
| 165 { | 166 { |
| 166 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 167 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 167 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 168 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 #endif // !ENABLE(OILPAN) | 274 #endif // !ENABLE(OILPAN) |
| 274 } | 275 } |
| 275 | 276 |
| 276 template<> | 277 template<> |
| 277 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 278 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 278 { | 279 { |
| 279 return toV8(impl, creationContext, isolate); | 280 return toV8(impl, creationContext, isolate); |
| 280 } | 281 } |
| 281 | 282 |
| 282 } // namespace WebCore | 283 } // namespace WebCore |
| OLD | NEW |