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

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

Issue 300743002: Sync binding test results. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 // 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 "V8TestNode.h" 8 #include "V8TestNode.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 } // namespace WebCore 32 } // namespace WebCore
33 33
34 void webCoreInitializeScriptWrappableForInterface(WebCore::TestNode* object) 34 void webCoreInitializeScriptWrappableForInterface(WebCore::TestNode* object)
35 { 35 {
36 WebCore::initializeScriptWrappableForInterface(object); 36 WebCore::initializeScriptWrappableForInterface(object);
37 } 37 }
38 38
39 namespace WebCore { 39 namespace WebCore {
40 const WrapperTypeInfo V8TestNode::wrapperTypeInfo = { gin::kEmbedderBlink, V8Tes tNode::domTemplate, V8TestNode::derefObject, 0, V8TestNode::toEventTarget, 0, V8 TestNode::installPerContextEnabledMethods, &V8Node::wrapperTypeInfo, WrapperType ObjectPrototype, RefCountedObject }; 40 const WrapperTypeInfo V8TestNode::wrapperTypeInfo = { gin::kEmbedderBlink, V8Tes tNode::domTemplate, V8TestNode::derefObject, 0, V8TestNode::toEventTarget, 0, V8 TestNode::installPerContextEnabledMethods, &V8Node::wrapperTypeInfo, WrapperType ObjectPrototype, WillBeGarbageCollectedObject };
41 41
42 namespace TestNodeV8Internal { 42 namespace TestNodeV8Internal {
43 43
44 template <typename T> void V8_USE(T) { } 44 template <typename T> void V8_USE(T) { }
45 45
46 static void hrefAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 46 static void hrefAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
47 { 47 {
48 v8::Handle<v8::Object> holder = info.Holder(); 48 v8::Handle<v8::Object> holder = info.Holder();
49 TestNode* impl = V8TestNode::toNative(holder); 49 TestNode* impl = V8TestNode::toNative(holder);
50 v8SetReturnValueString(info, impl->href(), info.GetIsolate()); 50 v8SetReturnValueString(info, impl->href(), info.GetIsolate());
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 128 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
129 { 129 {
130 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 130 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
131 TestNodeV8Internal::hrefCallWithAttributeSetter(v8Value, info); 131 TestNodeV8Internal::hrefCallWithAttributeSetter(v8Value, info);
132 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 132 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
133 } 133 }
134 134
135 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 135 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
136 { 136 {
137 v8::Isolate* isolate = info.GetIsolate(); 137 v8::Isolate* isolate = info.GetIsolate();
138 RefPtr<TestNode> impl = TestNode::create(); 138 RefPtrWillBeRawPtr<TestNode> impl = TestNode::create();
139 139
140 v8::Handle<v8::Object> wrapper = info.Holder(); 140 v8::Handle<v8::Object> wrapper = info.Holder();
141 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl.release(), &V8Test Node::wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); 141 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl.release(), &V8Test Node::wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent);
142 v8SetReturnValue(info, wrapper); 142 v8SetReturnValue(info, wrapper);
143 } 143 }
144 144
145 } // namespace TestNodeV8Internal 145 } // namespace TestNodeV8Internal
146 146
147 static const V8DOMConfiguration::AttributeConfiguration V8TestNodeAttributes[] = { 147 static const V8DOMConfiguration::AttributeConfiguration V8TestNodeAttributes[] = {
148 {"href", TestNodeV8Internal::hrefAttributeGetterCallback, TestNodeV8Internal ::hrefAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 148 {"href", TestNodeV8Internal::hrefAttributeGetterCallback, TestNodeV8Internal ::hrefAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 TestNode* V8TestNode::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8: :Value> value) 212 TestNode* V8TestNode::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8: :Value> value)
213 { 213 {
214 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0; 214 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
215 } 215 }
216 216
217 EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object) 217 EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object)
218 { 218 {
219 return toNative(object); 219 return toNative(object);
220 } 220 }
221 221
222 v8::Handle<v8::Object> V8TestNode::createWrapper(PassRefPtr<TestNode> impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate) 222 v8::Handle<v8::Object> V8TestNode::createWrapper(PassRefPtrWillBeRawPtr<TestNode > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
223 { 223 {
224 ASSERT(impl); 224 ASSERT(impl);
225 ASSERT(!DOMDataStore::containsWrapper<V8TestNode>(impl.get(), isolate)); 225 ASSERT(!DOMDataStore::containsWrapper<V8TestNode>(impl.get(), isolate));
226 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { 226 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
227 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get ())->typeInfo(); 227 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get ())->typeInfo();
228 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have 228 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have
229 // the same object de-ref functions, though, so use that as the basis of the check. 229 // the same object de-ref functions, though, so use that as the basis of the check.
230 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction); 230 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
231 } 231 }
232 232
233 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); 233 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
234 if (UNLIKELY(wrapper.IsEmpty())) 234 if (UNLIKELY(wrapper.IsEmpty()))
235 return wrapper; 235 return wrapper;
236 236
237 installPerContextEnabledProperties(wrapper, impl.get(), isolate); 237 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
238 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); 238 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent);
239 return wrapper; 239 return wrapper;
240 } 240 }
241 241
242 void V8TestNode::derefObject(void* object) 242 void V8TestNode::derefObject(void* object)
243 { 243 {
244 #if !ENABLE(OILPAN)
244 fromInternalPointer(object)->deref(); 245 fromInternalPointer(object)->deref();
246 #endif // !ENABLE(OILPAN)
245 } 247 }
246 248
247 template<> 249 template<>
248 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati onContext, v8::Isolate* isolate) 250 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati onContext, v8::Isolate* isolate)
249 { 251 {
250 return toV8(impl, creationContext, isolate); 252 return toV8(impl, creationContext, isolate);
251 } 253 }
252 254
253 } // namespace WebCore 255 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestNode.h ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698