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

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

Issue 819853002: [bindings] Translate all assignments in bindings/templates to use Local<> in place of Handle<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
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 26 matching lines...) Expand all
37 { 37 {
38 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 38 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
39 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 39 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
40 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 40 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
41 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 41 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
42 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, document, exceptionState); 42 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, document, exceptionState);
43 if (exceptionState.hadException()) { 43 if (exceptionState.hadException()) {
44 exceptionState.throwIfNeeded(); 44 exceptionState.throwIfNeeded();
45 return; 45 return;
46 } 46 }
47 v8::Handle<v8::Object> wrapper = info.Holder(); 47 v8::Local<v8::Object> wrapper = info.Holder();
48 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w rapperTypeInfo, wrapper); 48 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w rapperTypeInfo, wrapper);
49 v8SetReturnValue(info, wrapper); 49 v8SetReturnValue(info, wrapper);
50 } 50 }
51 51
52 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) 52 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
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 double doubleArg; 55 double doubleArg;
56 V8StringResource<> stringArg; 56 V8StringResource<> stringArg;
57 TestInterfaceEmpty* testInterfaceEmptyArg; 57 TestInterfaceEmpty* testInterfaceEmptyArg;
(...skipping 23 matching lines...) Expand all
81 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec k(info.GetIsolate(), info[7]); 81 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec k(info.GetIsolate(), info[7]);
82 } 82 }
83 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 83 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
84 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 84 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
85 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 85 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
86 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, document, doubleArg, stringArg, testInterfaceEmptyAr g, dictionaryArg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryAr g, optionalTestInterfaceEmptyArg, exceptionState); 86 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, document, doubleArg, stringArg, testInterfaceEmptyAr g, dictionaryArg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryAr g, optionalTestInterfaceEmptyArg, exceptionState);
87 if (exceptionState.hadException()) { 87 if (exceptionState.hadException()) {
88 exceptionState.throwIfNeeded(); 88 exceptionState.throwIfNeeded();
89 return; 89 return;
90 } 90 }
91 v8::Handle<v8::Object> wrapper = info.Holder(); 91 v8::Local<v8::Object> wrapper = info.Holder();
92 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w rapperTypeInfo, wrapper); 92 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w rapperTypeInfo, wrapper);
93 v8SetReturnValue(info, wrapper); 93 v8SetReturnValue(info, wrapper);
94 } 94 }
95 95
96 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) 96 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
97 { 97 {
98 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 98 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
99 V8StringResource<> arg; 99 V8StringResource<> arg;
100 V8StringResource<> optArg; 100 V8StringResource<> optArg;
101 { 101 {
102 TOSTRING_VOID_INTERNAL(arg, info[0]); 102 TOSTRING_VOID_INTERNAL(arg, info[0]);
103 if (UNLIKELY(info.Length() <= 1)) { 103 if (UNLIKELY(info.Length() <= 1)) {
104 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 104 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
105 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate()); 105 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate());
106 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 106 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
107 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eate(scriptState, executionContext, document, arg, exceptionState); 107 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eate(scriptState, executionContext, document, arg, exceptionState);
108 if (exceptionState.hadException()) { 108 if (exceptionState.hadException()) {
109 exceptionState.throwIfNeeded(); 109 exceptionState.throwIfNeeded();
110 return; 110 return;
111 } 111 }
112 v8::Handle<v8::Object> wrapper = info.Holder(); 112 v8::Local<v8::Object> wrapper = info.Holder();
113 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr uctor::wrapperTypeInfo, wrapper); 113 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr uctor::wrapperTypeInfo, wrapper);
114 v8SetReturnValue(info, wrapper); 114 v8SetReturnValue(info, wrapper);
115 return; 115 return;
116 } 116 }
117 TOSTRING_VOID_INTERNAL(optArg, info[1]); 117 TOSTRING_VOID_INTERNAL(optArg, info[1]);
118 } 118 }
119 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 119 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
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(scr iptState, executionContext, document, arg, optArg, exceptionState); 122 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, 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::Local<v8::Object> wrapper = info.Holder();
128 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w rapperTypeInfo, wrapper); 128 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w rapperTypeInfo, wrapper);
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 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 143 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
144 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 144 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
145 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 145 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
146 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, document, arg, arg2, arg3, exceptionState); 146 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, document, arg, arg2, arg3, exceptionState);
147 if (exceptionState.hadException()) { 147 if (exceptionState.hadException()) {
148 exceptionState.throwIfNeeded(); 148 exceptionState.throwIfNeeded();
149 return; 149 return;
150 } 150 }
151 v8::Handle<v8::Object> wrapper = info.Holder(); 151 v8::Local<v8::Object> wrapper = info.Holder();
152 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w rapperTypeInfo, wrapper); 152 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w rapperTypeInfo, wrapper);
153 v8SetReturnValue(info, wrapper); 153 v8SetReturnValue(info, wrapper);
154 } 154 }
155 155
156 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 156 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
157 { 157 {
158 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 158 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
159 switch (std::min(8, info.Length())) { 159 switch (std::min(8, info.Length())) {
160 case 0: 160 case 0:
161 if (true) { 161 if (true) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 TOSTRING_VOID_INTERNAL(arg, info[0]); 239 TOSTRING_VOID_INTERNAL(arg, info[0]);
240 if (UNLIKELY(info.Length() <= 1)) { 240 if (UNLIKELY(info.Length() <= 1)) {
241 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 241 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
242 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate()); 242 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate());
243 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 243 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
244 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eateForJSConstructor(scriptState, executionContext, document, arg, exceptionStat e); 244 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eateForJSConstructor(scriptState, executionContext, document, arg, exceptionStat e);
245 if (exceptionState.hadException()) { 245 if (exceptionState.hadException()) {
246 exceptionState.throwIfNeeded(); 246 exceptionState.throwIfNeeded();
247 return; 247 return;
248 } 248 }
249 v8::Handle<v8::Object> wrapper = info.Holder(); 249 v8::Local<v8::Object> wrapper = info.Holder();
250 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr uctorConstructor::wrapperTypeInfo, wrapper); 250 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr uctorConstructor::wrapperTypeInfo, wrapper);
251 v8SetReturnValue(info, wrapper); 251 v8SetReturnValue(info, wrapper);
252 return; 252 return;
253 } 253 }
254 TOSTRING_VOID_INTERNAL(optArg, info[1]); 254 TOSTRING_VOID_INTERNAL(optArg, info[1]);
255 } 255 }
256 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 256 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
257 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 257 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
258 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 258 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
259 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ SConstructor(scriptState, executionContext, document, arg, optArg, exceptionStat e); 259 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ SConstructor(scriptState, executionContext, document, arg, optArg, exceptionStat e);
260 if (exceptionState.hadException()) { 260 if (exceptionState.hadException()) {
261 exceptionState.throwIfNeeded(); 261 exceptionState.throwIfNeeded();
262 return; 262 return;
263 } 263 }
264 v8::Handle<v8::Object> wrapper = info.Holder(); 264 v8::Local<v8::Object> wrapper = info.Holder();
265 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructorCon structor::wrapperTypeInfo, wrapper); 265 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructorCon structor::wrapperTypeInfo, wrapper);
266 v8SetReturnValue(info, wrapper); 266 v8SetReturnValue(info, wrapper);
267 } 267 }
268 268
269 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructorConstructor::domTempl ate(v8::Isolate* isolate) 269 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructorConstructor::domTempl ate(v8::Isolate* isolate)
270 { 270 {
271 static int domTemplateKey; // This address is used for a key to look up the dom template. 271 static int domTemplateKey; // This address is used for a key to look up the dom template.
272 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 272 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
273 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey); 273 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey);
274 if (!result.IsEmpty()) 274 if (!result.IsEmpty())
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 { 345 {
346 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref(); 346 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref();
347 } 347 }
348 348
349 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable) 349 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable)
350 { 350 {
351 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref(); 351 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref();
352 } 352 }
353 353
354 } // namespace blink 354 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698