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

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

Issue 968593002: bindings: Supports constructor attributes on prototype chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 "V8TestInterfaceNamedConstructor.h" 8 #include "V8TestInterfaceNamedConstructor.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 19 matching lines...) Expand all
30 30
31 namespace TestInterfaceNamedConstructorV8Internal { 31 namespace TestInterfaceNamedConstructorV8Internal {
32 32
33 template<class CallbackInfo> 33 template<class CallbackInfo>
34 static void TestInterfaceNamedConstructorForceSetAttributeOnThis(v8::Local<v8::S tring> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) 34 static void TestInterfaceNamedConstructorForceSetAttributeOnThis(v8::Local<v8::S tring> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info)
35 { 35 {
36 ASSERT(info.This()->IsObject()); 36 ASSERT(info.This()->IsObject());
37 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); 37 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
38 } 38 }
39 39
40 static void TestInterfaceNamedConstructorForceSetAttributeOnThisCallback(v8::Loc al<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf o<void>& info) 40 static void testNamedConstructorConstructorAttributeAttributeSetter(v8::Local<v8 ::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
41 { 41 {
42 TestInterfaceNamedConstructorV8Internal::TestInterfaceNamedConstructorForceS etAttributeOnThis(name, v8Value, info); 42 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test NamedConstructorConstructorAttribute");
43 TestInterfaceNamedConstructorForceSetAttributeOnThis(propertyName, v8Value, info);
43 } 44 }
44 45
45 static void TestInterfaceNamedConstructorConstructorGetter(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 46 static void testNamedConstructorConstructorAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo< void>& info)
46 { 47 {
47 v8::Local<v8::Value> data = info.Data(); 48 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
48 ASSERT(data->IsExternal()); 49 TestInterfaceNamedConstructorV8Internal::testNamedConstructorConstructorAttr ibuteAttributeSetter(v8Value, info);
49 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext()); 50 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
50 if (!perContextData)
51 return;
52 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data)));
53 } 51 }
54 52
55 } // namespace TestInterfaceNamedConstructorV8Internal 53 } // namespace TestInterfaceNamedConstructorV8Internal
56 54
57 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedCons tructorAttributes[] = { 55 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedCons tructorAttributes[] = {
58 {"testNamedConstructorConstructorAttribute", TestInterfaceNamedConstructorV8 Internal::TestInterfaceNamedConstructorConstructorGetter, TestInterfaceNamedCons tructorV8Internal::TestInterfaceNamedConstructorForceSetAttributeOnThisCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestNamedConstructor::wrapperTypeInfo), s tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v 8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIns tance}, 56 {"testNamedConstructorConstructorAttribute", v8ConstructorAttributeGetterAsP roperty, TestInterfaceNamedConstructorV8Internal::testNamedConstructorConstructo rAttributeAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestNam edConstructor::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnInstance},
59 }; 57 };
60 58
61 const WrapperTypeInfo V8TestInterfaceNamedConstructorConstructor::wrapperTypeInf o = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructorConstructor::domTempla te, V8TestInterfaceNamedConstructor::refObject, V8TestInterfaceNamedConstructor: :derefObject, V8TestInterfaceNamedConstructor::trace, V8TestInterfaceNamedConstr uctor::toActiveDOMObject, 0, V8TestInterfaceNamedConstructor::installConditional lyEnabledMethods, V8TestInterfaceNamedConstructor::installConditionallyEnabledPr operties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Objec tClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent , WrapperTypeInfo::RefCountedObject }; 59 const WrapperTypeInfo V8TestInterfaceNamedConstructorConstructor::wrapperTypeInf o = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructorConstructor::domTempla te, V8TestInterfaceNamedConstructor::refObject, V8TestInterfaceNamedConstructor: :derefObject, V8TestInterfaceNamedConstructor::trace, V8TestInterfaceNamedConstr uctor::toActiveDOMObject, 0, V8TestInterfaceNamedConstructor::installConditional lyEnabledMethods, V8TestInterfaceNamedConstructor::installConditionallyEnabledPr operties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Objec tClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent , WrapperTypeInfo::RefCountedObject };
62 60
63 static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 61 static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
64 { 62 {
65 if (!info.IsConstructCall()) { 63 if (!info.IsConstructCall()) {
66 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("Audio")); 64 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("Audio"));
67 return; 65 return;
68 } 66 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 { 191 {
194 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); 192 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref();
195 } 193 }
196 194
197 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab le) 195 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab le)
198 { 196 {
199 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); 197 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref();
200 } 198 }
201 199
202 } // namespace blink 200 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698