| 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* documentPtr = currentDOMWindow(isolate)->document(); | 142 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 143 |
| 144 Document* documentPtr = toDocument(executionContext); |
| 143 ASSERT(documentPtr); | 145 ASSERT(documentPtr); |
| 144 Document& document = *documentPtr; | |
| 145 | 146 |
| 146 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceWillBeGarbageCollected instance | 147 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceWillBeGarbageCollected instance |
| 147 // may end up being the only node in the map and get garbage-collected prema
turely. | 148 // may end up being the only node in the map and get garbage-collected prema
turely. |
| 148 toV8(documentPtr, info.Holder(), isolate); | 149 toV8(documentPtr, info.Holder(), isolate); |
| 149 | 150 |
| 150 if (UNLIKELY(info.Length() < 1)) { | 151 if (UNLIKELY(info.Length() < 1)) { |
| 151 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl
ected", 1, info.Length(), info.GetIsolate()); | 152 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl
ected", 1, info.Length(), info.GetIsolate()); |
| 152 return; | 153 return; |
| 153 } | 154 } |
| 154 V8StringResource<> str; | 155 V8StringResource<> str; |
| (...skipping 119 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 |