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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 if (!info.IsConstructCall()) { | 53 if (!info.IsConstructCall()) { |
54 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Audi
o"), isolate); | 54 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Audi
o"), 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* document = currentDOMWindow(isolate)->document(); | 63 Document* documentPtr = currentDOMWindow(isolate)->document(); |
64 ASSERT(document); | 64 ASSERT(documentPtr); |
| 65 Document& document = *documentPtr; |
65 | 66 |
66 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceNamedConstructor2 instance | 67 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceNamedConstructor2 instance |
67 // may end up being the only node in the map and get garbage-collected prema
turely. | 68 // may end up being the only node in the map and get garbage-collected prema
turely. |
68 toV8(document, info.Holder(), isolate); | 69 toV8(documentPtr, info.Holder(), isolate); |
69 | 70 |
70 if (UNLIKELY(info.Length() < 1)) { | 71 if (UNLIKELY(info.Length() < 1)) { |
71 throwMinimumArityTypeErrorForConstructor("TestInterfaceNamedConstructor2
", 1, info.Length(), info.GetIsolate()); | 72 throwMinimumArityTypeErrorForConstructor("TestInterfaceNamedConstructor2
", 1, info.Length(), info.GetIsolate()); |
72 return; | 73 return; |
73 } | 74 } |
74 V8StringResource<> stringArg; | 75 V8StringResource<> stringArg; |
75 { | 76 { |
76 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 77 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
77 } | 78 } |
78 RefPtr<TestInterfaceNamedConstructor2> impl = TestInterfaceNamedConstructor2
::createForJSConstructor(*document, stringArg); | 79 RefPtr<TestInterfaceNamedConstructor2> impl = TestInterfaceNamedConstructor2
::createForJSConstructor(stringArg); |
79 | 80 |
80 v8::Handle<v8::Object> wrapper = info.Holder(); | 81 v8::Handle<v8::Object> wrapper = info.Holder(); |
81 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(i
mpl.release(), &V8TestInterfaceNamedConstructor2Constructor::wrapperTypeInfo, wr
apper, isolate, WrapperConfiguration::Independent); | 82 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(i
mpl.release(), &V8TestInterfaceNamedConstructor2Constructor::wrapperTypeInfo, wr
apper, isolate, WrapperConfiguration::Independent); |
82 v8SetReturnValue(info, wrapper); | 83 v8SetReturnValue(info, wrapper); |
83 } | 84 } |
84 | 85 |
85 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2Constructor::do
mTemplate(v8::Isolate* isolate) | 86 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2Constructor::do
mTemplate(v8::Isolate* isolate) |
86 { | 87 { |
87 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 88 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
88 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 89 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 fromInternalPointer(object)->deref(); | 170 fromInternalPointer(object)->deref(); |
170 } | 171 } |
171 | 172 |
172 template<> | 173 template<> |
173 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) | 174 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) |
174 { | 175 { |
175 return toV8(impl, creationContext, isolate); | 176 return toV8(impl, creationContext, isolate); |
176 } | 177 } |
177 | 178 |
178 } // namespace WebCore | 179 } // namespace WebCore |
OLD | NEW |