| 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 "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 namespace TestInterfaceEventTargetV8Internal { | 42 namespace TestInterfaceEventTargetV8Internal { |
| 43 | 43 |
| 44 template <typename T> void V8_USE(T) { } | 44 template <typename T> void V8_USE(T) { } |
| 45 | 45 |
| 46 } // namespace TestInterfaceEventTargetV8Internal | 46 } // namespace TestInterfaceEventTargetV8Internal |
| 47 | 47 |
| 48 const WrapperTypeInfo V8TestInterfaceEventTargetConstructor::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceEventTargetConstructor::domTemplate, V8Test
InterfaceEventTarget::derefObject, 0, V8TestInterfaceEventTarget::toEventTarget,
0, V8TestInterfaceEventTarget::installPerContextEnabledMethods, 0, WrapperTypeO
bjectPrototype, RefCountedObject }; | 48 const WrapperTypeInfo V8TestInterfaceEventTargetConstructor::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceEventTargetConstructor::domTemplate, V8Test
InterfaceEventTarget::derefObject, 0, V8TestInterfaceEventTarget::toEventTarget,
0, V8TestInterfaceEventTarget::installPerContextEnabledMethods, 0, WrapperTypeO
bjectPrototype, RefCountedObject }; |
| 49 | 49 |
| 50 static void V8TestInterfaceEventTargetConstructorCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 50 static void V8TestInterfaceEventTargetConstructorCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 51 { | 51 { |
| 52 v8::Isolate* isolate = info.GetIsolate(); |
| 52 if (!info.IsConstructCall()) { | 53 if (!info.IsConstructCall()) { |
| 53 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Name
"), info.GetIsolate()); | 54 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Name
"), isolate); |
| 54 return; | 55 return; |
| 55 } | 56 } |
| 56 | 57 |
| 57 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 58 if (ConstructorMode::current(isolate) == ConstructorMode::WrapExistingObject
) { |
| 58 v8SetReturnValue(info, info.Holder()); | 59 v8SetReturnValue(info, info.Holder()); |
| 59 return; | 60 return; |
| 60 } | 61 } |
| 61 | 62 |
| 62 Document* document = currentDOMWindow(info.GetIsolate())->document(); | 63 Document* document = currentDOMWindow(isolate)->document(); |
| 63 ASSERT(document); | 64 ASSERT(document); |
| 64 | 65 |
| 65 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceEventTarget instance | 66 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceEventTarget instance |
| 66 // may end up being the only node in the map and get garbage-collected prema
turely. | 67 // may end up being the only node in the map and get garbage-collected prema
turely. |
| 67 toV8(document, info.Holder(), info.GetIsolate()); | 68 toV8(document, info.Holder(), isolate); |
| 68 | 69 |
| 69 RefPtr<TestInterfaceEventTarget> impl = TestInterfaceEventTarget::createForJ
SConstructor(*document); | 70 RefPtr<TestInterfaceEventTarget> impl = TestInterfaceEventTarget::createForJ
SConstructor(*document); |
| 70 | 71 |
| 71 v8::Handle<v8::Object> wrapper = info.Holder(); | 72 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 72 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEventTarget>(impl.re
lease(), &V8TestInterfaceEventTargetConstructor::wrapperTypeInfo, wrapper, info.
GetIsolate(), WrapperConfiguration::Independent); | 73 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEventTarget>(impl.re
lease(), &V8TestInterfaceEventTargetConstructor::wrapperTypeInfo, wrapper, isola
te, WrapperConfiguration::Independent); |
| 73 v8SetReturnValue(info, wrapper); | 74 v8SetReturnValue(info, wrapper); |
| 74 } | 75 } |
| 75 | 76 |
| 76 v8::Handle<v8::FunctionTemplate> V8TestInterfaceEventTargetConstructor::domTempl
ate(v8::Isolate* isolate) | 77 v8::Handle<v8::FunctionTemplate> V8TestInterfaceEventTargetConstructor::domTempl
ate(v8::Isolate* isolate) |
| 77 { | 78 { |
| 78 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 79 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 79 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 80 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 80 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 81 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 81 if (!result.IsEmpty()) | 82 if (!result.IsEmpty()) |
| 82 return result; | 83 return result; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 fromInternalPointer(object)->deref(); | 168 fromInternalPointer(object)->deref(); |
| 168 } | 169 } |
| 169 | 170 |
| 170 template<> | 171 template<> |
| 171 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventTarget* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 172 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventTarget* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
| 172 { | 173 { |
| 173 return toV8(impl, creationContext, isolate); | 174 return toV8(impl, creationContext, isolate); |
| 174 } | 175 } |
| 175 | 176 |
| 176 } // namespace WebCore | 177 } // namespace WebCore |
| OLD | NEW |