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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfacePython3.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 V8TestInterface2_h 7 #ifndef V8TestInterfacePython3_h
8 #define V8TestInterface2_h 8 #define V8TestInterfacePython3_h
9 9
10 #include "bindings/tests/idls/TestInterface2.h" 10 #include "bindings/tests/idls/TestInterfacePython3.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 V8TestInterface2 { 18 class V8TestInterfacePython3 {
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 TestInterface2* toNative(v8::Handle<v8::Object> object) 23 static TestInterfacePython3* 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 TestInterface2* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Va lue>); 27 static TestInterfacePython3* 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 visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Is olate*); 30 static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Is olate*);
31 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
32 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 31 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
33 static inline void* toInternalPointer(TestInterface2* impl) 32 static inline void* toInternalPointer(TestInterfacePython3* impl)
34 { 33 {
35 return impl; 34 return impl;
36 } 35 }
37 36
38 static inline TestInterface2* fromInternalPointer(void* object) 37 static inline TestInterfacePython3* fromInternalPointer(void* object)
39 { 38 {
40 return static_cast<TestInterface2*>(object); 39 return static_cast<TestInterfacePython3*>(object);
41 } 40 }
42 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterface2*, v8::Isolate*) { } 41 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfacePython3*, v8::Isolate*) { }
43 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { } 42 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { }
44 43
45 private: 44 private:
46 friend v8::Handle<v8::Object> wrap(TestInterface2*, v8::Handle<v8::Object> c reationContext, v8::Isolate*); 45 friend v8::Handle<v8::Object> wrap(TestInterfacePython3*, v8::Handle<v8::Obj ect> creationContext, v8::Isolate*);
47 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterface2>, v8:: Handle<v8::Object> creationContext, v8::Isolate*); 46 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfacePython3> , v8::Handle<v8::Object> creationContext, v8::Isolate*);
48 }; 47 };
49 48
50 v8::Handle<v8::Object> wrap(TestInterface2* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate*); 49 inline v8::Handle<v8::Object> wrap(TestInterfacePython3* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate)
50 {
51 ASSERT(impl);
52 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfacePython3>(impl, isolate) );
53 return V8TestInterfacePython3::createWrapper(impl, creationContext, isolate) ;
54 }
51 55
52 inline v8::Handle<v8::Value> toV8(TestInterface2* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 56 inline v8::Handle<v8::Value> toV8(TestInterfacePython3* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate)
53 { 57 {
54 if (UNLIKELY(!impl)) 58 if (UNLIKELY(!impl))
55 return v8::Null(isolate); 59 return v8::Null(isolate);
56 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterface2>(i mpl, isolate); 60 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfacePyth on3>(impl, isolate);
57 if (!wrapper.IsEmpty()) 61 if (!wrapper.IsEmpty())
58 return wrapper; 62 return wrapper;
59 return wrap(impl, creationContext, isolate); 63 return wrap(impl, creationContext, isolate);
60 } 64 }
61 65
62 template<typename CallbackInfo> 66 template<typename CallbackInfo>
63 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface2* i mpl) 67 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfacePyth on3* impl)
64 { 68 {
65 if (UNLIKELY(!impl)) { 69 if (UNLIKELY(!impl)) {
66 v8SetReturnValueNull(callbackInfo); 70 v8SetReturnValueNull(callbackInfo);
67 return; 71 return;
68 } 72 }
69 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterface2>(callbackInfo.G etReturnValue(), impl)) 73 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfacePython3>(callback Info.GetReturnValue(), impl))
70 return; 74 return;
71 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 75 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
72 v8SetReturnValue(callbackInfo, wrapper); 76 v8SetReturnValue(callbackInfo, wrapper);
73 } 77 }
74 78
75 template<typename CallbackInfo> 79 template<typename CallbackInfo>
76 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI nterface2* impl) 80 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI nterfacePython3* impl)
77 { 81 {
78 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld()); 82 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate())->isMainWorld());
79 if (UNLIKELY(!impl)) { 83 if (UNLIKELY(!impl)) {
80 v8SetReturnValueNull(callbackInfo); 84 v8SetReturnValueNull(callbackInfo);
81 return; 85 return;
82 } 86 }
83 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterface2>(ca llbackInfo.GetReturnValue(), impl)) 87 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfacePytho n3>(callbackInfo.GetReturnValue(), impl))
84 return; 88 return;
85 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate()); 89 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate());
86 v8SetReturnValue(callbackInfo, wrapper); 90 v8SetReturnValue(callbackInfo, wrapper);
87 } 91 }
88 92
89 template<class CallbackInfo, class Wrappable> 93 template<class CallbackInfo, class Wrappable>
90 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface 2* impl, Wrappable* wrappable) 94 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface Python3* impl, Wrappable* wrappable)
91 { 95 {
92 if (UNLIKELY(!impl)) { 96 if (UNLIKELY(!impl)) {
93 v8SetReturnValueNull(callbackInfo); 97 v8SetReturnValueNull(callbackInfo);
94 return; 98 return;
95 } 99 }
96 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterface2>(callbackIn fo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) 100 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfacePython3>(call backInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
97 return; 101 return;
98 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 102 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
99 v8SetReturnValue(callbackInfo, wrapper); 103 v8SetReturnValue(callbackInfo, wrapper);
100 } 104 }
101 105
102 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterface2> impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 106 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfacePython3> impl, v8::Han dle<v8::Object> creationContext, v8::Isolate* isolate)
103 { 107 {
104 return toV8(impl.get(), creationContext, isolate); 108 return toV8(impl.get(), creationContext, isolate);
105 } 109 }
106 110
107 template<class CallbackInfo> 111 template<class CallbackInfo>
108 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terface2> impl) 112 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terfacePython3> impl)
109 { 113 {
110 v8SetReturnValue(callbackInfo, impl.get()); 114 v8SetReturnValue(callbackInfo, impl.get());
111 } 115 }
112 116
113 template<class CallbackInfo> 117 template<class CallbackInfo>
114 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterface2> impl) 118 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterfacePython3> impl)
115 { 119 {
116 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); 120 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
117 } 121 }
118 122
119 template<class CallbackInfo, class Wrappable> 123 template<class CallbackInfo, class Wrappable>
120 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterface2> impl, Wrappable* wrappable) 124 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterfacePython3> impl, Wrappable* wrappable)
121 { 125 {
122 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 126 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
123 } 127 }
124 128
125 } 129 }
126 #endif // V8TestInterface2_h 130 #endif // V8TestInterfacePython3_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfacePython2.cpp ('k') | Source/bindings/tests/results/V8TestInterfacePython3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698