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

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

Issue 819853002: [bindings] Translate all assignments in bindings/templates to use Local<> in place of Handle<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 "V8TestInterfaceGarbageCollected.h" 8 #include "V8TestInterfaceGarbageCollected.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 15 matching lines...) Expand all
26 26
27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eGarbageCollected.h. 27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eGarbageCollected.h.
28 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 28 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
29 // bindings/core/v8/ScriptWrappable.h. 29 // bindings/core/v8/ScriptWrappable.h.
30 const WrapperTypeInfo& TestInterfaceGarbageCollected::s_wrapperTypeInfo = V8Test InterfaceGarbageCollected::wrapperTypeInfo; 30 const WrapperTypeInfo& TestInterfaceGarbageCollected::s_wrapperTypeInfo = V8Test InterfaceGarbageCollected::wrapperTypeInfo;
31 31
32 namespace TestInterfaceGarbageCollectedV8Internal { 32 namespace TestInterfaceGarbageCollectedV8Internal {
33 33
34 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info ) 34 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info )
35 { 35 {
36 v8::Handle<v8::Object> holder = info.Holder(); 36 v8::Local<v8::Object> holder = info.Holder();
37 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(holder); 37 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(holder);
38 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); 38 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl);
39 } 39 }
40 40
41 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Value>& info) 41 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Value>& info)
42 { 42 {
43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
44 TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetter(info); 44 TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetter(info);
45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
46 } 46 }
47 47
48 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert yCallbackInfo<void>& info) 48 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert yCallbackInfo<void>& info)
49 { 49 {
50 v8::Handle<v8::Object> holder = info.Holder(); 50 v8::Local<v8::Object> holder = info.Holder();
51 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(holder); 51 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(holder);
52 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t oImplWithTypeCheck(info.GetIsolate(), v8Value); 52 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t oImplWithTypeCheck(info.GetIsolate(), v8Value);
53 impl->setAttr1(WTF::getPtr(cppValue)); 53 impl->setAttr1(WTF::getPtr(cppValue));
54 } 54 }
55 55
56 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info) 56 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info)
57 { 57 {
58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
59 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info) ; 59 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info) ;
60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 24 matching lines...) Expand all
85 { 85 {
86 if (UNLIKELY(info.Length() < 1)) { 86 if (UNLIKELY(info.Length() < 1)) {
87 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct or(info.GetIsolate(), "TestInterfaceGarbageCollected", 1, info.Length()), info.G etIsolate()); 87 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct or(info.GetIsolate(), "TestInterfaceGarbageCollected", 1, info.Length()), info.G etIsolate());
88 return; 88 return;
89 } 89 }
90 V8StringResource<> str; 90 V8StringResource<> str;
91 { 91 {
92 TOSTRING_VOID_INTERNAL(str, info[0]); 92 TOSTRING_VOID_INTERNAL(str, info[0]);
93 } 93 }
94 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected:: create(str); 94 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected:: create(str);
95 v8::Handle<v8::Object> wrapper = info.Holder(); 95 v8::Local<v8::Object> wrapper = info.Holder();
96 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceGarbageCollect ed::wrapperTypeInfo, wrapper); 96 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceGarbageCollect ed::wrapperTypeInfo, wrapper);
97 v8SetReturnValue(info, wrapper); 97 v8SetReturnValue(info, wrapper);
98 } 98 }
99 99
100 } // namespace TestInterfaceGarbageCollectedV8Internal 100 } // namespace TestInterfaceGarbageCollectedV8Internal
101 101
102 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceGarbageCo llectedAttributes[] = { 102 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceGarbageCo llectedAttributes[] = {
103 {"attr1", TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetterCallb ack, TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetterCallback, 0, 0 , 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttrib ute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnI nstance}, 103 {"attr1", TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetterCallb ack, TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetterCallback, 0, 0 , 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttrib ute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnI nstance},
104 }; 104 };
105 105
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappable* scriptWrappable ) 166 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappable* scriptWrappable )
167 { 167 {
168 } 168 }
169 169
170 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappable* scriptWrappab le) 170 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappable* scriptWrappab le)
171 { 171 {
172 } 172 }
173 173
174 } // namespace blink 174 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698