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

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

Issue 1153613007: bindings: Use CreateDataProperty() instead of ForceSet() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 "V8TestInterfaceNamedConstructor.h" 8 #include "V8TestInterfaceNamedConstructor.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 15 matching lines...) Expand all
26 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 26 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
27 // bindings/core/v8/ScriptWrappable.h. 27 // bindings/core/v8/ScriptWrappable.h.
28 const WrapperTypeInfo& TestInterfaceNamedConstructor::s_wrapperTypeInfo = V8Test InterfaceNamedConstructor::wrapperTypeInfo; 28 const WrapperTypeInfo& TestInterfaceNamedConstructor::s_wrapperTypeInfo = V8Test InterfaceNamedConstructor::wrapperTypeInfo;
29 29
30 namespace TestInterfaceNamedConstructorV8Internal { 30 namespace TestInterfaceNamedConstructorV8Internal {
31 31
32 template<class CallbackInfo> 32 template<class CallbackInfo>
33 static void TestInterfaceNamedConstructorForceSetAttributeOnThis(v8::Local<v8::N ame> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) 33 static void TestInterfaceNamedConstructorForceSetAttributeOnThis(v8::Local<v8::N ame> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info)
34 { 34 {
35 ASSERT(info.This()->IsObject()); 35 ASSERT(info.This()->IsObject());
36 // TODO(bashi): Consider using CreateDataProperty() instead of ForceSet().
36 v8::Local<v8::Object>::Cast(info.This())->ForceSet(info.GetIsolate()->GetCur rentContext(), name, v8Value); 37 v8::Local<v8::Object>::Cast(info.This())->ForceSet(info.GetIsolate()->GetCur rentContext(), name, v8Value);
jochen (gone - plz use gerrit) 2015/06/02 16:14:48 why can't this use CreateDataProperty already now?
bashi 2015/06/03 00:16:37 Done.
37 } 38 }
38 39
39 static void TestInterfaceNamedConstructorConstructorAttributeSetterCallback(v8:: Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo id>& info) 40 static void TestInterfaceNamedConstructorConstructorAttributeSetterCallback(v8:: Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo id>& info)
40 { 41 {
41 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 42 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
42 do { 43 do {
43 v8::Local<v8::Value> data = info.Data(); 44 v8::Local<v8::Value> data = info.Data();
44 ASSERT(data->IsExternal()); 45 ASSERT(data->IsExternal());
45 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()- >CreationContext()); 46 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()- >CreationContext());
46 if (!perContextData) 47 if (!perContextData)
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 { 210 {
210 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); 211 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref();
211 } 212 }
212 213
213 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab le) 214 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab le)
214 { 215 {
215 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); 216 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref();
216 } 217 }
217 218
218 } // namespace blink 219 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698