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

Side by Side Diff: Source/bindings/tests/results/V8TestNamedConstructor.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 23 matching lines...) Expand all
34 static WrapperTypeInfo info; 34 static WrapperTypeInfo info;
35 }; 35 };
36 36
37 class V8TestNamedConstructor { 37 class V8TestNamedConstructor {
38 public: 38 public:
39 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e); 39 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e);
40 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); 40 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
41 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor ldType); 41 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor ldType);
42 static TestNamedConstructor* toNative(v8::Handle<v8::Object> object) 42 static TestNamedConstructor* toNative(v8::Handle<v8::Object> object)
43 { 43 {
44 return reinterpret_cast<TestNamedConstructor*>(object->GetAlignedPointer FromInternalField(v8DOMWrapperObjectIndex)); 44 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
45 } 45 }
46 static void derefObject(void*); 46 static void derefObject(void*);
47 static WrapperTypeInfo info; 47 static WrapperTypeInfo info;
48 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>); 48 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>);
49 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 49 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
50 static inline void* toInternalPointer(TestNamedConstructor* impl)
51 {
52 return impl;
53 }
54
55 static inline TestNamedConstructor* fromInternalPointer(void* object)
56 {
57 return static_cast<TestNamedConstructor*>(object);
58 }
50 static void installPerContextProperties(v8::Handle<v8::Object>, TestNamedCon structor*, v8::Isolate*) { } 59 static void installPerContextProperties(v8::Handle<v8::Object>, TestNamedCon structor*, v8::Isolate*) { }
51 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8: :Isolate*) { } 60 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8: :Isolate*) { }
52 private: 61 private:
53 friend v8::Handle<v8::Object> wrap(TestNamedConstructor*, v8::Handle<v8::Obj ect> creationContext, v8::Isolate*); 62 friend v8::Handle<v8::Object> wrap(TestNamedConstructor*, v8::Handle<v8::Obj ect> creationContext, v8::Isolate*);
54 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestNamedConstructor> , v8::Handle<v8::Object> creationContext, v8::Isolate*); 63 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestNamedConstructor> , v8::Handle<v8::Object> creationContext, v8::Isolate*);
55 }; 64 };
56 65
57 template<> 66 template<>
58 class WrapperTypeTraits<TestNamedConstructor > { 67 class WrapperTypeTraits<TestNamedConstructor > {
59 public: 68 public:
60 static WrapperTypeInfo* info() { return &V8TestNamedConstructor::info; } 69 static WrapperTypeInfo* info() { return &V8TestNamedConstructor::info; }
61 }; 70 };
62 71
63 72
64 inline v8::Handle<v8::Object> wrap(TestNamedConstructor* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate) 73 inline v8::Handle<v8::Object> wrap(TestNamedConstructor* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate)
65 { 74 {
66 ASSERT(impl); 75 ASSERT(impl);
67 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); 76 ASSERT(DOMDataStore::getWrapper<V8TestNamedConstructor>(impl, isolate).IsEmp ty());
68 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) { 77 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) {
69 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl); 78 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl);
70 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have 79 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have
71 // the same object de-ref functions, though, so use that as the basis of the check. 80 // the same object de-ref functions, though, so use that as the basis of the check.
72 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == V8TestNamedConstructor::info.derefObjectFunction); 81 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == V8TestNamedConstructor::info.derefObjectFunction);
73 } 82 }
74 return V8TestNamedConstructor::createWrapper(impl, creationContext, isolate) ; 83 return V8TestNamedConstructor::createWrapper(impl, creationContext, isolate) ;
75 } 84 }
76 85
77 inline v8::Handle<v8::Value> toV8(TestNamedConstructor* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate) 86 inline v8::Handle<v8::Value> toV8(TestNamedConstructor* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate)
78 { 87 {
79 if (UNLIKELY(!impl)) 88 if (UNLIKELY(!impl))
80 return v8NullWithCheck(isolate); 89 return v8NullWithCheck(isolate);
81 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); 90 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestNamedConstruc tor>(impl, isolate);
82 if (!wrapper.IsEmpty()) 91 if (!wrapper.IsEmpty())
83 return wrapper; 92 return wrapper;
84 return wrap(impl, creationContext, isolate); 93 return wrap(impl, creationContext, isolate);
85 } 94 }
86 95
87 inline v8::Handle<v8::Value> toV8ForMainWorld(TestNamedConstructor* impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate) 96 inline v8::Handle<v8::Value> toV8ForMainWorld(TestNamedConstructor* impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate)
88 { 97 {
89 ASSERT(worldType(isolate) == MainWorld); 98 ASSERT(worldType(isolate) == MainWorld);
90 if (UNLIKELY(!impl)) 99 if (UNLIKELY(!impl))
91 return v8NullWithCheck(isolate); 100 return v8NullWithCheck(isolate);
92 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld(impl); 101 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld<V8TestN amedConstructor>(impl);
93 if (!wrapper.IsEmpty()) 102 if (!wrapper.IsEmpty())
94 return wrapper; 103 return wrapper;
95 return wrap(impl, creationContext, isolate); 104 return wrap(impl, creationContext, isolate);
96 } 105 }
97 106
98 template<class HolderContainer, class Wrappable> 107 template<class HolderContainer, class Wrappable>
99 inline v8::Handle<v8::Value> toV8Fast(TestNamedConstructor* impl, const HolderCo ntainer& container, Wrappable* wrappable) 108 inline v8::Handle<v8::Value> toV8Fast(TestNamedConstructor* impl, const HolderCo ntainer& container, Wrappable* wrappable)
100 { 109 {
101 if (UNLIKELY(!impl)) 110 if (UNLIKELY(!impl))
102 return v8::Null(container.GetIsolate()); 111 return v8::Null(container.GetIsolate());
103 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, containe r, wrappable); 112 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast<V8TestNamedCon structor>(impl, container, wrappable);
104 if (!wrapper.IsEmpty()) 113 if (!wrapper.IsEmpty())
105 return wrapper; 114 return wrapper;
106 return wrap(impl, container.Holder(), container.GetIsolate()); 115 return wrap(impl, container.Holder(), container.GetIsolate());
107 } 116 }
108 117
109 template<class HolderContainer, class Wrappable> 118 template<class HolderContainer, class Wrappable>
110 inline v8::Handle<v8::Value> toV8FastForMainWorld(TestNamedConstructor* impl, co nst HolderContainer& container, Wrappable* wrappable) 119 inline v8::Handle<v8::Value> toV8FastForMainWorld(TestNamedConstructor* impl, co nst HolderContainer& container, Wrappable* wrappable)
111 { 120 {
112 ASSERT(worldType(container.GetIsolate()) == MainWorld); 121 ASSERT(worldType(container.GetIsolate()) == MainWorld);
113 if (UNLIKELY(!impl)) 122 if (UNLIKELY(!impl))
114 return v8::Null(container.GetIsolate()); 123 return v8::Null(container.GetIsolate());
115 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl); 124 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld<V8Test NamedConstructor>(impl);
116 if (!wrapper.IsEmpty()) 125 if (!wrapper.IsEmpty())
117 return wrapper; 126 return wrapper;
118 return wrap(impl, container.Holder(), container.GetIsolate()); 127 return wrap(impl, container.Holder(), container.GetIsolate());
119 } 128 }
120 129
121 template<class HolderContainer, class Wrappable> 130 template<class HolderContainer, class Wrappable>
122 inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestNamedConstruct or > impl, const HolderContainer& container, Wrappable* wrappable) 131 inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestNamedConstruct or > impl, const HolderContainer& container, Wrappable* wrappable)
123 { 132 {
124 return toV8FastForMainWorld(impl.get(), container, wrappable); 133 return toV8FastForMainWorld(impl.get(), container, wrappable);
125 } 134 }
126 135
127 136
128 template<class HolderContainer, class Wrappable> 137 template<class HolderContainer, class Wrappable>
129 inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestNamedConstructor > impl, c onst HolderContainer& container, Wrappable* wrappable) 138 inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestNamedConstructor > impl, c onst HolderContainer& container, Wrappable* wrappable)
130 { 139 {
131 return toV8Fast(impl.get(), container, wrappable); 140 return toV8Fast(impl.get(), container, wrappable);
132 } 141 }
133 142
134 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNamedConstructor > impl, v8::H andle<v8::Object> creationContext, v8::Isolate* isolate) 143 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNamedConstructor > impl, v8::H andle<v8::Object> creationContext, v8::Isolate* isolate)
135 { 144 {
136 return toV8(impl.get(), creationContext, isolate); 145 return toV8(impl.get(), creationContext, isolate);
137 } 146 }
138 147
139 } 148 }
140 149
141 #endif // V8TestNamedConstructor_h 150 #endif // V8TestNamedConstructor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698