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 "V8TestInterfaceEventTarget.h" | 8 #include "V8TestInterfaceEventTarget.h" |
9 | 9 |
10 #include "bindings/v8/ExceptionState.h" | 10 #include "bindings/v8/ExceptionState.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 if (!info.IsConstructCall()) { | 53 if (!info.IsConstructCall()) { |
54 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Name
"), isolate); | 54 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Name
"), isolate); |
55 return; | 55 return; |
56 } | 56 } |
57 | 57 |
58 if (ConstructorMode::current(isolate) == ConstructorMode::WrapExistingObject
) { | 58 if (ConstructorMode::current(isolate) == ConstructorMode::WrapExistingObject
) { |
59 v8SetReturnValue(info, info.Holder()); | 59 v8SetReturnValue(info, info.Holder()); |
60 return; | 60 return; |
61 } | 61 } |
62 | 62 |
63 Document* documentPtr = currentDOMWindow(isolate)->document(); | 63 Document& document = *toDocument(currentExecutionContext(isolate)); |
64 ASSERT(documentPtr); | |
65 Document& document = *documentPtr; | |
66 | |
67 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceEventTarget instance | |
68 // may end up being the only node in the map and get garbage-collected prema
turely. | |
69 toV8(documentPtr, info.Holder(), isolate); | |
70 | 64 |
71 RefPtrWillBeRawPtr<TestInterfaceEventTarget> impl = TestInterfaceEventTarget
::createForJSConstructor(document); | 65 RefPtrWillBeRawPtr<TestInterfaceEventTarget> impl = TestInterfaceEventTarget
::createForJSConstructor(document); |
72 | 66 |
73 v8::Handle<v8::Object> wrapper = info.Holder(); | 67 v8::Handle<v8::Object> wrapper = info.Holder(); |
74 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEventTarget>(impl.re
lease(), &V8TestInterfaceEventTargetConstructor::wrapperTypeInfo, wrapper, isola
te, WrapperConfiguration::Independent); | 68 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEventTarget>(impl.re
lease(), &V8TestInterfaceEventTargetConstructor::wrapperTypeInfo, wrapper, isola
te, WrapperConfiguration::Independent); |
75 v8SetReturnValue(info, wrapper); | 69 v8SetReturnValue(info, wrapper); |
76 } | 70 } |
77 | 71 |
78 v8::Handle<v8::FunctionTemplate> V8TestInterfaceEventTargetConstructor::domTempl
ate(v8::Isolate* isolate) | 72 v8::Handle<v8::FunctionTemplate> V8TestInterfaceEventTargetConstructor::domTempl
ate(v8::Isolate* isolate) |
79 { | 73 { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 #endif // !ENABLE(OILPAN) | 163 #endif // !ENABLE(OILPAN) |
170 } | 164 } |
171 | 165 |
172 template<> | 166 template<> |
173 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventTarget* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 167 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventTarget* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
174 { | 168 { |
175 return toV8(impl, creationContext, isolate); | 169 return toV8(impl, creationContext, isolate); |
176 } | 170 } |
177 | 171 |
178 } // namespace WebCore | 172 } // namespace WebCore |
OLD | NEW |