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

Side by Side Diff: Source/bindings/tests/results/V8TestOverloadedConstructors.h

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 17 matching lines...) Expand all
28 28
29 namespace WebCore { 29 namespace WebCore {
30 30
31 class V8TestOverloadedConstructors { 31 class V8TestOverloadedConstructors {
32 public: 32 public:
33 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e); 33 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e);
34 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); 34 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
35 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor ldType); 35 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor ldType);
36 static TestOverloadedConstructors* toNative(v8::Handle<v8::Object> object) 36 static TestOverloadedConstructors* toNative(v8::Handle<v8::Object> object)
37 { 37 {
38 return reinterpret_cast<TestOverloadedConstructors*>(object->GetAlignedP ointerFromInternalField(v8DOMWrapperObjectIndex)); 38 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
39 } 39 }
40 static void derefObject(void*); 40 static void derefObject(void*);
41 static WrapperTypeInfo info; 41 static WrapperTypeInfo info;
42 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); 42 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
43 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 43 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
44 static inline void* toInternalPointer(TestOverloadedConstructors* impl)
45 {
46 return impl;
47 }
48
49 static inline TestOverloadedConstructors* fromInternalPointer(void* object)
50 {
51 return static_cast<TestOverloadedConstructors*>(object);
52 }
44 static void installPerContextProperties(v8::Handle<v8::Object>, TestOverload edConstructors*, v8::Isolate*) { } 53 static void installPerContextProperties(v8::Handle<v8::Object>, TestOverload edConstructors*, v8::Isolate*) { }
45 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8: :Isolate*) { } 54 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8: :Isolate*) { }
46 private: 55 private:
47 friend v8::Handle<v8::Object> wrap(TestOverloadedConstructors*, v8::Handle<v 8::Object> creationContext, v8::Isolate*); 56 friend v8::Handle<v8::Object> wrap(TestOverloadedConstructors*, v8::Handle<v 8::Object> creationContext, v8::Isolate*);
48 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestOverloadedConstru ctors>, v8::Handle<v8::Object> creationContext, v8::Isolate*); 57 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestOverloadedConstru ctors>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
49 }; 58 };
50 59
51 template<> 60 template<>
52 class WrapperTypeTraits<TestOverloadedConstructors > { 61 class WrapperTypeTraits<TestOverloadedConstructors > {
53 public: 62 public:
54 static WrapperTypeInfo* info() { return &V8TestOverloadedConstructors::info; } 63 static WrapperTypeInfo* info() { return &V8TestOverloadedConstructors::info; }
55 }; 64 };
56 65
57 66
58 inline v8::Handle<v8::Object> wrap(TestOverloadedConstructors* impl, v8::Handle< v8::Object> creationContext, v8::Isolate* isolate) 67 inline v8::Handle<v8::Object> wrap(TestOverloadedConstructors* impl, v8::Handle< v8::Object> creationContext, v8::Isolate* isolate)
59 { 68 {
60 ASSERT(impl); 69 ASSERT(impl);
61 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); 70 ASSERT(DOMDataStore::getWrapper<V8TestOverloadedConstructors>(impl, isolate) .IsEmpty());
62 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) { 71 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) {
63 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl); 72 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl);
64 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have 73 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have
65 // the same object de-ref functions, though, so use that as the basis of the check. 74 // the same object de-ref functions, though, so use that as the basis of the check.
66 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == V8TestOverloadedConstructors::info.derefObjectFunction); 75 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == V8TestOverloadedConstructors::info.derefObjectFunction);
67 } 76 }
68 return V8TestOverloadedConstructors::createWrapper(impl, creationContext, is olate); 77 return V8TestOverloadedConstructors::createWrapper(impl, creationContext, is olate);
69 } 78 }
70 79
71 inline v8::Handle<v8::Value> toV8(TestOverloadedConstructors* impl, v8::Handle<v 8::Object> creationContext, v8::Isolate* isolate) 80 inline v8::Handle<v8::Value> toV8(TestOverloadedConstructors* impl, v8::Handle<v 8::Object> creationContext, v8::Isolate* isolate)
72 { 81 {
73 if (UNLIKELY(!impl)) 82 if (UNLIKELY(!impl))
74 return v8NullWithCheck(isolate); 83 return v8NullWithCheck(isolate);
75 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); 84 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestOverloadedCon structors>(impl, isolate);
76 if (!wrapper.IsEmpty()) 85 if (!wrapper.IsEmpty())
77 return wrapper; 86 return wrapper;
78 return wrap(impl, creationContext, isolate); 87 return wrap(impl, creationContext, isolate);
79 } 88 }
80 89
81 inline v8::Handle<v8::Value> toV8ForMainWorld(TestOverloadedConstructors* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 90 inline v8::Handle<v8::Value> toV8ForMainWorld(TestOverloadedConstructors* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
82 { 91 {
83 ASSERT(worldType(isolate) == MainWorld); 92 ASSERT(worldType(isolate) == MainWorld);
84 if (UNLIKELY(!impl)) 93 if (UNLIKELY(!impl))
85 return v8NullWithCheck(isolate); 94 return v8NullWithCheck(isolate);
86 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld(impl); 95 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld<V8TestO verloadedConstructors>(impl);
87 if (!wrapper.IsEmpty()) 96 if (!wrapper.IsEmpty())
88 return wrapper; 97 return wrapper;
89 return wrap(impl, creationContext, isolate); 98 return wrap(impl, creationContext, isolate);
90 } 99 }
91 100
92 template<class HolderContainer, class Wrappable> 101 template<class HolderContainer, class Wrappable>
93 inline v8::Handle<v8::Value> toV8Fast(TestOverloadedConstructors* impl, const Ho lderContainer& container, Wrappable* wrappable) 102 inline v8::Handle<v8::Value> toV8Fast(TestOverloadedConstructors* impl, const Ho lderContainer& container, Wrappable* wrappable)
94 { 103 {
95 if (UNLIKELY(!impl)) 104 if (UNLIKELY(!impl))
96 return v8::Null(container.GetIsolate()); 105 return v8::Null(container.GetIsolate());
97 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, containe r, wrappable); 106 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast<V8TestOverload edConstructors>(impl, container, wrappable);
98 if (!wrapper.IsEmpty()) 107 if (!wrapper.IsEmpty())
99 return wrapper; 108 return wrapper;
100 return wrap(impl, container.Holder(), container.GetIsolate()); 109 return wrap(impl, container.Holder(), container.GetIsolate());
101 } 110 }
102 111
103 template<class HolderContainer, class Wrappable> 112 template<class HolderContainer, class Wrappable>
104 inline v8::Handle<v8::Value> toV8FastForMainWorld(TestOverloadedConstructors* im pl, const HolderContainer& container, Wrappable* wrappable) 113 inline v8::Handle<v8::Value> toV8FastForMainWorld(TestOverloadedConstructors* im pl, const HolderContainer& container, Wrappable* wrappable)
105 { 114 {
106 ASSERT(worldType(container.GetIsolate()) == MainWorld); 115 ASSERT(worldType(container.GetIsolate()) == MainWorld);
107 if (UNLIKELY(!impl)) 116 if (UNLIKELY(!impl))
108 return v8::Null(container.GetIsolate()); 117 return v8::Null(container.GetIsolate());
109 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl); 118 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld<V8Test OverloadedConstructors>(impl);
110 if (!wrapper.IsEmpty()) 119 if (!wrapper.IsEmpty())
111 return wrapper; 120 return wrapper;
112 return wrap(impl, container.Holder(), container.GetIsolate()); 121 return wrap(impl, container.Holder(), container.GetIsolate());
113 } 122 }
114 123
115 template<class HolderContainer, class Wrappable> 124 template<class HolderContainer, class Wrappable>
116 inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestOverloadedCons tructors > impl, const HolderContainer& container, Wrappable* wrappable) 125 inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestOverloadedCons tructors > impl, const HolderContainer& container, Wrappable* wrappable)
117 { 126 {
118 return toV8FastForMainWorld(impl.get(), container, wrappable); 127 return toV8FastForMainWorld(impl.get(), container, wrappable);
119 } 128 }
120 129
121 130
122 template<class HolderContainer, class Wrappable> 131 template<class HolderContainer, class Wrappable>
123 inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestOverloadedConstructors > i mpl, const HolderContainer& container, Wrappable* wrappable) 132 inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestOverloadedConstructors > i mpl, const HolderContainer& container, Wrappable* wrappable)
124 { 133 {
125 return toV8Fast(impl.get(), container, wrappable); 134 return toV8Fast(impl.get(), container, wrappable);
126 } 135 }
127 136
128 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestOverloadedConstructors > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 137 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestOverloadedConstructors > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
129 { 138 {
130 return toV8(impl.get(), creationContext, isolate); 139 return toV8(impl.get(), creationContext, isolate);
131 } 140 }
132 141
133 } 142 }
134 143
135 #endif // V8TestOverloadedConstructors_h 144 #endif // V8TestOverloadedConstructors_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/bindings/tests/results/V8TestOverloadedConstructors.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698