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

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

Issue 557203002: Added core and modules to binding tests results for binding modularization. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6
7 #include "config.h"
8 #include "V8TestSpecialOperationsNotEnumerable.h"
9
10 #include "bindings/core/v8/ExceptionState.h"
11 #include "bindings/core/v8/V8DOMConfiguration.h"
12 #include "bindings/core/v8/V8HiddenValue.h"
13 #include "bindings/core/v8/V8ObjectConstructor.h"
14 #include "core/dom/ContextFeatures.h"
15 #include "core/dom/Document.h"
16 #include "platform/RuntimeEnabledFeatures.h"
17 #include "platform/TraceEvent.h"
18 #include "wtf/GetPtr.h"
19 #include "wtf/RefPtr.h"
20
21 namespace blink {
22
23 const WrapperTypeInfo V8TestSpecialOperationsNotEnumerable::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestSpecialOperationsNotEnumerable::domTemplate, V8TestSp ecialOperationsNotEnumerable::refObject, V8TestSpecialOperationsNotEnumerable::d erefObject, V8TestSpecialOperationsNotEnumerable::createPersistentHandle, 0, 0, 0, V8TestSpecialOperationsNotEnumerable::installConditionallyEnabledMethods, V8T estSpecialOperationsNotEnumerable::installConditionallyEnabledProperties, 0, Wra pperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, Wrappe rTypeInfo::Independent, WrapperTypeInfo::RefCountedObject };
24
25 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestSpecialO perationsNotEnumerable.h.
26 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
27 // bindings/core/v8/ScriptWrappable.h.
28 const WrapperTypeInfo& TestSpecialOperationsNotEnumerable::s_wrapperTypeInfo = V 8TestSpecialOperationsNotEnumerable::wrapperTypeInfo;
29
30 namespace TestSpecialOperationsNotEnumerableV8Internal {
31
32 template <typename T> void V8_USE(T) { }
33
34 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info)
35 {
36 TestSpecialOperationsNotEnumerable* impl = V8TestSpecialOperationsNotEnumera ble::toImpl(info.Holder());
37 String result = impl->anonymousIndexedGetter(index);
38 if (result.isNull())
39 return;
40 v8SetReturnValueString(info, result, info.GetIsolate());
41 }
42
43 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall backInfo<v8::Value>& info)
44 {
45 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty");
46 TestSpecialOperationsNotEnumerableV8Internal::indexedPropertyGetter(index, i nfo);
47 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
48 }
49
50 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa llbackInfo<v8::Value>& info)
51 {
52 if (info.Holder()->HasRealNamedProperty(name))
53 return;
54 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
55 return;
56
57 TestSpecialOperationsNotEnumerable* impl = V8TestSpecialOperationsNotEnumera ble::toImpl(info.Holder());
58 AtomicString propertyName = toCoreAtomicString(name);
59 String result = impl->anonymousNamedGetter(propertyName);
60 if (result.isNull())
61 return;
62 v8SetReturnValueString(info, result, info.GetIsolate());
63 }
64
65 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr opertyCallbackInfo<v8::Value>& info)
66 {
67 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
68 TestSpecialOperationsNotEnumerableV8Internal::namedPropertyGetter(name, info );
69 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
70 }
71
72 } // namespace TestSpecialOperationsNotEnumerableV8Internal
73
74 static void installV8TestSpecialOperationsNotEnumerableTemplate(v8::Handle<v8::F unctionTemplate> functionTemplate, v8::Isolate* isolate)
75 {
76 functionTemplate->ReadOnlyPrototype();
77
78 v8::Local<v8::Signature> defaultSignature;
79 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestSpecialOperationsNotEnumerable", v8::Local<v8::FunctionTemplate>(), V8 TestSpecialOperationsNotEnumerable::internalFieldCount,
80 0, 0,
81 0, 0,
82 0, 0,
83 isolate);
84 v8::Local<v8::ObjectTemplate> instanceTemplate ALLOW_UNUSED = functionTempla te->InstanceTemplate();
85 v8::Local<v8::ObjectTemplate> prototypeTemplate ALLOW_UNUSED = functionTempl ate->PrototypeTemplate();
86 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestSpecialO perationsNotEnumerableV8Internal::indexedPropertyGetterCallback, 0, 0, 0, 0);
87 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestSpecialOpe rationsNotEnumerableV8Internal::namedPropertyGetterCallback, 0, 0, 0, 0);
88
89 // Custom toString template
90 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
91 }
92
93 v8::Handle<v8::FunctionTemplate> V8TestSpecialOperationsNotEnumerable::domTempla te(v8::Isolate* isolate)
94 {
95 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestSpecialOperationsNotEnumerableTemplate);
96 }
97
98 bool V8TestSpecialOperationsNotEnumerable::hasInstance(v8::Handle<v8::Value> v8V alue, v8::Isolate* isolate)
99 {
100 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
101 }
102
103 v8::Handle<v8::Object> V8TestSpecialOperationsNotEnumerable::findInstanceInProto typeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
104 {
105 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
106 }
107
108 TestSpecialOperationsNotEnumerable* V8TestSpecialOperationsNotEnumerable::toImpl WithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
109 {
110 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle <v8::Object>::Cast(value))->toImpl<TestSpecialOperationsNotEnumerable>() : 0;
111 }
112
113
114 void V8TestSpecialOperationsNotEnumerable::refObject(ScriptWrappableBase* intern alPointer)
115 {
116 internalPointer->toImpl<TestSpecialOperationsNotEnumerable>()->ref();
117 }
118
119 void V8TestSpecialOperationsNotEnumerable::derefObject(ScriptWrappableBase* inte rnalPointer)
120 {
121 internalPointer->toImpl<TestSpecialOperationsNotEnumerable>()->deref();
122 }
123
124 WrapperPersistentNode* V8TestSpecialOperationsNotEnumerable::createPersistentHan dle(ScriptWrappableBase* internalPointer)
125 {
126 ASSERT_NOT_REACHED();
127 return 0;
128 }
129
130 template<>
131 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsNotEnumerable* impl, v8: :Handle<v8::Object> creationContext, v8::Isolate* isolate)
132 {
133 return toV8(impl, creationContext, isolate);
134 }
135
136 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestSpecialOperationsNotEnumerable.h ('k') | Source/bindings/tests/results/V8TestTypedefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698