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

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

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 17 matching lines...) Expand all
28 28
29 namespace WebCore { 29 namespace WebCore {
30 30
31 class V8TestActiveDOMObject { 31 class V8TestActiveDOMObject {
32 public: 32 public:
33 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e); 33 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e);
34 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); 34 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
35 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor ldType); 35 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor ldType);
36 static TestActiveDOMObject* toNative(v8::Handle<v8::Object> object) 36 static TestActiveDOMObject* toNative(v8::Handle<v8::Object> object)
37 { 37 {
38 return reinterpret_cast<TestActiveDOMObject*>(object->GetAlignedPointerF romInternalField(v8DOMWrapperObjectIndex)); 38 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
39 } 39 }
40 static void derefObject(void*); 40 static void derefObject(void*);
41 static WrapperTypeInfo info; 41 static WrapperTypeInfo info;
42 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 42 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
43 static inline void* toInternalPointer(TestActiveDOMObject* impl)
44 {
45 return impl;
46 }
47
48 static inline TestActiveDOMObject* fromInternalPointer(void* object)
49 {
50 return static_cast<TestActiveDOMObject*>(object);
51 }
43 static void installPerContextProperties(v8::Handle<v8::Object>, TestActiveDO MObject*, v8::Isolate*) { } 52 static void installPerContextProperties(v8::Handle<v8::Object>, TestActiveDO MObject*, v8::Isolate*) { }
44 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8: :Isolate*) { } 53 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8: :Isolate*) { }
45 private: 54 private:
46 friend v8::Handle<v8::Object> wrap(TestActiveDOMObject*, v8::Handle<v8::Obje ct> creationContext, v8::Isolate*); 55 friend v8::Handle<v8::Object> wrap(TestActiveDOMObject*, v8::Handle<v8::Obje ct> creationContext, v8::Isolate*);
47 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestActiveDOMObject>, v8::Handle<v8::Object> creationContext, v8::Isolate*); 56 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestActiveDOMObject>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
48 }; 57 };
49 58
50 template<> 59 template<>
51 class WrapperTypeTraits<TestActiveDOMObject > { 60 class WrapperTypeTraits<TestActiveDOMObject > {
52 public: 61 public:
53 static WrapperTypeInfo* info() { return &V8TestActiveDOMObject::info; } 62 static WrapperTypeInfo* info() { return &V8TestActiveDOMObject::info; }
54 }; 63 };
55 64
56 65
57 inline v8::Handle<v8::Object> wrap(TestActiveDOMObject* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate) 66 inline v8::Handle<v8::Object> wrap(TestActiveDOMObject* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate)
58 { 67 {
59 ASSERT(impl); 68 ASSERT(impl);
60 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); 69 ASSERT(DOMDataStore::getWrapper<V8TestActiveDOMObject>(impl, isolate).IsEmpt y());
61 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) { 70 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) {
62 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl); 71 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl);
63 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have 72 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have
64 // the same object de-ref functions, though, so use that as the basis of the check. 73 // the same object de-ref functions, though, so use that as the basis of the check.
65 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == V8TestActiveDOMObject::info.derefObjectFunction); 74 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == V8TestActiveDOMObject::info.derefObjectFunction);
66 } 75 }
67 return V8TestActiveDOMObject::createWrapper(impl, creationContext, isolate); 76 return V8TestActiveDOMObject::createWrapper(impl, creationContext, isolate);
68 } 77 }
69 78
70 inline v8::Handle<v8::Value> toV8(TestActiveDOMObject* impl, v8::Handle<v8::Obje ct> creationContext, v8::Isolate* isolate) 79 inline v8::Handle<v8::Value> toV8(TestActiveDOMObject* impl, v8::Handle<v8::Obje ct> creationContext, v8::Isolate* isolate)
71 { 80 {
72 if (UNLIKELY(!impl)) 81 if (UNLIKELY(!impl))
73 return v8NullWithCheck(isolate); 82 return v8NullWithCheck(isolate);
74 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); 83 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestActiveDOMObje ct>(impl, isolate);
75 if (!wrapper.IsEmpty()) 84 if (!wrapper.IsEmpty())
76 return wrapper; 85 return wrapper;
77 return wrap(impl, creationContext, isolate); 86 return wrap(impl, creationContext, isolate);
78 } 87 }
79 88
80 inline v8::Handle<v8::Value> toV8ForMainWorld(TestActiveDOMObject* impl, v8::Han dle<v8::Object> creationContext, v8::Isolate* isolate) 89 inline v8::Handle<v8::Value> toV8ForMainWorld(TestActiveDOMObject* impl, v8::Han dle<v8::Object> creationContext, v8::Isolate* isolate)
81 { 90 {
82 ASSERT(worldType(isolate) == MainWorld); 91 ASSERT(worldType(isolate) == MainWorld);
83 if (UNLIKELY(!impl)) 92 if (UNLIKELY(!impl))
84 return v8NullWithCheck(isolate); 93 return v8NullWithCheck(isolate);
85 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld(impl); 94 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld<V8TestA ctiveDOMObject>(impl);
86 if (!wrapper.IsEmpty()) 95 if (!wrapper.IsEmpty())
87 return wrapper; 96 return wrapper;
88 return wrap(impl, creationContext, isolate); 97 return wrap(impl, creationContext, isolate);
89 } 98 }
90 99
91 template<class HolderContainer, class Wrappable> 100 template<class HolderContainer, class Wrappable>
92 inline v8::Handle<v8::Value> toV8Fast(TestActiveDOMObject* impl, const HolderCon tainer& container, Wrappable* wrappable) 101 inline v8::Handle<v8::Value> toV8Fast(TestActiveDOMObject* impl, const HolderCon tainer& container, Wrappable* wrappable)
93 { 102 {
94 if (UNLIKELY(!impl)) 103 if (UNLIKELY(!impl))
95 return v8::Null(container.GetIsolate()); 104 return v8::Null(container.GetIsolate());
96 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, containe r, wrappable); 105 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast<V8TestActiveDO MObject>(impl, container, wrappable);
97 if (!wrapper.IsEmpty()) 106 if (!wrapper.IsEmpty())
98 return wrapper; 107 return wrapper;
99 return wrap(impl, container.Holder(), container.GetIsolate()); 108 return wrap(impl, container.Holder(), container.GetIsolate());
100 } 109 }
101 110
102 template<class HolderContainer, class Wrappable> 111 template<class HolderContainer, class Wrappable>
103 inline v8::Handle<v8::Value> toV8FastForMainWorld(TestActiveDOMObject* impl, con st HolderContainer& container, Wrappable* wrappable) 112 inline v8::Handle<v8::Value> toV8FastForMainWorld(TestActiveDOMObject* impl, con st HolderContainer& container, Wrappable* wrappable)
104 { 113 {
105 ASSERT(worldType(container.GetIsolate()) == MainWorld); 114 ASSERT(worldType(container.GetIsolate()) == MainWorld);
106 if (UNLIKELY(!impl)) 115 if (UNLIKELY(!impl))
107 return v8::Null(container.GetIsolate()); 116 return v8::Null(container.GetIsolate());
108 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl); 117 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld<V8Test ActiveDOMObject>(impl);
109 if (!wrapper.IsEmpty()) 118 if (!wrapper.IsEmpty())
110 return wrapper; 119 return wrapper;
111 return wrap(impl, container.Holder(), container.GetIsolate()); 120 return wrap(impl, container.Holder(), container.GetIsolate());
112 } 121 }
113 122
114 template<class HolderContainer, class Wrappable> 123 template<class HolderContainer, class Wrappable>
115 inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestActiveDOMObjec t > impl, const HolderContainer& container, Wrappable* wrappable) 124 inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestActiveDOMObjec t > impl, const HolderContainer& container, Wrappable* wrappable)
116 { 125 {
117 return toV8FastForMainWorld(impl.get(), container, wrappable); 126 return toV8FastForMainWorld(impl.get(), container, wrappable);
118 } 127 }
119 128
120 129
121 template<class HolderContainer, class Wrappable> 130 template<class HolderContainer, class Wrappable>
122 inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestActiveDOMObject > impl, co nst HolderContainer& container, Wrappable* wrappable) 131 inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestActiveDOMObject > impl, co nst HolderContainer& container, Wrappable* wrappable)
123 { 132 {
124 return toV8Fast(impl.get(), container, wrappable); 133 return toV8Fast(impl.get(), container, wrappable);
125 } 134 }
126 135
127 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestActiveDOMObject > impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate) 136 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestActiveDOMObject > impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate)
128 { 137 {
129 return toV8(impl.get(), creationContext, isolate); 138 return toV8(impl.get(), creationContext, isolate);
130 } 139 }
131 140
132 } 141 }
133 142
134 #endif // V8TestActiveDOMObject_h 143 #endif // V8TestActiveDOMObject_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8Float64Array.cpp ('k') | Source/bindings/tests/results/V8TestActiveDOMObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698