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

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 28 matching lines...) Expand all
39 { 39 {
40 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 40 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
41 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 41 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
42 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 42 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
43 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, exceptionState); 43 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, exceptionState);
44 if (exceptionState.hadException()) { 44 if (exceptionState.hadException()) {
45 exceptionState.throwIfNeeded(); 45 exceptionState.throwIfNeeded();
46 return; 46 return;
47 } 47 }
48 v8::Handle<v8::Object> wrapper = info.Holder(); 48 v8::Handle<v8::Object> wrapper = info.Holder();
49 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( )); 49 impl->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInfo, wra pper, info.GetIsolate());
50 v8SetReturnValue(info, wrapper); 50 v8SetReturnValue(info, wrapper);
51 } 51 }
52 52
53 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) 53 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
54 { 54 {
55 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 55 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
56 double doubleArg; 56 double doubleArg;
57 V8StringResource<> stringArg; 57 V8StringResource<> stringArg;
58 TestInterfaceEmpty* testInterfaceEmptyArg; 58 TestInterfaceEmpty* testInterfaceEmptyArg;
59 Dictionary dictionaryArg; 59 Dictionary dictionaryArg;
(...skipping 24 matching lines...) Expand all
84 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp ty::toImplWithTypeCheck(info.GetIsolate(), info[7])); 84 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp ty::toImplWithTypeCheck(info.GetIsolate(), info[7]));
85 } 85 }
86 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 86 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
87 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 87 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
88 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionary Arg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTe stInterfaceEmptyArg, exceptionState); 88 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionary Arg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTe stInterfaceEmptyArg, exceptionState);
89 if (exceptionState.hadException()) { 89 if (exceptionState.hadException()) {
90 exceptionState.throwIfNeeded(); 90 exceptionState.throwIfNeeded();
91 return; 91 return;
92 } 92 }
93 v8::Handle<v8::Object> wrapper = info.Holder(); 93 v8::Handle<v8::Object> wrapper = info.Holder();
94 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( )); 94 impl->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInfo, wra pper, info.GetIsolate());
95 v8SetReturnValue(info, wrapper); 95 v8SetReturnValue(info, wrapper);
96 } 96 }
97 97
98 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) 98 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
99 { 99 {
100 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 100 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
101 V8StringResource<> arg; 101 V8StringResource<> arg;
102 V8StringResource<> optArg; 102 V8StringResource<> optArg;
103 { 103 {
104 TOSTRING_VOID_INTERNAL(arg, info[0]); 104 TOSTRING_VOID_INTERNAL(arg, info[0]);
105 if (UNLIKELY(info.Length() <= 1)) { 105 if (UNLIKELY(info.Length() <= 1)) {
106 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate()); 106 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate());
107 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 107 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
108 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eate(executionContext, document, arg, exceptionState); 108 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eate(executionContext, document, arg, exceptionState);
109 if (exceptionState.hadException()) { 109 if (exceptionState.hadException()) {
110 exceptionState.throwIfNeeded(); 110 exceptionState.throwIfNeeded();
111 return; 111 return;
112 } 112 }
113 v8::Handle<v8::Object> wrapper = info.Holder(); 113 v8::Handle<v8::Object> wrapper = info.Holder();
114 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor> (impl.release(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.Get Isolate()); 114 impl->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeI nfo, wrapper, info.GetIsolate());
115 v8SetReturnValue(info, wrapper); 115 v8SetReturnValue(info, wrapper);
116 return; 116 return;
117 } 117 }
118 TOSTRING_VOID_INTERNAL(optArg, info[1]); 118 TOSTRING_VOID_INTERNAL(optArg, info[1]);
119 } 119 }
120 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 120 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
121 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 121 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
122 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, arg, optArg, exceptionState); 122 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, arg, optArg, 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.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( )); 128 impl->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInfo, wra pper, info.GetIsolate());
129 v8SetReturnValue(info, wrapper); 129 v8SetReturnValue(info, wrapper);
130 } 130 }
131 131
132 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) 132 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info)
133 { 133 {
134 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 134 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
135 V8StringResource<> arg; 135 V8StringResource<> arg;
136 V8StringResource<> arg2; 136 V8StringResource<> arg2;
137 V8StringResource<> arg3; 137 V8StringResource<> arg3;
138 { 138 {
139 TOSTRING_VOID_INTERNAL(arg, info[0]); 139 TOSTRING_VOID_INTERNAL(arg, info[0]);
140 TOSTRING_VOID_INTERNAL(arg2, info[1]); 140 TOSTRING_VOID_INTERNAL(arg2, info[1]);
141 TOSTRING_VOID_INTERNAL(arg3, info[2]); 141 TOSTRING_VOID_INTERNAL(arg3, info[2]);
142 } 142 }
143 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 143 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
144 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 144 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
145 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, arg, arg2, arg3, exceptionState); 145 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe cutionContext, document, arg, arg2, arg3, exceptionState);
146 if (exceptionState.hadException()) { 146 if (exceptionState.hadException()) {
147 exceptionState.throwIfNeeded(); 147 exceptionState.throwIfNeeded();
148 return; 148 return;
149 } 149 }
150 v8::Handle<v8::Object> wrapper = info.Holder(); 150 v8::Handle<v8::Object> wrapper = info.Holder();
151 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( )); 151 impl->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInfo, wra pper, info.GetIsolate());
152 v8SetReturnValue(info, wrapper); 152 v8SetReturnValue(info, wrapper);
153 } 153 }
154 154
155 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 155 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
156 { 156 {
157 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 157 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
158 switch (std::min(8, info.Length())) { 158 switch (std::min(8, info.Length())) {
159 case 0: 159 case 0:
160 if (true) { 160 if (true) {
161 TestInterfaceConstructorV8Internal::constructor1(info); 161 TestInterfaceConstructorV8Internal::constructor1(info);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 TOSTRING_VOID_INTERNAL(arg, info[0]); 238 TOSTRING_VOID_INTERNAL(arg, info[0]);
239 if (UNLIKELY(info.Length() <= 1)) { 239 if (UNLIKELY(info.Length() <= 1)) {
240 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate()); 240 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate());
241 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 241 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
242 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eateForJSConstructor(executionContext, document, arg, exceptionState); 242 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eateForJSConstructor(executionContext, document, arg, exceptionState);
243 if (exceptionState.hadException()) { 243 if (exceptionState.hadException()) {
244 exceptionState.throwIfNeeded(); 244 exceptionState.throwIfNeeded();
245 return; 245 return;
246 } 246 }
247 v8::Handle<v8::Object> wrapper = info.Holder(); 247 v8::Handle<v8::Object> wrapper = info.Holder();
248 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor> (impl.release(), &V8TestInterfaceConstructorConstructor::wrapperTypeInfo, wrappe r, info.GetIsolate()); 248 impl->associateWithWrapper(&V8TestInterfaceConstructorConstructor::w rapperTypeInfo, wrapper, info.GetIsolate());
249 v8SetReturnValue(info, wrapper); 249 v8SetReturnValue(info, wrapper);
250 return; 250 return;
251 } 251 }
252 TOSTRING_VOID_INTERNAL(optArg, info[1]); 252 TOSTRING_VOID_INTERNAL(optArg, info[1]);
253 } 253 }
254 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 254 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
255 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 255 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
256 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ SConstructor(executionContext, document, arg, optArg, exceptionState); 256 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ SConstructor(executionContext, document, arg, optArg, 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.re lease(), &V8TestInterfaceConstructorConstructor::wrapperTypeInfo, wrapper, info. GetIsolate()); 262 impl->associateWithWrapper(&V8TestInterfaceConstructorConstructor::wrapperTy peInfo, wrapper, info.GetIsolate());
263 v8SetReturnValue(info, wrapper); 263 v8SetReturnValue(info, wrapper);
264 } 264 }
265 265
266 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructorConstructor::domTempl ate(v8::Isolate* isolate) 266 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructorConstructor::domTempl ate(v8::Isolate* isolate)
267 { 267 {
268 static int domTemplateKey; // This address is used for a key to look up the dom template. 268 static int domTemplateKey; // This address is used for a key to look up the dom template.
269 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 269 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
270 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey); 270 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey);
271 if (!result.IsEmpty()) 271 if (!result.IsEmpty())
272 return result; 272 return result;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 return 0; 354 return 0;
355 } 355 }
356 356
357 template<> 357 template<>
358 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 358 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
359 { 359 {
360 return toV8(impl, creationContext, isolate); 360 return toV8(impl, creationContext, isolate);
361 } 361 }
362 362
363 } // namespace blink 363 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698