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

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

Issue 1873323002: Have bindings layer assume and insist that all interface types are GCed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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
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 "V8TestInterfaceConstructor.h" 7 #include "V8TestInterfaceConstructor.h"
8 8
9 #include "bindings/core/v8/Dictionary.h" 9 #include "bindings/core/v8/Dictionary.h"
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
11 #include "bindings/core/v8/UnionTypesCore.h" 11 #include "bindings/core/v8/UnionTypesCore.h"
12 #include "bindings/core/v8/V8DOMConfiguration.h" 12 #include "bindings/core/v8/V8DOMConfiguration.h"
13 #include "bindings/core/v8/V8ObjectConstructor.h" 13 #include "bindings/core/v8/V8ObjectConstructor.h"
14 #include "bindings/core/v8/V8TestDictionary.h" 14 #include "bindings/core/v8/V8TestDictionary.h"
15 #include "bindings/core/v8/V8TestInterfaceEmpty.h" 15 #include "bindings/core/v8/V8TestInterfaceEmpty.h"
16 #include "core/dom/Document.h" 16 #include "core/dom/Document.h"
17 #include "core/frame/LocalDOMWindow.h" 17 #include "core/frame/LocalDOMWindow.h"
18 #include "core/frame/UseCounter.h" 18 #include "core/frame/UseCounter.h"
19 #include "wtf/GetPtr.h" 19 #include "wtf/GetPtr.h"
20 #include "wtf/RefPtr.h" 20 #include "wtf/RefPtr.h"
21 21
22 namespace blink { 22 namespace blink {
23 23
24 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial 24 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial
25 // and does not depend on another global objects. 25 // and does not depend on another global objects.
26 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 26 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
27 #pragma clang diagnostic push 27 #pragma clang diagnostic push
28 #pragma clang diagnostic ignored "-Wglobal-constructors" 28 #pragma clang diagnostic ignored "-Wglobal-constructors"
29 #endif 29 #endif
30 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor:: refObject, V8TestInterfaceConstructor::derefObject, V8TestInterfaceConstructor:: trace, 0, 0, V8TestInterfaceConstructor::preparePrototypeAndInterfaceObject, V8T estInterfaceConstructor::installConditionallyEnabledProperties, "TestInterfaceCo nstructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Obj ectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Indepen dent, WrapperTypeInfo::RefCountedObject }; 30 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor:: trace, 0, 0, V8TestInterfaceConstructor::preparePrototypeAndInterfaceObject, V8T estInterfaceConstructor::installConditionallyEnabledProperties, "TestInterfaceCo nstructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Obj ectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Indepen dent };
31 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 31 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
32 #pragma clang diagnostic pop 32 #pragma clang diagnostic pop
33 #endif 33 #endif
34 34
35 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eConstructor.h. 35 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eConstructor.h.
36 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 36 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
37 // bindings/core/v8/ScriptWrappable.h. 37 // bindings/core/v8/ScriptWrappable.h.
38 const WrapperTypeInfo& TestInterfaceConstructor::s_wrapperTypeInfo = V8TestInter faceConstructor::wrapperTypeInfo; 38 const WrapperTypeInfo& TestInterfaceConstructor::s_wrapperTypeInfo = V8TestInter faceConstructor::wrapperTypeInfo;
39 39
40 namespace TestInterfaceConstructorV8Internal { 40 namespace TestInterfaceConstructorV8Internal {
41 41
42 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) 42 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info)
43 { 43 {
44 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 44 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
45 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 45 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
46 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 46 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
47 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 47 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
48 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, document, exceptionState); 48 TestInterfaceConstructor* impl = TestInterfaceConstructor::create(scriptStat e, executionContext, document, exceptionState);
49 if (exceptionState.hadException()) { 49 if (exceptionState.hadException()) {
50 exceptionState.throwIfNeeded(); 50 exceptionState.throwIfNeeded();
51 return; 51 return;
52 } 52 }
53 v8::Local<v8::Object> wrapper = info.Holder(); 53 v8::Local<v8::Object> wrapper = info.Holder();
54 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons tructor::wrapperTypeInfo, wrapper); 54 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons tructor::wrapperTypeInfo, wrapper);
55 v8SetReturnValue(info, wrapper); 55 v8SetReturnValue(info, wrapper);
56 } 56 }
57 57
58 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) 58 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec k(info.GetIsolate(), info[8]); 108 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec k(info.GetIsolate(), info[8]);
109 if (!optionalTestInterfaceEmptyArg) { 109 if (!optionalTestInterfaceEmptyArg) {
110 exceptionState.throwTypeError("parameter 9 is not of type 'TestInter faceEmpty'."); 110 exceptionState.throwTypeError("parameter 9 is not of type 'TestInter faceEmpty'.");
111 exceptionState.throwIfNeeded(); 111 exceptionState.throwIfNeeded();
112 return; 112 return;
113 } 113 }
114 } 114 }
115 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 115 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
116 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 116 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
117 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 117 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
118 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, document, doubleArg, stringArg, testInterfaceEmptyAr g, dictionaryArg, sequenceStringArg, sequenceDictionaryArg, sequenceLongOrTestDi ctionaryArg, optionalDictionaryArg, optionalTestInterfaceEmptyArg, exceptionStat e); 118 TestInterfaceConstructor* impl = TestInterfaceConstructor::create(scriptStat e, executionContext, document, doubleArg, stringArg, testInterfaceEmptyArg, dict ionaryArg, sequenceStringArg, sequenceDictionaryArg, sequenceLongOrTestDictionar yArg, optionalDictionaryArg, optionalTestInterfaceEmptyArg, exceptionState);
119 if (exceptionState.hadException()) { 119 if (exceptionState.hadException()) {
120 exceptionState.throwIfNeeded(); 120 exceptionState.throwIfNeeded();
121 return; 121 return;
122 } 122 }
123 v8::Local<v8::Object> wrapper = info.Holder(); 123 v8::Local<v8::Object> wrapper = info.Holder();
124 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons tructor::wrapperTypeInfo, wrapper); 124 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons tructor::wrapperTypeInfo, wrapper);
125 v8SetReturnValue(info, wrapper); 125 v8SetReturnValue(info, wrapper);
126 } 126 }
127 127
128 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) 128 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
129 { 129 {
130 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 130 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
131 V8StringResource<> arg; 131 V8StringResource<> arg;
132 V8StringResource<> optArg; 132 V8StringResource<> optArg;
133 { 133 {
134 int numArgsPassed = info.Length(); 134 int numArgsPassed = info.Length();
135 while (numArgsPassed > 0) { 135 while (numArgsPassed > 0) {
136 if (!info[numArgsPassed - 1]->IsUndefined()) 136 if (!info[numArgsPassed - 1]->IsUndefined())
137 break; 137 break;
138 --numArgsPassed; 138 --numArgsPassed;
139 } 139 }
140 arg = info[0]; 140 arg = info[0];
141 if (!arg.prepare()) 141 if (!arg.prepare())
142 return; 142 return;
143 if (UNLIKELY(numArgsPassed <= 1)) { 143 if (UNLIKELY(numArgsPassed <= 1)) {
144 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 144 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
145 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate()); 145 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate());
146 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 146 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
147 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eate(scriptState, executionContext, document, arg, exceptionState); 147 TestInterfaceConstructor* impl = TestInterfaceConstructor::create(sc riptState, executionContext, document, arg, exceptionState);
148 if (exceptionState.hadException()) { 148 if (exceptionState.hadException()) {
149 exceptionState.throwIfNeeded(); 149 exceptionState.throwIfNeeded();
150 return; 150 return;
151 } 151 }
152 v8::Local<v8::Object> wrapper = info.Holder(); 152 v8::Local<v8::Object> wrapper = info.Holder();
153 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInter faceConstructor::wrapperTypeInfo, wrapper); 153 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInter faceConstructor::wrapperTypeInfo, wrapper);
154 v8SetReturnValue(info, wrapper); 154 v8SetReturnValue(info, wrapper);
155 return; 155 return;
156 } 156 }
157 optArg = info[1]; 157 optArg = info[1];
158 if (!optArg.prepare()) 158 if (!optArg.prepare())
159 return; 159 return;
160 } 160 }
161 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 161 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
162 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 162 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
163 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 163 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
164 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, document, arg, optArg, exceptionState); 164 TestInterfaceConstructor* impl = TestInterfaceConstructor::create(scriptStat e, executionContext, document, arg, optArg, exceptionState);
165 if (exceptionState.hadException()) { 165 if (exceptionState.hadException()) {
166 exceptionState.throwIfNeeded(); 166 exceptionState.throwIfNeeded();
167 return; 167 return;
168 } 168 }
169 v8::Local<v8::Object> wrapper = info.Holder(); 169 v8::Local<v8::Object> wrapper = info.Holder();
170 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons tructor::wrapperTypeInfo, wrapper); 170 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons tructor::wrapperTypeInfo, wrapper);
171 v8SetReturnValue(info, wrapper); 171 v8SetReturnValue(info, wrapper);
172 } 172 }
173 173
174 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) 174 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info)
175 { 175 {
176 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 176 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
177 V8StringResource<> arg; 177 V8StringResource<> arg;
178 V8StringResource<> arg2; 178 V8StringResource<> arg2;
179 V8StringResource<> arg3; 179 V8StringResource<> arg3;
180 { 180 {
181 arg = info[0]; 181 arg = info[0];
182 if (!arg.prepare()) 182 if (!arg.prepare())
183 return; 183 return;
184 arg2 = info[1]; 184 arg2 = info[1];
185 if (!arg2.prepare()) 185 if (!arg2.prepare())
186 return; 186 return;
187 arg3 = info[2]; 187 arg3 = info[2];
188 if (!arg3.prepare()) 188 if (!arg3.prepare())
189 return; 189 return;
190 } 190 }
191 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 191 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
192 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 192 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
193 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 193 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
194 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(scr iptState, executionContext, document, arg, arg2, arg3, exceptionState); 194 TestInterfaceConstructor* impl = TestInterfaceConstructor::create(scriptStat e, executionContext, document, arg, arg2, arg3, exceptionState);
195 if (exceptionState.hadException()) { 195 if (exceptionState.hadException()) {
196 exceptionState.throwIfNeeded(); 196 exceptionState.throwIfNeeded();
197 return; 197 return;
198 } 198 }
199 v8::Local<v8::Object> wrapper = info.Holder(); 199 v8::Local<v8::Object> wrapper = info.Holder();
200 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons tructor::wrapperTypeInfo, wrapper); 200 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons tructor::wrapperTypeInfo, wrapper);
201 v8SetReturnValue(info, wrapper); 201 v8SetReturnValue(info, wrapper);
202 } 202 }
203 203
204 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 204 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 263
264 } // namespace TestInterfaceConstructorV8Internal 264 } // namespace TestInterfaceConstructorV8Internal
265 265
266 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial 266 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial
267 // and does not depend on another global objects. 267 // and does not depend on another global objects.
268 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 268 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
269 #pragma clang diagnostic push 269 #pragma clang diagnostic push
270 #pragma clang diagnostic ignored "-Wglobal-constructors" 270 #pragma clang diagnostic ignored "-Wglobal-constructors"
271 #endif 271 #endif
272 const WrapperTypeInfo V8TestInterfaceConstructorConstructor::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceConstructorConstructor::domTemplate, V8Test InterfaceConstructor::refObject, V8TestInterfaceConstructor::derefObject, V8Test InterfaceConstructor::trace, 0, 0, V8TestInterfaceConstructor::preparePrototypeA ndInterfaceObject, V8TestInterfaceConstructor::installConditionallyEnabledProper ties, "TestInterfaceConstructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype , WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, Wr apperTypeInfo::Independent, WrapperTypeInfo::RefCountedObject }; 272 const WrapperTypeInfo V8TestInterfaceConstructorConstructor::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceConstructorConstructor::domTemplate, V8Test InterfaceConstructor::trace, 0, 0, V8TestInterfaceConstructor::preparePrototypeA ndInterfaceObject, V8TestInterfaceConstructor::installConditionallyEnabledProper ties, "TestInterfaceConstructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype , WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, Wr apperTypeInfo::Independent };
273 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 273 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
274 #pragma clang diagnostic pop 274 #pragma clang diagnostic pop
275 #endif 275 #endif
276 276
277 static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall backInfo<v8::Value>& info) 277 static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall backInfo<v8::Value>& info)
278 { 278 {
279 if (!info.IsConstructCall()) { 279 if (!info.IsConstructCall()) {
280 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("Audio")); 280 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("Audio"));
281 return; 281 return;
282 } 282 }
(...skipping 17 matching lines...) Expand all
300 break; 300 break;
301 --numArgsPassed; 301 --numArgsPassed;
302 } 302 }
303 arg = info[0]; 303 arg = info[0];
304 if (!arg.prepare()) 304 if (!arg.prepare())
305 return; 305 return;
306 if (UNLIKELY(numArgsPassed <= 1)) { 306 if (UNLIKELY(numArgsPassed <= 1)) {
307 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 307 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
308 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate()); 308 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate());
309 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 309 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
310 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eateForJSConstructor(scriptState, executionContext, document, arg, exceptionStat e); 310 TestInterfaceConstructor* impl = TestInterfaceConstructor::createFor JSConstructor(scriptState, executionContext, document, arg, exceptionState);
311 if (exceptionState.hadException()) { 311 if (exceptionState.hadException()) {
312 exceptionState.throwIfNeeded(); 312 exceptionState.throwIfNeeded();
313 return; 313 return;
314 } 314 }
315 v8::Local<v8::Object> wrapper = info.Holder(); 315 v8::Local<v8::Object> wrapper = info.Holder();
316 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInter faceConstructorConstructor::wrapperTypeInfo, wrapper); 316 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInter faceConstructorConstructor::wrapperTypeInfo, wrapper);
317 v8SetReturnValue(info, wrapper); 317 v8SetReturnValue(info, wrapper);
318 return; 318 return;
319 } 319 }
320 optArg = info[1]; 320 optArg = info[1];
321 if (!optArg.prepare()) 321 if (!optArg.prepare())
322 return; 322 return;
323 } 323 }
324 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 324 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
325 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 325 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
326 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 326 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
327 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ SConstructor(scriptState, executionContext, document, arg, optArg, exceptionStat e); 327 TestInterfaceConstructor* impl = TestInterfaceConstructor::createForJSConstr uctor(scriptState, executionContext, document, arg, optArg, exceptionState);
328 if (exceptionState.hadException()) { 328 if (exceptionState.hadException()) {
329 exceptionState.throwIfNeeded(); 329 exceptionState.throwIfNeeded();
330 return; 330 return;
331 } 331 }
332 v8::Local<v8::Object> wrapper = info.Holder(); 332 v8::Local<v8::Object> wrapper = info.Holder();
333 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons tructorConstructor::wrapperTypeInfo, wrapper); 333 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons tructorConstructor::wrapperTypeInfo, wrapper);
334 v8SetReturnValue(info, wrapper); 334 v8SetReturnValue(info, wrapper);
335 } 335 }
336 336
337 v8::Local<v8::FunctionTemplate> V8TestInterfaceConstructorConstructor::domTempla te(v8::Isolate* isolate) 337 v8::Local<v8::FunctionTemplate> V8TestInterfaceConstructorConstructor::domTempla te(v8::Isolate* isolate)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 v8::Local<v8::Object> V8TestInterfaceConstructor::findInstanceInPrototypeChain(v 8::Local<v8::Value> v8Value, v8::Isolate* isolate) 396 v8::Local<v8::Object> V8TestInterfaceConstructor::findInstanceInPrototypeChain(v 8::Local<v8::Value> v8Value, v8::Isolate* isolate)
397 { 397 {
398 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 398 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
399 } 399 }
400 400
401 TestInterfaceConstructor* V8TestInterfaceConstructor::toImplWithTypeCheck(v8::Is olate* isolate, v8::Local<v8::Value> value) 401 TestInterfaceConstructor* V8TestInterfaceConstructor::toImplWithTypeCheck(v8::Is olate* isolate, v8::Local<v8::Value> value)
402 { 402 {
403 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 403 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
404 } 404 }
405 405
406 void V8TestInterfaceConstructor::refObject(ScriptWrappable* scriptWrappable)
407 {
408 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref();
409 }
410
411 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable)
412 {
413 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref();
414 }
415
416 } // namespace blink 406 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698