| 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 "V8TestInterfaceNamedConstructor2.h" | 8 #include "V8TestInterfaceNamedConstructor2.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 TestInterfaceNamedConstructor2V8Internal { | 42 namespace TestInterfaceNamedConstructor2V8Internal { |
| 43 | 43 |
| 44 template <typename T> void V8_USE(T) { } | 44 template <typename T> void V8_USE(T) { } |
| 45 | 45 |
| 46 } // namespace TestInterfaceNamedConstructor2V8Internal | 46 } // namespace TestInterfaceNamedConstructor2V8Internal |
| 47 | 47 |
| 48 const WrapperTypeInfo V8TestInterfaceNamedConstructor2Constructor::wrapperTypeIn
fo = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructor2Constructor::domTemp
late, V8TestInterfaceNamedConstructor2::derefObject, 0, 0, 0, V8TestInterfaceNam
edConstructor2::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype,
RefCountedObject }; | 48 const WrapperTypeInfo V8TestInterfaceNamedConstructor2Constructor::wrapperTypeIn
fo = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructor2Constructor::domTemp
late, V8TestInterfaceNamedConstructor2::derefObject, 0, 0, 0, V8TestInterfaceNam
edConstructor2::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype,
RefCountedObject }; |
| 49 | 49 |
| 50 static void V8TestInterfaceNamedConstructor2ConstructorCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 50 static void V8TestInterfaceNamedConstructor2ConstructorCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 51 { | 51 { |
| 52 v8::Isolate* isolate = info.GetIsolate(); |
| 52 if (!info.IsConstructCall()) { | 53 if (!info.IsConstructCall()) { |
| 53 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Audi
o"), info.GetIsolate()); | 54 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Audi
o"), 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
nterfaceNamedConstructor2 instance | 66 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceNamedConstructor2 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 if (UNLIKELY(info.Length() < 1)) { | 70 if (UNLIKELY(info.Length() < 1)) { |
| 70 throwArityTypeErrorForConstructor("TestInterfaceNamedConstructor2", 1, i
nfo.Length(), info.GetIsolate()); | 71 throwArityTypeErrorForConstructor("TestInterfaceNamedConstructor2", 1, i
nfo.Length(), info.GetIsolate()); |
| 71 return; | 72 return; |
| 72 } | 73 } |
| 73 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; | 74 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; |
| 74 RefPtr<TestInterfaceNamedConstructor2> impl = TestInterfaceNamedConstructor2
::createForJSConstructor(*document, stringArg); | 75 RefPtr<TestInterfaceNamedConstructor2> impl = TestInterfaceNamedConstructor2
::createForJSConstructor(*document, stringArg); |
| 75 | 76 |
| 76 v8::Handle<v8::Object> wrapper = info.Holder(); | 77 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 77 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(i
mpl.release(), &V8TestInterfaceNamedConstructor2Constructor::wrapperTypeInfo, wr
apper, info.GetIsolate(), WrapperConfiguration::Independent); | 78 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(i
mpl.release(), &V8TestInterfaceNamedConstructor2Constructor::wrapperTypeInfo, wr
apper, isolate, WrapperConfiguration::Independent); |
| 78 v8SetReturnValue(info, wrapper); | 79 v8SetReturnValue(info, wrapper); |
| 79 } | 80 } |
| 80 | 81 |
| 81 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2Constructor::do
mTemplate(v8::Isolate* isolate) | 82 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2Constructor::do
mTemplate(v8::Isolate* isolate) |
| 82 { | 83 { |
| 83 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 84 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 84 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 85 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 85 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 86 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 86 if (!result.IsEmpty()) | 87 if (!result.IsEmpty()) |
| 87 return result; | 88 return result; |
| (...skipping 79 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(TestInterfaceNamedConstructor2* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) | 172 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han
dle<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 |