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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceDoNotCheckConstants.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 V8TestInterfaceDocument_h 7 #ifndef V8TestInterfaceDoNotCheckConstants_h
8 #define V8TestInterfaceDocument_h 8 #define V8TestInterfaceDoNotCheckConstants_h
9 9
10 #include "V8Document.h" 10 #include "bindings/tests/idls/TestInterfaceDoNotCheckConstants.h"
11 #include "bindings/tests/idls/TestInterfaceDocument.h"
12 #include "bindings/v8/V8Binding.h" 11 #include "bindings/v8/V8Binding.h"
13 #include "bindings/v8/V8DOMWrapper.h" 12 #include "bindings/v8/V8DOMWrapper.h"
14 #include "bindings/v8/WrapperTypeInfo.h" 13 #include "bindings/v8/WrapperTypeInfo.h"
15 #include "heap/Handle.h" 14 #include "heap/Handle.h"
16 15
17 namespace WebCore { 16 namespace WebCore {
18 17
19 class V8TestInterfaceDocument { 18 class V8TestInterfaceDoNotCheckConstants {
20 public: 19 public:
21 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); 20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*);
22 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*);
23 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); 22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*);
24 static TestInterfaceDocument* toNative(v8::Handle<v8::Object> object) 23 static TestInterfaceDoNotCheckConstants* toNative(v8::Handle<v8::Object> obj ect)
25 { 24 {
26 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex)); 25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
27 } 26 }
28 static TestInterfaceDocument* toNativeWithTypeCheck(v8::Isolate*, v8::Handle <v8::Value>); 27 static TestInterfaceDoNotCheckConstants* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>);
29 static const WrapperTypeInfo wrapperTypeInfo; 28 static const WrapperTypeInfo wrapperTypeInfo;
30 static void derefObject(void*); 29 static void derefObject(void*);
31 static EventTarget* toEventTarget(v8::Handle<v8::Object>);
32 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 30 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
33 static inline void* toInternalPointer(TestInterfaceDocument* impl) 31 static inline void* toInternalPointer(TestInterfaceDoNotCheckConstants* impl )
34 { 32 {
35 return V8Document::toInternalPointer(impl); 33 return impl;
36 } 34 }
37 35
38 static inline TestInterfaceDocument* fromInternalPointer(void* object) 36 static inline TestInterfaceDoNotCheckConstants* fromInternalPointer(void* ob ject)
39 { 37 {
40 return static_cast<TestInterfaceDocument*>(V8Document::fromInternalPoint er(object)); 38 return static_cast<TestInterfaceDoNotCheckConstants*>(object);
41 } 39 }
42 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfaceDocument*, v8::Isolate*) { } 40 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfaceDoNotCheckConstants*, v8::Isolate*) { }
43 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { } 41 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { }
44 42
45 private: 43 private:
46 friend v8::Handle<v8::Object> wrap(TestInterfaceDocument*, v8::Handle<v8::Ob ject> creationContext, v8::Isolate*); 44 friend v8::Handle<v8::Object> wrap(TestInterfaceDoNotCheckConstants*, v8::Ha ndle<v8::Object> creationContext, v8::Isolate*);
47 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceDocument >, v8::Handle<v8::Object> creationContext, v8::Isolate*); 45 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceDoNotChe ckConstants>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
48 }; 46 };
49 47
50 v8::Handle<v8::Object> wrap(TestInterfaceDocument* impl, v8::Handle<v8::Object> creationContext, v8::Isolate*); 48 inline v8::Handle<v8::Object> wrap(TestInterfaceDoNotCheckConstants* impl, v8::H andle<v8::Object> creationContext, v8::Isolate* isolate)
49 {
50 ASSERT(impl);
51 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceDoNotCheckConstants>(im pl, isolate));
52 return V8TestInterfaceDoNotCheckConstants::createWrapper(impl, creationConte xt, isolate);
53 }
51 54
52 inline v8::Handle<v8::Value> toV8(TestInterfaceDocument* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate) 55 inline v8::Handle<v8::Value> toV8(TestInterfaceDoNotCheckConstants* impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate)
53 { 56 {
54 if (UNLIKELY(!impl)) 57 if (UNLIKELY(!impl))
55 return v8::Null(isolate); 58 return v8::Null(isolate);
56 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfaceDocu ment>(impl, isolate); 59 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfaceDoNo tCheckConstants>(impl, isolate);
57 if (!wrapper.IsEmpty()) 60 if (!wrapper.IsEmpty())
58 return wrapper; 61 return wrapper;
59 return wrap(impl, creationContext, isolate); 62 return wrap(impl, creationContext, isolate);
60 } 63 }
61 64
62 template<typename CallbackInfo> 65 template<typename CallbackInfo>
63 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceDocu ment* impl) 66 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceDoNo tCheckConstants* impl)
64 { 67 {
65 if (UNLIKELY(!impl)) { 68 if (UNLIKELY(!impl)) {
66 v8SetReturnValueNull(callbackInfo); 69 v8SetReturnValueNull(callbackInfo);
67 return; 70 return;
68 } 71 }
69 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceDocument>(callbac kInfo.GetReturnValue(), impl)) 72 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceDoNotCheckConstan ts>(callbackInfo.GetReturnValue(), impl))
70 return; 73 return;
71 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 74 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
72 v8SetReturnValue(callbackInfo, wrapper); 75 v8SetReturnValue(callbackInfo, wrapper);
73 } 76 }
74 77
75 template<typename CallbackInfo> 78 template<typename CallbackInfo>
76 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI nterfaceDocument* impl) 79 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI nterfaceDoNotCheckConstants* impl)
77 { 80 {
78 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld()); 81 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate())->isMainWorld());
79 if (UNLIKELY(!impl)) { 82 if (UNLIKELY(!impl)) {
80 v8SetReturnValueNull(callbackInfo); 83 v8SetReturnValueNull(callbackInfo);
81 return; 84 return;
82 } 85 }
83 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceDocum ent>(callbackInfo.GetReturnValue(), impl)) 86 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceDoNot CheckConstants>(callbackInfo.GetReturnValue(), impl))
84 return; 87 return;
85 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate()); 88 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate());
86 v8SetReturnValue(callbackInfo, wrapper); 89 v8SetReturnValue(callbackInfo, wrapper);
87 } 90 }
88 91
89 template<class CallbackInfo, class Wrappable> 92 template<class CallbackInfo, class Wrappable>
90 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface Document* impl, Wrappable* wrappable) 93 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface DoNotCheckConstants* impl, Wrappable* wrappable)
91 { 94 {
92 if (UNLIKELY(!impl)) { 95 if (UNLIKELY(!impl)) {
93 v8SetReturnValueNull(callbackInfo); 96 v8SetReturnValueNull(callbackInfo);
94 return; 97 return;
95 } 98 }
96 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceDocument>(cal lbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) 99 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceDoNotCheckCon stants>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
97 return; 100 return;
98 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 101 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
99 v8SetReturnValue(callbackInfo, wrapper); 102 v8SetReturnValue(callbackInfo, wrapper);
100 } 103 }
101 104
102 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceDocument> impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate) 105 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceDoNotCheckConstants> i mpl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
103 { 106 {
104 return toV8(impl.get(), creationContext, isolate); 107 return toV8(impl.get(), creationContext, isolate);
105 } 108 }
106 109
107 template<class CallbackInfo> 110 template<class CallbackInfo>
108 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terfaceDocument> impl) 111 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terfaceDoNotCheckConstants> impl)
109 { 112 {
110 v8SetReturnValue(callbackInfo, impl.get()); 113 v8SetReturnValue(callbackInfo, impl.get());
111 } 114 }
112 115
113 template<class CallbackInfo> 116 template<class CallbackInfo>
114 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterfaceDocument> impl) 117 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterfaceDoNotCheckConstants> impl)
115 { 118 {
116 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); 119 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
117 } 120 }
118 121
119 template<class CallbackInfo, class Wrappable> 122 template<class CallbackInfo, class Wrappable>
120 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterfaceDocument> impl, Wrappable* wrappable) 123 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterfaceDoNotCheckConstants> impl, Wrappable* wrappable)
121 { 124 {
122 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 125 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
123 } 126 }
124 127
125 } 128 }
126 #endif // V8TestInterfaceDocument_h 129 #endif // V8TestInterfaceDoNotCheckConstants_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698