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

Side by Side Diff: Source/bindings/tests/results/core/V8TestTypedefs.cpp

Issue 953473002: bindings: Supports [Replaceable] accessors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 5 years, 10 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 "V8TestTypedefs.h" 8 #include "V8TestTypedefs.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 16 matching lines...) Expand all
27 27
28 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V 8TestTypedefs::domTemplate, V8TestTypedefs::refObject, V8TestTypedefs::derefObje ct, V8TestTypedefs::trace, 0, 0, V8TestTypedefs::installConditionallyEnabledMeth ods, V8TestTypedefs::installConditionallyEnabledProperties, 0, WrapperTypeInfo:: WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Not InheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCounte dObject }; 28 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V 8TestTypedefs::domTemplate, V8TestTypedefs::refObject, V8TestTypedefs::derefObje ct, V8TestTypedefs::trace, 0, 0, V8TestTypedefs::installConditionallyEnabledMeth ods, V8TestTypedefs::installConditionallyEnabledProperties, 0, WrapperTypeInfo:: WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Not InheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCounte dObject };
29 29
30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestTypedefs .h. 30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestTypedefs .h.
31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
32 // bindings/core/v8/ScriptWrappable.h. 32 // bindings/core/v8/ScriptWrappable.h.
33 const WrapperTypeInfo& TestTypedefs::s_wrapperTypeInfo = V8TestTypedefs::wrapper TypeInfo; 33 const WrapperTypeInfo& TestTypedefs::s_wrapperTypeInfo = V8TestTypedefs::wrapper TypeInfo;
34 34
35 namespace TestTypedefsV8Internal { 35 namespace TestTypedefsV8Internal {
36 36
37 template<class CallbackInfo>
38 static void TestTypedefsForceSetAttributeOnThis(v8::Local<v8::String> name, v8:: Local<v8::Value> v8Value, const CallbackInfo& info)
39 {
40 if (info.This()->IsObject())
41 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
42 }
43
44 static void TestTypedefsForceSetAttributeOnThisCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
45 {
46 TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThis(name, v8Value, i nfo);
47 }
48
37 static void uLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8: :Value>& info) 49 static void uLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8: :Value>& info)
38 { 50 {
39 v8::Local<v8::Object> holder = info.Holder(); 51 v8::Local<v8::Object> holder = info.Holder();
40 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); 52 TestTypedefs* impl = V8TestTypedefs::toImpl(holder);
41 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute())); 53 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute()));
42 } 54 }
43 55
44 static void uLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, con st v8::PropertyCallbackInfo<v8::Value>& info) 56 static void uLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, con st v8::PropertyCallbackInfo<v8::Value>& info)
45 { 57 {
46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
(...skipping 22 matching lines...) Expand all
69 static void TestTypedefsConstructorGetter(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info) 81 static void TestTypedefsConstructorGetter(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info)
70 { 82 {
71 v8::Local<v8::Value> data = info.Data(); 83 v8::Local<v8::Value> data = info.Data();
72 ASSERT(data->IsExternal()); 84 ASSERT(data->IsExternal());
73 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext()); 85 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext());
74 if (!perContextData) 86 if (!perContextData)
75 return; 87 return;
76 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data))); 88 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data)));
77 } 89 }
78 90
79 static void TestTypedefsForceSetAttributeOnThis(v8::Local<v8::String> name, v8:: Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
80 {
81 if (info.This()->IsObject())
82 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
83 }
84
85 static void TestTypedefsForceSetAttributeOnThisCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
86 {
87 TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThis(name, v8Value, i nfo);
88 }
89
90 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 91 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
91 { 92 {
92 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA rrayOfLongsArg", "TestTypedefs", info.Holder(), info.GetIsolate()); 93 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA rrayOfLongsArg", "TestTypedefs", info.Holder(), info.GetIsolate());
93 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); 94 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
94 Vector<int> arrayOfLongsArg; 95 Vector<int> arrayOfLongsArg;
95 { 96 {
96 if (UNLIKELY(info.Length() <= 0)) { 97 if (UNLIKELY(info.Length() <= 0)) {
97 impl->voidMethodArrayOfLongsArg(); 98 impl->voidMethodArrayOfLongsArg();
98 return; 99 return;
99 } 100 }
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 { 367 {
367 scriptWrappable->toImpl<TestTypedefs>()->ref(); 368 scriptWrappable->toImpl<TestTypedefs>()->ref();
368 } 369 }
369 370
370 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable) 371 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable)
371 { 372 {
372 scriptWrappable->toImpl<TestTypedefs>()->deref(); 373 scriptWrappable->toImpl<TestTypedefs>()->deref();
373 } 374 }
374 375
375 } // namespace blink 376 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698