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

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

Issue 217053007: Revert of Make DOMWrapperWorld::current() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert 213543004 too Created 6 years, 9 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 // 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 #ifndef V8TestObject_h 7 #ifndef V8TestObjectPython_h
8 #define V8TestObject_h 8 #define V8TestObjectPython_h
9 9
10 #include "bindings/tests/idls/TestObject.h" 10 #include "bindings/tests/idls/TestObjectPython.h"
11 #include "bindings/v8/V8Binding.h" 11 #include "bindings/v8/V8Binding.h"
12 #include "bindings/v8/V8DOMWrapper.h" 12 #include "bindings/v8/V8DOMWrapper.h"
13 #include "bindings/v8/WrapperTypeInfo.h" 13 #include "bindings/v8/WrapperTypeInfo.h"
14 #include "heap/Handle.h" 14 #include "heap/Handle.h"
15 15
16 namespace WebCore { 16 namespace WebCore {
17 17
18 class V8TestObject { 18 class V8TestObjectPython {
19 public: 19 public:
20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); 20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*);
21 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*); 21 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*);
22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); 22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*);
23 static TestObject* toNative(v8::Handle<v8::Object> object) 23 static TestObjectPython* toNative(v8::Handle<v8::Object> object)
24 { 24 {
25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex)); 25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
26 } 26 }
27 static TestObject* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value> ); 27 static TestObjectPython* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8:: Value>);
28 static const WrapperTypeInfo wrapperTypeInfo; 28 static const WrapperTypeInfo wrapperTypeInfo;
29 static void derefObject(void*); 29 static void derefObject(void*);
30 static void customVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8:: Value>&); 30 static void customVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8:: Value>&);
31 #if ENABLE(CONDITION) 31 #if ENABLE(CONDITION)
32 static void conditionalConditionCustomVoidMethodMethodCustom(const v8::Funct ionCallbackInfo<v8::Value>&); 32 static void conditionalConditionCustomVoidMethodMethodCustom(const v8::Funct ionCallbackInfo<v8::Value>&);
33 #endif // ENABLE(CONDITION) 33 #endif // ENABLE(CONDITION)
34 static void customObjectAttributeAttributeGetterCustom(const v8::PropertyCal lbackInfo<v8::Value>&); 34 static void customObjectAttributeAttributeGetterCustom(const v8::PropertyCal lbackInfo<v8::Value>&);
35 static void customObjectAttributeAttributeSetterCustom(v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&); 35 static void customObjectAttributeAttributeSetterCustom(v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&);
36 static void customGetterLongAttributeAttributeGetterCustom(const v8::Propert yCallbackInfo<v8::Value>&); 36 static void customGetterLongAttributeAttributeGetterCustom(const v8::Propert yCallbackInfo<v8::Value>&);
37 static void customGetterReadonlyObjectAttributeAttributeGetterCustom(const v 8::PropertyCallbackInfo<v8::Value>&); 37 static void customGetterReadonlyObjectAttributeAttributeGetterCustom(const v 8::PropertyCallbackInfo<v8::Value>&);
38 static void customSetterLongAttributeAttributeSetterCustom(v8::Local<v8::Val ue>, const v8::PropertyCallbackInfo<void>&); 38 static void customSetterLongAttributeAttributeSetterCustom(v8::Local<v8::Val ue>, const v8::PropertyCallbackInfo<void>&);
39 #if ENABLE(CONDITION) 39 #if ENABLE(CONDITION)
40 static void customLongAttributeAttributeGetterCustom(const v8::PropertyCallb ackInfo<v8::Value>&); 40 static void customLongAttributeAttributeGetterCustom(const v8::PropertyCallb ackInfo<v8::Value>&);
41 #endif // ENABLE(CONDITION) 41 #endif // ENABLE(CONDITION)
42 #if ENABLE(CONDITION) 42 #if ENABLE(CONDITION)
43 static void customLongAttributeAttributeSetterCustom(v8::Local<v8::Value>, c onst v8::PropertyCallbackInfo<void>&); 43 static void customLongAttributeAttributeSetterCustom(v8::Local<v8::Value>, c onst v8::PropertyCallbackInfo<void>&);
44 #endif // ENABLE(CONDITION) 44 #endif // ENABLE(CONDITION)
45 static void customImplementedAsLongAttributeAttributeGetterCustom(const v8:: PropertyCallbackInfo<v8::Value>&); 45 static void customImplementedAsLongAttributeAttributeGetterCustom(const v8:: PropertyCallbackInfo<v8::Value>&);
46 static void customImplementedAsLongAttributeAttributeSetterCustom(v8::Local< v8::Value>, const v8::PropertyCallbackInfo<void>&); 46 static void customImplementedAsLongAttributeAttributeSetterCustom(v8::Local< v8::Value>, const v8::PropertyCallbackInfo<void>&);
47 static void customGetterImplementedAsLongAttributeAttributeGetterCustom(cons t v8::PropertyCallbackInfo<v8::Value>&); 47 static void customGetterImplementedAsLongAttributeAttributeGetterCustom(cons t v8::PropertyCallbackInfo<v8::Value>&);
48 static void customSetterImplementedAsLongAttributeAttributeSetterCustom(v8:: Local<v8::Value>, const v8::PropertyCallbackInfo<void>&); 48 static void customSetterImplementedAsLongAttributeAttributeSetterCustom(v8:: Local<v8::Value>, const v8::PropertyCallbackInfo<void>&);
49 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 49 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
50 static inline void* toInternalPointer(TestObject* impl) 50 static inline void* toInternalPointer(TestObjectPython* impl)
51 { 51 {
52 return impl; 52 return impl;
53 } 53 }
54 54
55 static inline TestObject* fromInternalPointer(void* object) 55 static inline TestObjectPython* fromInternalPointer(void* object)
56 { 56 {
57 return static_cast<TestObject*>(object); 57 return static_cast<TestObjectPython*>(object);
58 } 58 }
59 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO bject*, v8::Isolate*); 59 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO bjectPython*, v8::Isolate*);
60 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*); 60 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*);
61 61
62 private: 62 private:
63 friend v8::Handle<v8::Object> wrap(TestObject*, v8::Handle<v8::Object> creat ionContext, v8::Isolate*); 63 friend v8::Handle<v8::Object> wrap(TestObjectPython*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
64 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObject>, v8::Hand le<v8::Object> creationContext, v8::Isolate*); 64 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObjectPython>, v8 ::Handle<v8::Object> creationContext, v8::Isolate*);
65 }; 65 };
66 66
67 inline v8::Handle<v8::Object> wrap(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate) 67 inline v8::Handle<v8::Object> wrap(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate)
68 { 68 {
69 ASSERT(impl); 69 ASSERT(impl);
70 ASSERT(!DOMDataStore::containsWrapper<V8TestObject>(impl, isolate)); 70 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl, isolate));
71 return V8TestObject::createWrapper(impl, creationContext, isolate); 71 return V8TestObjectPython::createWrapper(impl, creationContext, isolate);
72 } 72 }
73 73
74 inline v8::Handle<v8::Value> toV8(TestObject* impl, v8::Handle<v8::Object> creat ionContext, v8::Isolate* isolate) 74 inline v8::Handle<v8::Value> toV8(TestObjectPython* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
75 { 75 {
76 if (UNLIKELY(!impl)) 76 if (UNLIKELY(!impl))
77 return v8::Null(isolate); 77 return v8::Null(isolate);
78 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestObject>(impl, isolate); 78 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestObjectPython> (impl, isolate);
79 if (!wrapper.IsEmpty()) 79 if (!wrapper.IsEmpty())
80 return wrapper; 80 return wrapper;
81 return wrap(impl, creationContext, isolate); 81 return wrap(impl, creationContext, isolate);
82 } 82 }
83 83
84 template<typename CallbackInfo> 84 template<typename CallbackInfo>
85 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestObject* impl) 85 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestObjectPython* impl)
86 { 86 {
87 if (UNLIKELY(!impl)) { 87 if (UNLIKELY(!impl)) {
88 v8SetReturnValueNull(callbackInfo); 88 v8SetReturnValueNull(callbackInfo);
89 return; 89 return;
90 } 90 }
91 if (DOMDataStore::setReturnValueFromWrapper<V8TestObject>(callbackInfo.GetRe turnValue(), impl)) 91 if (DOMDataStore::setReturnValueFromWrapper<V8TestObjectPython>(callbackInfo .GetReturnValue(), impl))
92 return; 92 return;
93 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 93 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
94 v8SetReturnValue(callbackInfo, wrapper); 94 v8SetReturnValue(callbackInfo, wrapper);
95 } 95 }
96 96
97 template<typename CallbackInfo> 97 template<typename CallbackInfo>
98 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestO bject* impl) 98 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestO bjectPython* impl)
99 { 99 {
100 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld()); 100 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate())->isMainWorld());
101 if (UNLIKELY(!impl)) { 101 if (UNLIKELY(!impl)) {
102 v8SetReturnValueNull(callbackInfo); 102 v8SetReturnValueNull(callbackInfo);
103 return; 103 return;
104 } 104 }
105 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObject>(callba ckInfo.GetReturnValue(), impl)) 105 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObjectPython>( callbackInfo.GetReturnValue(), impl))
106 return; 106 return;
107 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate()); 107 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate());
108 v8SetReturnValue(callbackInfo, wrapper); 108 v8SetReturnValue(callbackInfo, wrapper);
109 } 109 }
110 110
111 template<class CallbackInfo, class Wrappable> 111 template<class CallbackInfo, class Wrappable>
112 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestObject* i mpl, Wrappable* wrappable) 112 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestObjectPyt hon* impl, Wrappable* wrappable)
113 { 113 {
114 if (UNLIKELY(!impl)) { 114 if (UNLIKELY(!impl)) {
115 v8SetReturnValueNull(callbackInfo); 115 v8SetReturnValueNull(callbackInfo);
116 return; 116 return;
117 } 117 }
118 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestObject>(callbackInfo.G etReturnValue(), impl, callbackInfo.Holder(), wrappable)) 118 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestObjectPython>(callback Info.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
119 return; 119 return;
120 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 120 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
121 v8SetReturnValue(callbackInfo, wrapper); 121 v8SetReturnValue(callbackInfo, wrapper);
122 } 122 }
123 123
124 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestObject> impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate) 124 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestObjectPython> impl, v8::Handle< v8::Object> creationContext, v8::Isolate* isolate)
125 { 125 {
126 return toV8(impl.get(), creationContext, isolate); 126 return toV8(impl.get(), creationContext, isolate);
127 } 127 }
128 128
129 template<class CallbackInfo> 129 template<class CallbackInfo>
130 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestOb ject> impl) 130 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestOb jectPython> impl)
131 { 131 {
132 v8SetReturnValue(callbackInfo, impl.get()); 132 v8SetReturnValue(callbackInfo, impl.get());
133 } 133 }
134 134
135 template<class CallbackInfo> 135 template<class CallbackInfo>
136 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestObject> impl) 136 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestObjectPython> impl)
137 { 137 {
138 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); 138 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
139 } 139 }
140 140
141 template<class CallbackInfo, class Wrappable> 141 template<class CallbackInfo, class Wrappable>
142 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stObject> impl, Wrappable* wrappable) 142 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stObjectPython> impl, Wrappable* wrappable)
143 { 143 {
144 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 144 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
145 } 145 }
146 146
147 } 147 }
148 #endif // V8TestObject_h 148 #endif // V8TestObjectPython_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/bindings/tests/results/V8TestObjectPython.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698