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

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

Issue 140653013: Have DOMImplementation::document() return reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed StyleSheetList::document changes Created 6 years, 10 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
32 32
33 #ifndef V8TestInterfacePython3_h 33 #ifndef V8TestInterfacePython4_h
34 #define V8TestInterfacePython3_h 34 #define V8TestInterfacePython4_h
35 35
36 #include "bindings/tests/idls/TestInterfacePython3.h" 36 #include "bindings/tests/idls/TestInterfacePython4.h"
37 #include "bindings/v8/V8Binding.h" 37 #include "bindings/v8/V8Binding.h"
38 #include "bindings/v8/V8DOMWrapper.h" 38 #include "bindings/v8/V8DOMWrapper.h"
39 #include "bindings/v8/WrapperTypeInfo.h" 39 #include "bindings/v8/WrapperTypeInfo.h"
40 #include "heap/Handle.h" 40 #include "heap/Handle.h"
41 41
42 namespace WebCore { 42 namespace WebCore {
43 43
44 class V8TestInterfacePython3 { 44 class V8TestInterfacePython4 {
45 public: 45 public:
46 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); 46 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*);
47 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*, WrapperWor ldType); 47 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*, WrapperWor ldType);
48 static TestInterfacePython3* toNative(v8::Handle<v8::Object> object) 48 static TestInterfacePython4* toNative(v8::Handle<v8::Object> object)
49 { 49 {
50 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex)); 50 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
51 } 51 }
52 static TestInterfacePython3* toNativeWithTypeCheck(v8::Isolate*, v8::Handle< v8::Value>); 52 static TestInterfacePython4* toNativeWithTypeCheck(v8::Isolate*, v8::Handle< v8::Value>);
53 static const WrapperTypeInfo wrapperTypeInfo; 53 static const WrapperTypeInfo wrapperTypeInfo;
54 static void derefObject(void*); 54 static void derefObject(void*);
55 static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Is olate*); 55 static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Is olate*);
56 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 56 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
57 static inline void* toInternalPointer(TestInterfacePython3* impl) 57 static inline void* toInternalPointer(TestInterfacePython4* impl)
58 { 58 {
59 return impl; 59 return impl;
60 } 60 }
61 61
62 static inline TestInterfacePython3* fromInternalPointer(void* object) 62 static inline TestInterfacePython4* fromInternalPointer(void* object)
63 { 63 {
64 return static_cast<TestInterfacePython3*>(object); 64 return static_cast<TestInterfacePython4*>(object);
65 } 65 }
66 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfacePython3*, v8::Isolate*) { } 66 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfacePython4*, v8::Isolate*) { }
67 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { } 67 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { }
68 68
69 private: 69 private:
70 friend v8::Handle<v8::Object> wrap(TestInterfacePython3*, v8::Handle<v8::Obj ect> creationContext, v8::Isolate*); 70 friend v8::Handle<v8::Object> wrap(TestInterfacePython4*, v8::Handle<v8::Obj ect> creationContext, v8::Isolate*);
71 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfacePython3> , v8::Handle<v8::Object> creationContext, v8::Isolate*); 71 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfacePython4> , v8::Handle<v8::Object> creationContext, v8::Isolate*);
72 }; 72 };
73 73
74 inline v8::Handle<v8::Object> wrap(TestInterfacePython3* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate) 74 inline v8::Handle<v8::Object> wrap(TestInterfacePython4* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate)
75 { 75 {
76 ASSERT(impl); 76 ASSERT(impl);
77 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfacePython3>(impl, isolate) ); 77 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfacePython4>(impl, isolate) );
78 return V8TestInterfacePython3::createWrapper(impl, creationContext, isolate) ; 78 return V8TestInterfacePython4::createWrapper(impl, creationContext, isolate) ;
79 } 79 }
80 80
81 inline v8::Handle<v8::Value> toV8(TestInterfacePython3* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate) 81 inline v8::Handle<v8::Value> toV8(TestInterfacePython4* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate)
82 { 82 {
83 if (UNLIKELY(!impl)) 83 if (UNLIKELY(!impl))
84 return v8::Null(isolate); 84 return v8::Null(isolate);
85 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfacePyth on3>(impl, isolate); 85 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfacePyth on4>(impl, isolate);
86 if (!wrapper.IsEmpty()) 86 if (!wrapper.IsEmpty())
87 return wrapper; 87 return wrapper;
88 return wrap(impl, creationContext, isolate); 88 return wrap(impl, creationContext, isolate);
89 } 89 }
90 90
91 template<typename CallbackInfo> 91 template<typename CallbackInfo>
92 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfacePyth on3* impl) 92 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfacePyth on4* impl)
93 { 93 {
94 if (UNLIKELY(!impl)) { 94 if (UNLIKELY(!impl)) {
95 v8SetReturnValueNull(callbackInfo); 95 v8SetReturnValueNull(callbackInfo);
96 return; 96 return;
97 } 97 }
98 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfacePython3>(callback Info.GetReturnValue(), impl)) 98 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfacePython4>(callback Info.GetReturnValue(), impl))
99 return; 99 return;
100 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 100 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
101 v8SetReturnValue(callbackInfo, wrapper); 101 v8SetReturnValue(callbackInfo, wrapper);
102 } 102 }
103 103
104 template<typename CallbackInfo> 104 template<typename CallbackInfo>
105 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI nterfacePython3* impl) 105 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI nterfacePython4* impl)
106 { 106 {
107 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); 107 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld);
108 if (UNLIKELY(!impl)) { 108 if (UNLIKELY(!impl)) {
109 v8SetReturnValueNull(callbackInfo); 109 v8SetReturnValueNull(callbackInfo);
110 return; 110 return;
111 } 111 }
112 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfacePytho n3>(callbackInfo.GetReturnValue(), impl)) 112 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfacePytho n4>(callbackInfo.GetReturnValue(), impl))
113 return; 113 return;
114 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate()); 114 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate());
115 v8SetReturnValue(callbackInfo, wrapper); 115 v8SetReturnValue(callbackInfo, wrapper);
116 } 116 }
117 117
118 template<class CallbackInfo, class Wrappable> 118 template<class CallbackInfo, class Wrappable>
119 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface Python3* impl, Wrappable* wrappable) 119 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface Python4* impl, Wrappable* wrappable)
120 { 120 {
121 if (UNLIKELY(!impl)) { 121 if (UNLIKELY(!impl)) {
122 v8SetReturnValueNull(callbackInfo); 122 v8SetReturnValueNull(callbackInfo);
123 return; 123 return;
124 } 124 }
125 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfacePython3>(call backInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) 125 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfacePython4>(call backInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
126 return; 126 return;
127 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 127 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
128 v8SetReturnValue(callbackInfo, wrapper); 128 v8SetReturnValue(callbackInfo, wrapper);
129 } 129 }
130 130
131 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfacePython3> impl, v8::Han dle<v8::Object> creationContext, v8::Isolate* isolate) 131 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfacePython4> impl, v8::Han dle<v8::Object> creationContext, v8::Isolate* isolate)
132 { 132 {
133 return toV8(impl.get(), creationContext, isolate); 133 return toV8(impl.get(), creationContext, isolate);
134 } 134 }
135 135
136 template<class CallbackInfo> 136 template<class CallbackInfo>
137 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terfacePython3> impl) 137 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terfacePython4> impl)
138 { 138 {
139 v8SetReturnValue(callbackInfo, impl.get()); 139 v8SetReturnValue(callbackInfo, impl.get());
140 } 140 }
141 141
142 template<class CallbackInfo> 142 template<class CallbackInfo>
143 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterfacePython3> impl) 143 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterfacePython4> impl)
144 { 144 {
145 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); 145 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
146 } 146 }
147 147
148 template<class CallbackInfo, class Wrappable> 148 template<class CallbackInfo, class Wrappable>
149 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterfacePython3> impl, Wrappable* wrappable) 149 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterfacePython4> impl, Wrappable* wrappable)
150 { 150 {
151 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 151 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
152 } 152 }
153 153
154 } 154 }
155 #endif // V8TestInterfacePython3_h 155 #endif // V8TestInterfacePython4_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestInterfacePython4.idl ('k') | Source/bindings/tests/results/V8TestInterfacePython4.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698