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

Side by Side Diff: trunk/Source/bindings/tests/results/V8TestObject.h

Issue 218813002: Revert 170357 "Revert of Make DOMWrapperWorld::current() return ..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 8 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 V8TestObject_h
8 #define V8TestObject_h 8 #define V8TestObject_h
9 9
10 #include "V8EventTarget.h"
11 #include "bindings/tests/idls/TestObject.h" 10 #include "bindings/tests/idls/TestObject.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 V8TestObject { 18 class V8TestObject {
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 TestObject* toNative(v8::Handle<v8::Object> object) 23 static TestObject* toNative(v8::Handle<v8::Object> object)
25 { 24 {
26 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex)); 25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
27 } 26 }
28 static TestObject* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value> ); 27 static TestObject* 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>); 30 static void customVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8:: Value>&);
32 static void customMethodMethodCustom(const v8::FunctionCallbackInfo<v8::Valu e>&); 31 #if ENABLE(CONDITION)
33 static void customMethodWithArgsMethodCustom(const v8::FunctionCallbackInfo< v8::Value>&); 32 static void conditionalConditionCustomVoidMethodMethodCustom(const v8::Funct ionCallbackInfo<v8::Value>&);
34 static void classMethod2MethodCustom(const v8::FunctionCallbackInfo<v8::Valu e>&); 33 #endif // ENABLE(CONDITION)
35 static void customAttrAttributeGetterCustom(const v8::PropertyCallbackInfo<v 8::Value>&); 34 static void customObjectAttributeAttributeGetterCustom(const v8::PropertyCal lbackInfo<v8::Value>&);
36 static void customAttrAttributeSetterCustom(v8::Local<v8::Value>, const v8:: PropertyCallbackInfo<void>&); 35 static void customObjectAttributeAttributeSetterCustom(v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&);
37 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCoun t + 0; 36 static void customGetterLongAttributeAttributeGetterCustom(const v8::Propert yCallbackInfo<v8::Value>&);
38 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1 ; 37 static void customGetterReadonlyObjectAttributeAttributeGetterCustom(const v 8::PropertyCallbackInfo<v8::Value>&);
38 static void customSetterLongAttributeAttributeSetterCustom(v8::Local<v8::Val ue>, const v8::PropertyCallbackInfo<void>&);
39 #if ENABLE(CONDITION)
40 static void customLongAttributeAttributeGetterCustom(const v8::PropertyCallb ackInfo<v8::Value>&);
41 #endif // ENABLE(CONDITION)
42 #if ENABLE(CONDITION)
43 static void customLongAttributeAttributeSetterCustom(v8::Local<v8::Value>, c onst v8::PropertyCallbackInfo<void>&);
44 #endif // ENABLE(CONDITION)
45 static void customImplementedAsLongAttributeAttributeGetterCustom(const v8:: PropertyCallbackInfo<v8::Value>&);
46 static void customImplementedAsLongAttributeAttributeSetterCustom(v8::Local< v8::Value>, const v8::PropertyCallbackInfo<void>&);
47 static void customGetterImplementedAsLongAttributeAttributeGetterCustom(cons t v8::PropertyCallbackInfo<v8::Value>&);
48 static void customSetterImplementedAsLongAttributeAttributeSetterCustom(v8:: Local<v8::Value>, const v8::PropertyCallbackInfo<void>&);
49 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
39 static inline void* toInternalPointer(TestObject* impl) 50 static inline void* toInternalPointer(TestObject* impl)
40 { 51 {
41 return V8EventTarget::toInternalPointer(impl); 52 return impl;
42 } 53 }
43 54
44 static inline TestObject* fromInternalPointer(void* object) 55 static inline TestObject* fromInternalPointer(void* object)
45 { 56 {
46 return static_cast<TestObject*>(V8EventTarget::fromInternalPointer(objec t)); 57 return static_cast<TestObject*>(object);
47 } 58 }
48 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO bject*, v8::Isolate*); 59 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO bject*, v8::Isolate*);
49 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*); 60 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*);
50 61
51 private: 62 private:
52 friend v8::Handle<v8::Object> wrap(TestObject*, v8::Handle<v8::Object> creat ionContext, v8::Isolate*); 63 friend v8::Handle<v8::Object> wrap(TestObject*, v8::Handle<v8::Object> creat ionContext, v8::Isolate*);
53 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObject>, v8::Hand le<v8::Object> creationContext, v8::Isolate*); 64 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObject>, v8::Hand le<v8::Object> creationContext, v8::Isolate*);
54 }; 65 };
55 66
56 inline v8::Handle<v8::Object> wrap(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate) 67 inline v8::Handle<v8::Object> wrap(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate)
(...skipping 22 matching lines...) Expand all
79 } 90 }
80 if (DOMDataStore::setReturnValueFromWrapper<V8TestObject>(callbackInfo.GetRe turnValue(), impl)) 91 if (DOMDataStore::setReturnValueFromWrapper<V8TestObject>(callbackInfo.GetRe turnValue(), impl))
81 return; 92 return;
82 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());
83 v8SetReturnValue(callbackInfo, wrapper); 94 v8SetReturnValue(callbackInfo, wrapper);
84 } 95 }
85 96
86 template<typename CallbackInfo> 97 template<typename CallbackInfo>
87 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestO bject* impl) 98 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestO bject* impl)
88 { 99 {
89 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate())->isMainWorld()); 100 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld());
90 if (UNLIKELY(!impl)) { 101 if (UNLIKELY(!impl)) {
91 v8SetReturnValueNull(callbackInfo); 102 v8SetReturnValueNull(callbackInfo);
92 return; 103 return;
93 } 104 }
94 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObject>(callba ckInfo.GetReturnValue(), impl)) 105 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObject>(callba ckInfo.GetReturnValue(), impl))
95 return; 106 return;
96 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());
97 v8SetReturnValue(callbackInfo, wrapper); 108 v8SetReturnValue(callbackInfo, wrapper);
98 } 109 }
99 110
(...skipping 28 matching lines...) Expand all
128 } 139 }
129 140
130 template<class CallbackInfo, class Wrappable> 141 template<class CallbackInfo, class Wrappable>
131 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stObject> impl, Wrappable* wrappable) 142 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stObject> impl, Wrappable* wrappable)
132 { 143 {
133 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 144 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
134 } 145 }
135 146
136 } 147 }
137 #endif // V8TestObject_h 148 #endif // V8TestObject_h
OLDNEW
« no previous file with comments | « trunk/Source/bindings/tests/results/V8TestNode.h ('k') | trunk/Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698