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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceNotScriptWrappable.cpp

Issue 537403002: bindings: Renames from/toInternalPointer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 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 #include "config.h" 7 #include "config.h"
8 #include "V8TestInterfaceNotScriptWrappable.h" 8 #include "V8TestInterfaceNotScriptWrappable.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 12 matching lines...) Expand all
23 23
24 const WrapperTypeInfo V8TestInterfaceNotScriptWrappable::wrapperTypeInfo = { gin ::kEmbedderBlink, V8TestInterfaceNotScriptWrappable::domTemplate, V8TestInterfac eNotScriptWrappable::refObject, V8TestInterfaceNotScriptWrappable::derefObject, V8TestInterfaceNotScriptWrappable::createPersistentHandle, 0, 0, 0, V8TestInterf aceNotScriptWrappable::installConditionallyEnabledMethods, V8TestInterfaceNotScr iptWrappable::installConditionallyEnabledProperties, 0, WrapperTypeInfo::Wrapper TypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Independen t, WrapperTypeInfo::RefCountedObject }; 24 const WrapperTypeInfo V8TestInterfaceNotScriptWrappable::wrapperTypeInfo = { gin ::kEmbedderBlink, V8TestInterfaceNotScriptWrappable::domTemplate, V8TestInterfac eNotScriptWrappable::refObject, V8TestInterfaceNotScriptWrappable::derefObject, V8TestInterfaceNotScriptWrappable::createPersistentHandle, 0, 0, 0, V8TestInterf aceNotScriptWrappable::installConditionallyEnabledMethods, V8TestInterfaceNotScr iptWrappable::installConditionallyEnabledProperties, 0, WrapperTypeInfo::Wrapper TypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Independen t, WrapperTypeInfo::RefCountedObject };
25 25
26 namespace TestInterfaceNotScriptWrappableV8Internal { 26 namespace TestInterfaceNotScriptWrappableV8Internal {
27 27
28 template <typename T> void V8_USE(T) { } 28 template <typename T> void V8_USE(T) { }
29 29
30 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info ) 30 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info )
31 { 31 {
32 v8::Handle<v8::Object> holder = info.Holder(); 32 v8::Handle<v8::Object> holder = info.Holder();
33 TestInterfaceNotScriptWrappable* impl = V8TestInterfaceNotScriptWrappable::t oNative(holder); 33 TestInterfaceNotScriptWrappable* impl = V8TestInterfaceNotScriptWrappable::t oImpl(holder);
34 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); 34 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl);
35 } 35 }
36 36
37 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Value>& info) 37 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Value>& info)
38 { 38 {
39 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 39 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
40 TestInterfaceNotScriptWrappableV8Internal::attr1AttributeGetter(info); 40 TestInterfaceNotScriptWrappableV8Internal::attr1AttributeGetter(info);
41 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 41 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
42 } 42 }
43 43
44 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert yCallbackInfo<void>& info) 44 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert yCallbackInfo<void>& info)
45 { 45 {
46 v8::Handle<v8::Object> holder = info.Holder(); 46 v8::Handle<v8::Object> holder = info.Holder();
47 TestInterfaceNotScriptWrappable* impl = V8TestInterfaceNotScriptWrappable::t oNative(holder); 47 TestInterfaceNotScriptWrappable* impl = V8TestInterfaceNotScriptWrappable::t oImpl(holder);
48 TONATIVE_VOID(TestInterfaceNotScriptWrappable*, cppValue, V8TestInterfaceNot ScriptWrappable::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); 48 TONATIVE_VOID(TestInterfaceNotScriptWrappable*, cppValue, V8TestInterfaceNot ScriptWrappable::toImplWithTypeCheck(info.GetIsolate(), v8Value));
49 impl->setAttr1(WTF::getPtr(cppValue)); 49 impl->setAttr1(WTF::getPtr(cppValue));
50 } 50 }
51 51
52 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info) 52 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info)
53 { 53 {
54 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 54 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
55 TestInterfaceNotScriptWrappableV8Internal::attr1AttributeSetter(v8Value, inf o); 55 TestInterfaceNotScriptWrappableV8Internal::attr1AttributeSetter(v8Value, inf o);
56 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 56 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
57 } 57 }
58 58
59 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 59 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
60 { 60 {
61 if (UNLIKELY(info.Length() < 1)) { 61 if (UNLIKELY(info.Length() < 1)) {
62 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f unc", "TestInterfaceNotScriptWrappable", 1, info.Length(), info.GetIsolate()), i nfo.GetIsolate()); 62 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f unc", "TestInterfaceNotScriptWrappable", 1, info.Length(), info.GetIsolate()), i nfo.GetIsolate());
63 return; 63 return;
64 } 64 }
65 TestInterfaceNotScriptWrappable* impl = V8TestInterfaceNotScriptWrappable::t oNative(info.Holder()); 65 TestInterfaceNotScriptWrappable* impl = V8TestInterfaceNotScriptWrappable::t oImpl(info.Holder());
66 TestInterfaceNotScriptWrappable* arg; 66 TestInterfaceNotScriptWrappable* arg;
67 { 67 {
68 v8::TryCatch block; 68 v8::TryCatch block;
69 V8RethrowTryCatchScope rethrow(block); 69 V8RethrowTryCatchScope rethrow(block);
70 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceNotScriptWrappable::toNativeW ithTypeCheck(info.GetIsolate(), info[0])); 70 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceNotScriptWrappable::toImplWit hTypeCheck(info.GetIsolate(), info[0]));
71 } 71 }
72 impl->func(arg); 72 impl->func(arg);
73 } 73 }
74 74
75 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 75 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
76 { 76 {
77 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 77 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
78 TestInterfaceNotScriptWrappableV8Internal::funcMethod(info); 78 TestInterfaceNotScriptWrappableV8Internal::funcMethod(info);
79 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 79 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
80 } 80 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 bool V8TestInterfaceNotScriptWrappable::hasInstance(v8::Handle<v8::Value> v8Valu e, v8::Isolate* isolate) 114 bool V8TestInterfaceNotScriptWrappable::hasInstance(v8::Handle<v8::Value> v8Valu e, v8::Isolate* isolate)
115 { 115 {
116 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); 116 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
117 } 117 }
118 118
119 v8::Handle<v8::Object> V8TestInterfaceNotScriptWrappable::findInstanceInPrototyp eChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) 119 v8::Handle<v8::Object> V8TestInterfaceNotScriptWrappable::findInstanceInPrototyp eChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
120 { 120 {
121 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 121 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
122 } 122 }
123 123
124 TestInterfaceNotScriptWrappable* V8TestInterfaceNotScriptWrappable::toNativeWith TypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) 124 TestInterfaceNotScriptWrappable* V8TestInterfaceNotScriptWrappable::toImplWithTy peCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
125 { 125 {
126 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 126 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle <v8::Object>::Cast(value))->toImpl<TestInterfaceNotScriptWrappable>() : 0;
127 } 127 }
128 128
129 v8::Handle<v8::Object> wrap(TestInterfaceNotScriptWrappable* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 129 v8::Handle<v8::Object> wrap(TestInterfaceNotScriptWrappable* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
130 { 130 {
131 ASSERT(impl); 131 ASSERT(impl);
132 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNotScriptWrappable>(imp l, isolate)); 132 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNotScriptWrappable>(imp l, isolate));
133 return V8TestInterfaceNotScriptWrappable::createWrapper(impl, creationContex t, isolate); 133 return V8TestInterfaceNotScriptWrappable::createWrapper(impl, creationContex t, isolate);
134 } 134 }
135 135
136 v8::Handle<v8::Object> V8TestInterfaceNotScriptWrappable::createWrapper(PassRefP tr<TestInterfaceNotScriptWrappable> impl, v8::Handle<v8::Object> creationContext , v8::Isolate* isolate) 136 v8::Handle<v8::Object> V8TestInterfaceNotScriptWrappable::createWrapper(PassRefP tr<TestInterfaceNotScriptWrappable> impl, v8::Handle<v8::Object> creationContext , v8::Isolate* isolate)
137 { 137 {
138 ASSERT(impl); 138 ASSERT(impl);
139 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNotScriptWrappable>(imp l.get(), isolate)); 139 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNotScriptWrappable>(imp l.get(), isolate));
140 140
141 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); 141 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, impl->toScriptWrappableBase(), isolate);
142 if (UNLIKELY(wrapper.IsEmpty())) 142 if (UNLIKELY(wrapper.IsEmpty()))
143 return wrapper; 143 return wrapper;
144 144
145 installConditionallyEnabledProperties(wrapper, isolate); 145 installConditionallyEnabledProperties(wrapper, isolate);
146 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNotScriptWrappable>( impl, &wrapperTypeInfo, wrapper, isolate); 146 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNotScriptWrappable>( impl, &wrapperTypeInfo, wrapper, isolate);
147 return wrapper; 147 return wrapper;
148 } 148 }
149 149
150 150
151 void V8TestInterfaceNotScriptWrappable::refObject(ScriptWrappableBase* internalP ointer) 151 void V8TestInterfaceNotScriptWrappable::refObject(ScriptWrappableBase* internalP ointer)
152 { 152 {
153 fromInternalPointer(internalPointer)->ref(); 153 internalPointer->toImpl<TestInterfaceNotScriptWrappable>()->ref();
154 } 154 }
155 155
156 void V8TestInterfaceNotScriptWrappable::derefObject(ScriptWrappableBase* interna lPointer) 156 void V8TestInterfaceNotScriptWrappable::derefObject(ScriptWrappableBase* interna lPointer)
157 { 157 {
158 fromInternalPointer(internalPointer)->deref(); 158 internalPointer->toImpl<TestInterfaceNotScriptWrappable>()->deref();
159 } 159 }
160 160
161 WrapperPersistentNode* V8TestInterfaceNotScriptWrappable::createPersistentHandle (ScriptWrappableBase* internalPointer) 161 WrapperPersistentNode* V8TestInterfaceNotScriptWrappable::createPersistentHandle (ScriptWrappableBase* internalPointer)
162 { 162 {
163 ASSERT_NOT_REACHED(); 163 ASSERT_NOT_REACHED();
164 return 0; 164 return 0;
165 } 165 }
166 166
167 template<> 167 template<>
168 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNotScriptWrappable* impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate) 168 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNotScriptWrappable* impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate)
169 { 169 {
170 return toV8(impl, creationContext, isolate); 170 return toV8(impl, creationContext, isolate);
171 } 171 }
172 172
173 } // namespace blink 173 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698