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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.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 "V8TestTypedefs.h" 7 #include "V8TestTypedefs.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/UnionTypesCore.h" 10 #include "bindings/core/v8/UnionTypesCore.h"
11 #include "bindings/core/v8/V8DOMConfiguration.h" 11 #include "bindings/core/v8/V8DOMConfiguration.h"
12 #include "bindings/core/v8/V8ObjectConstructor.h" 12 #include "bindings/core/v8/V8ObjectConstructor.h"
13 #include "bindings/core/v8/V8TestCallbackInterface.h" 13 #include "bindings/core/v8/V8TestCallbackInterface.h"
14 #include "bindings/core/v8/V8TestInterface.h" 14 #include "bindings/core/v8/V8TestInterface.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 "wtf/GetPtr.h" 18 #include "wtf/GetPtr.h"
19 #include "wtf/RefPtr.h" 19 #include "wtf/RefPtr.h"
20 20
21 namespace blink { 21 namespace blink {
22 22
23 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial 23 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial
24 // and does not depend on another global objects. 24 // and does not depend on another global objects.
25 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 25 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
26 #pragma clang diagnostic push 26 #pragma clang diagnostic push
27 #pragma clang diagnostic ignored "-Wglobal-constructors" 27 #pragma clang diagnostic ignored "-Wglobal-constructors"
28 #endif 28 #endif
29 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V 8TestTypedefs::domTemplate, V8TestTypedefs::refObject, V8TestTypedefs::derefObje ct, V8TestTypedefs::trace, 0, 0, V8TestTypedefs::preparePrototypeAndInterfaceObj ect, V8TestTypedefs::installConditionallyEnabledProperties, "TestTypedefs", 0, W rapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, Wrap perTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTyp eInfo::RefCountedObject }; 29 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V 8TestTypedefs::domTemplate, V8TestTypedefs::trace, 0, 0, V8TestTypedefs::prepare PrototypeAndInterfaceObject, V8TestTypedefs::installConditionallyEnabledProperti es, "TestTypedefs", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeI nfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo: :Independent };
30 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 30 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
31 #pragma clang diagnostic pop 31 #pragma clang diagnostic pop
32 #endif 32 #endif
33 33
34 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestTypedefs .h. 34 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestTypedefs .h.
35 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 35 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
36 // bindings/core/v8/ScriptWrappable.h. 36 // bindings/core/v8/ScriptWrappable.h.
37 const WrapperTypeInfo& TestTypedefs::s_wrapperTypeInfo = V8TestTypedefs::wrapper TypeInfo; 37 const WrapperTypeInfo& TestTypedefs::s_wrapperTypeInfo = V8TestTypedefs::wrapper TypeInfo;
38 38
39 namespace TestTypedefsV8Internal { 39 namespace TestTypedefsV8Internal {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun ctionCallbackInfo<v8::Value>& info) 180 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun ctionCallbackInfo<v8::Value>& info)
181 { 181 {
182 ExceptionState exceptionState(ExceptionState::ExecutionContext, "uLongLongMe thodTestInterfaceEmptyTypeSequenceArg", "TestTypedefs", info.Holder(), info.GetI solate()); 182 ExceptionState exceptionState(ExceptionState::ExecutionContext, "uLongLongMe thodTestInterfaceEmptyTypeSequenceArg", "TestTypedefs", info.Holder(), info.GetI solate());
183 if (UNLIKELY(info.Length() < 1)) { 183 if (UNLIKELY(info.Length() < 1)) {
184 setMinimumArityTypeError(exceptionState, 1, info.Length()); 184 setMinimumArityTypeError(exceptionState, 1, info.Length());
185 exceptionState.throwIfNeeded(); 185 exceptionState.throwIfNeeded();
186 return; 186 return;
187 } 187 }
188 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); 188 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
189 Vector<RefPtr<TestInterfaceEmpty>> testInterfaceEmptyTypeSequenceArg; 189 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyTypeSequenceArg;
190 { 190 {
191 testInterfaceEmptyTypeSequenceArg = (toRefPtrNativeArray<TestInterfaceEm pty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); 191 testInterfaceEmptyTypeSequenceArg = (toMemberNativeArray<TestInterfaceEm pty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState));
192 if (exceptionState.throwIfNeeded()) 192 if (exceptionState.throwIfNeeded())
193 return; 193 return;
194 } 194 }
195 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); 195 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg)));
196 } 196 }
197 197
198 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 198 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
199 { 199 {
200 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth od(info); 200 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth od(info);
201 } 201 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 if (UNLIKELY(info.Length() < 1)) { 277 if (UNLIKELY(info.Length() < 1)) {
278 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct or(info.GetIsolate(), "TestTypedefs", 1, info.Length()), info.GetIsolate()); 278 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct or(info.GetIsolate(), "TestTypedefs", 1, info.Length()), info.GetIsolate());
279 return; 279 return;
280 } 280 }
281 V8StringResource<> stringArg; 281 V8StringResource<> stringArg;
282 { 282 {
283 stringArg = info[0]; 283 stringArg = info[0];
284 if (!stringArg.prepare()) 284 if (!stringArg.prepare())
285 return; 285 return;
286 } 286 }
287 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); 287 TestTypedefs* impl = TestTypedefs::create(stringArg);
288 v8::Local<v8::Object> wrapper = info.Holder(); 288 v8::Local<v8::Object> wrapper = info.Holder();
289 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wra pperTypeInfo, wrapper); 289 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wra pperTypeInfo, wrapper);
290 v8SetReturnValue(info, wrapper); 290 v8SetReturnValue(info, wrapper);
291 } 291 }
292 292
293 } // namespace TestTypedefsV8Internal 293 } // namespace TestTypedefsV8Internal
294 294
295 // Suppress warning: global constructors, because AttributeConfiguration is triv ial 295 // Suppress warning: global constructors, because AttributeConfiguration is triv ial
296 // and does not depend on another global objects. 296 // and does not depend on another global objects.
297 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 297 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 v8::Local<v8::Object> V8TestTypedefs::findInstanceInPrototypeChain(v8::Local<v8: :Value> v8Value, v8::Isolate* isolate) 367 v8::Local<v8::Object> V8TestTypedefs::findInstanceInPrototypeChain(v8::Local<v8: :Value> v8Value, v8::Isolate* isolate)
368 { 368 {
369 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 369 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
370 } 370 }
371 371
372 TestTypedefs* V8TestTypedefs::toImplWithTypeCheck(v8::Isolate* isolate, v8::Loca l<v8::Value> value) 372 TestTypedefs* V8TestTypedefs::toImplWithTypeCheck(v8::Isolate* isolate, v8::Loca l<v8::Value> value)
373 { 373 {
374 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 374 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
375 } 375 }
376 376
377 void V8TestTypedefs::refObject(ScriptWrappable* scriptWrappable)
378 {
379 scriptWrappable->toImpl<TestTypedefs>()->ref();
380 }
381
382 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable)
383 {
384 scriptWrappable->toImpl<TestTypedefs>()->deref();
385 }
386
387 } // namespace blink 377 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698