Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(790)

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceConstructor.cpp

Issue 542113003: bindings: Introduces ScriptWrappable::associateWithWrapper in addition to wrap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "V8TestInterfaceConstructor.h" 8 #include "V8TestInterfaceConstructor.h"
9 9
10 #include "bindings/core/v8/Dictionary.h" 10 #include "bindings/core/v8/Dictionary.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 { 53 {
54 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 54 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
55 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 55 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
56 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 56 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
57 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, exceptionState); 57 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, exceptionState);
58 if (exceptionState.hadException()) { 58 if (exceptionState.hadException()) {
59 exceptionState.throwIfNeeded(); 59 exceptionState.throwIfNeeded();
60 return; 60 return;
61 } 61 }
62 v8::Handle<v8::Object> wrapper = info.Holder(); 62 v8::Handle<v8::Object> wrapper = info.Holder();
63 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( )); 63 impl.get()->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInf o, wrapper, info.GetIsolate());
64 v8SetReturnValue(info, wrapper); 64 v8SetReturnValue(info, wrapper);
65 } 65 }
66 66
67 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) 67 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
68 { 68 {
69 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 69 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
70 double doubleArg; 70 double doubleArg;
71 V8StringResource<> stringArg; 71 V8StringResource<> stringArg;
72 TestInterfaceEmpty* testInterfaceEmptyArg; 72 TestInterfaceEmpty* testInterfaceEmptyArg;
73 Dictionary dictionaryArg; 73 Dictionary dictionaryArg;
(...skipping 24 matching lines...) Expand all
98 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp ty::toImplWithTypeCheck(info.GetIsolate(), info[7])); 98 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp ty::toImplWithTypeCheck(info.GetIsolate(), info[7]));
99 } 99 }
100 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 100 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
101 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 101 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
102 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionary Arg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTe stInterfaceEmptyArg, exceptionState); 102 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionary Arg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTe stInterfaceEmptyArg, exceptionState);
103 if (exceptionState.hadException()) { 103 if (exceptionState.hadException()) {
104 exceptionState.throwIfNeeded(); 104 exceptionState.throwIfNeeded();
105 return; 105 return;
106 } 106 }
107 v8::Handle<v8::Object> wrapper = info.Holder(); 107 v8::Handle<v8::Object> wrapper = info.Holder();
108 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( )); 108 impl.get()->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInf o, wrapper, info.GetIsolate());
109 v8SetReturnValue(info, wrapper); 109 v8SetReturnValue(info, wrapper);
110 } 110 }
111 111
112 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) 112 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
113 { 113 {
114 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 114 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
115 V8StringResource<> arg; 115 V8StringResource<> arg;
116 V8StringResource<> optArg; 116 V8StringResource<> optArg;
117 { 117 {
118 TOSTRING_VOID_INTERNAL(arg, info[0]); 118 TOSTRING_VOID_INTERNAL(arg, info[0]);
119 if (UNLIKELY(info.Length() <= 1)) { 119 if (UNLIKELY(info.Length() <= 1)) {
120 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate()); 120 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate());
121 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 121 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
122 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eate(executionContext, document, arg, exceptionState); 122 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eate(executionContext, document, arg, exceptionState);
123 if (exceptionState.hadException()) { 123 if (exceptionState.hadException()) {
124 exceptionState.throwIfNeeded(); 124 exceptionState.throwIfNeeded();
125 return; 125 return;
126 } 126 }
127 v8::Handle<v8::Object> wrapper = info.Holder(); 127 v8::Handle<v8::Object> wrapper = info.Holder();
128 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor> (impl.release(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.Get Isolate()); 128 impl.get()->associateWithWrapper(&V8TestInterfaceConstructor::wrappe rTypeInfo, wrapper, info.GetIsolate());
129 v8SetReturnValue(info, wrapper); 129 v8SetReturnValue(info, wrapper);
130 return; 130 return;
131 } 131 }
132 TOSTRING_VOID_INTERNAL(optArg, info[1]); 132 TOSTRING_VOID_INTERNAL(optArg, info[1]);
133 } 133 }
134 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 134 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
135 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 135 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
136 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, arg, optArg, exceptionState); 136 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, arg, optArg, exceptionState);
137 if (exceptionState.hadException()) { 137 if (exceptionState.hadException()) {
138 exceptionState.throwIfNeeded(); 138 exceptionState.throwIfNeeded();
139 return; 139 return;
140 } 140 }
141 v8::Handle<v8::Object> wrapper = info.Holder(); 141 v8::Handle<v8::Object> wrapper = info.Holder();
142 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( )); 142 impl.get()->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInf o, wrapper, info.GetIsolate());
143 v8SetReturnValue(info, wrapper); 143 v8SetReturnValue(info, wrapper);
144 } 144 }
145 145
146 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) 146 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info)
147 { 147 {
148 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 148 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
149 V8StringResource<> arg; 149 V8StringResource<> arg;
150 V8StringResource<> arg2; 150 V8StringResource<> arg2;
151 V8StringResource<> arg3; 151 V8StringResource<> arg3;
152 { 152 {
153 TOSTRING_VOID_INTERNAL(arg, info[0]); 153 TOSTRING_VOID_INTERNAL(arg, info[0]);
154 TOSTRING_VOID_INTERNAL(arg2, info[1]); 154 TOSTRING_VOID_INTERNAL(arg2, info[1]);
155 TOSTRING_VOID_INTERNAL(arg3, info[2]); 155 TOSTRING_VOID_INTERNAL(arg3, info[2]);
156 } 156 }
157 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 157 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
158 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 158 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
159 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, arg, arg2, arg3, exceptionState); 159 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, arg, arg2, arg3, exceptionState);
160 if (exceptionState.hadException()) { 160 if (exceptionState.hadException()) {
161 exceptionState.throwIfNeeded(); 161 exceptionState.throwIfNeeded();
162 return; 162 return;
163 } 163 }
164 v8::Handle<v8::Object> wrapper = info.Holder(); 164 v8::Handle<v8::Object> wrapper = info.Holder();
165 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( )); 165 impl.get()->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInf o, wrapper, info.GetIsolate());
166 v8SetReturnValue(info, wrapper); 166 v8SetReturnValue(info, wrapper);
167 } 167 }
168 168
169 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 169 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
170 { 170 {
171 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 171 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
172 switch (std::min(8, info.Length())) { 172 switch (std::min(8, info.Length())) {
173 case 0: 173 case 0:
174 if (true) { 174 if (true) {
175 TestInterfaceConstructorV8Internal::constructor1(info); 175 TestInterfaceConstructorV8Internal::constructor1(info);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 TOSTRING_VOID_INTERNAL(arg, info[0]); 252 TOSTRING_VOID_INTERNAL(arg, info[0]);
253 if (UNLIKELY(info.Length() <= 1)) { 253 if (UNLIKELY(info.Length() <= 1)) {
254 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate()); 254 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate());
255 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 255 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
256 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eateForJSConstructor(executionContext, document, arg, exceptionState); 256 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eateForJSConstructor(executionContext, document, arg, exceptionState);
257 if (exceptionState.hadException()) { 257 if (exceptionState.hadException()) {
258 exceptionState.throwIfNeeded(); 258 exceptionState.throwIfNeeded();
259 return; 259 return;
260 } 260 }
261 v8::Handle<v8::Object> wrapper = info.Holder(); 261 v8::Handle<v8::Object> wrapper = info.Holder();
262 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor> (impl.release(), &V8TestInterfaceConstructorConstructor::wrapperTypeInfo, wrappe r, info.GetIsolate()); 262 impl.get()->associateWithWrapper(&V8TestInterfaceConstructorConstruc tor::wrapperTypeInfo, wrapper, info.GetIsolate());
263 v8SetReturnValue(info, wrapper); 263 v8SetReturnValue(info, wrapper);
264 return; 264 return;
265 } 265 }
266 TOSTRING_VOID_INTERNAL(optArg, info[1]); 266 TOSTRING_VOID_INTERNAL(optArg, info[1]);
267 } 267 }
268 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 268 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
269 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 269 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
270 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ SConstructor(executionContext, document, arg, optArg, exceptionState); 270 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ SConstructor(executionContext, document, arg, optArg, exceptionState);
271 if (exceptionState.hadException()) { 271 if (exceptionState.hadException()) {
272 exceptionState.throwIfNeeded(); 272 exceptionState.throwIfNeeded();
273 return; 273 return;
274 } 274 }
275 v8::Handle<v8::Object> wrapper = info.Holder(); 275 v8::Handle<v8::Object> wrapper = info.Holder();
276 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructorConstructor::wrapperTypeInfo, wrapper, info. GetIsolate()); 276 impl.get()->associateWithWrapper(&V8TestInterfaceConstructorConstructor::wra pperTypeInfo, wrapper, info.GetIsolate());
277 v8SetReturnValue(info, wrapper); 277 v8SetReturnValue(info, wrapper);
278 } 278 }
279 279
280 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructorConstructor::domTempl ate(v8::Isolate* isolate) 280 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructorConstructor::domTempl ate(v8::Isolate* isolate)
281 { 281 {
282 static int domTemplateKey; // This address is used for a key to look up the dom template. 282 static int domTemplateKey; // This address is used for a key to look up the dom template.
283 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 283 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
284 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey); 284 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey);
285 if (!result.IsEmpty()) 285 if (!result.IsEmpty())
286 return result; 286 return result;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 return 0; 368 return 0;
369 } 369 }
370 370
371 template<> 371 template<>
372 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 372 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
373 { 373 {
374 return toV8(impl, creationContext, isolate); 374 return toV8(impl, creationContext, isolate);
375 } 375 }
376 376
377 } // namespace blink 377 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698