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

Side by Side Diff: Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 1102313002: bindings: Move named/indexed attributes to prototype chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface5.h" 9 #include "V8TestInterface5.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 if (!perContextData) 52 if (!perContextData)
53 break; 53 break;
54 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data); 54 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data);
55 if (!wrapperTypeInfo) 55 if (!wrapperTypeInfo)
56 break; 56 break;
57 TestInterface5ImplementationForceSetAttributeOnThis(v8String(info.GetIso late(), wrapperTypeInfo->interfaceName), v8Value, info); 57 TestInterface5ImplementationForceSetAttributeOnThis(v8String(info.GetIso late(), wrapperTypeInfo->interfaceName), v8Value, info);
58 } while (false); // do ... while (false) just for use of break 58 } while (false); // do ... while (false) just for use of break
59 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 59 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
60 } 60 }
61 61
62 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 62 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
63 { 63 {
64 v8::Local<v8::Object> holder = info.Holder(); 64 v8::Local<v8::Object> holder = info.Holder();
65 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 65 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
66 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); 66 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl );
67 } 67 }
68 68
69 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::Name>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 69 static void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
70 { 70 {
71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
72 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette r(info); 72 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette r(info);
73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
74 } 74 }
75 75
76 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 76 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
77 { 77 {
78 v8::Local<v8::Object> holder = info.Holder(); 78 v8::Local<v8::Object> holder = info.Holder();
79 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface5", holder, info.GetIsolate()); 79 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface5", holder, info.GetIsolate());
80 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 80 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
81 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe ck(info.GetIsolate(), v8Value); 81 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe ck(info.GetIsolate(), v8Value);
82 if (!cppValue) { 82 if (!cppValue) {
83 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface5'."); 83 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface5'.");
84 exceptionState.throwIfNeeded(); 84 exceptionState.throwIfNeeded();
85 return; 85 return;
86 } 86 }
87 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); 87 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue));
88 } 88 }
89 89
90 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::Name>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 90 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
91 { 91 {
92 v8::Local<v8::Value> v8Value = info[0];
92 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 93 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
93 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info); 94 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info);
94 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 95 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
95 } 96 }
96 97
97 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value > v8Value, const v8::PropertyCallbackInfo<void>& info) 98 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value > v8Value, const v8::PropertyCallbackInfo<void>& info)
98 { 99 {
99 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test InterfaceConstructorAttribute"); 100 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test InterfaceConstructorAttribute");
100 TestInterface5ImplementationForceSetAttributeOnThis(propertyName, v8Value, i nfo); 101 TestInterface5ImplementationForceSetAttributeOnThis(propertyName, v8Value, i nfo);
101 } 102 }
102 103
103 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v 8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo) 104 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v 8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo)
104 { 105 {
105 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
106 TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAtt ributeSetter(v8Value, info); 107 TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAtt ributeSetter(v8Value, info);
107 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
108 } 109 }
109 110
110 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info) 111 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info)
111 { 112 {
112 v8::Local<v8::Object> holder = info.Holder(); 113 v8::Local<v8::Object> holder = info.Holder();
113 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 114 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
114 v8SetReturnValue(info, impl->doubleAttribute()); 115 v8SetReturnValue(info, impl->doubleAttribute());
115 } 116 }
116 117
117 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8 ::PropertyCallbackInfo<v8::Value>& info) 118 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
118 { 119 {
119 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 120 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
120 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info) ; 121 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info) ;
121 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 122 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
122 } 123 }
123 124
124 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info) 125 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info)
125 { 126 {
126 v8::Local<v8::Object> holder = info.Holder(); 127 v8::Local<v8::Object> holder = info.Holder();
127 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface5", holder, info.GetIsolate()); 128 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface5", holder, info.GetIsolate());
128 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 129 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
129 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate); 130 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate);
130 if (exceptionState.throwIfNeeded()) 131 if (exceptionState.throwIfNeeded())
131 return; 132 return;
132 impl->setDoubleAttribute(cppValue); 133 impl->setDoubleAttribute(cppValue);
133 } 134 }
134 135
135 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 136 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
136 { 137 {
138 v8::Local<v8::Value> v8Value = info[0];
137 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 139 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
138 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val ue, info); 140 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val ue, info);
139 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 141 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
140 } 142 }
141 143
142 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info) 144 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info)
143 { 145 {
144 v8::Local<v8::Object> holder = info.Holder(); 146 v8::Local<v8::Object> holder = info.Holder();
145 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 147 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
146 v8SetReturnValue(info, impl->floatAttribute()); 148 v8SetReturnValue(info, impl->floatAttribute());
147 } 149 }
148 150
149 static void floatAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8: :PropertyCallbackInfo<v8::Value>& info) 151 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
150 { 152 {
151 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 153 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
152 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); 154 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info);
153 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 155 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
154 } 156 }
155 157
156 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info) 158 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info)
157 { 159 {
158 v8::Local<v8::Object> holder = info.Holder(); 160 v8::Local<v8::Object> holder = info.Holder();
159 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface5", holder, info.GetIsolate()); 161 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface5", holder, info.GetIsolate());
160 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 162 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
161 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e); 163 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e);
162 if (exceptionState.throwIfNeeded()) 164 if (exceptionState.throwIfNeeded())
163 return; 165 return;
164 impl->setFloatAttribute(cppValue); 166 impl->setFloatAttribute(cppValue);
165 } 167 }
166 168
167 static void floatAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 169 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
168 { 170 {
171 v8::Local<v8::Value> v8Value = info[0];
169 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 172 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
170 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu e, info); 173 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu e, info);
171 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 174 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
172 } 175 }
173 176
174 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info) 177 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info)
175 { 178 {
176 v8::Local<v8::Object> holder = info.Holder(); 179 v8::Local<v8::Object> holder = info.Holder();
177 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 180 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
178 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); 181 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
179 } 182 }
180 183
181 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Nam e>, const v8::PropertyCallbackInfo<v8::Value>& info) 184 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
182 { 185 {
183 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
184 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Getter(info); 187 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Getter(info);
185 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 188 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
186 } 189 }
187 190
188 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::PropertyCallbackInfo<void>& info) 191 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info)
189 { 192 {
190 v8::Local<v8::Object> holder = info.Holder(); 193 v8::Local<v8::Object> holder = info.Holder();
191 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface5", holder, info.GetIsolate()); 194 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface5", holder, info.GetIsolate());
192 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 195 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
193 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); 196 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState);
194 if (exceptionState.throwIfNeeded()) 197 if (exceptionState.throwIfNeeded())
195 return; 198 return;
196 impl->setUnrestrictedDoubleAttribute(cppValue); 199 impl->setUnrestrictedDoubleAttribute(cppValue);
197 } 200 }
198 201
199 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Nam e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 202 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
200 { 203 {
204 v8::Local<v8::Value> v8Value = info[0];
201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 205 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
202 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Setter(v8Value, info); 206 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Setter(v8Value, info);
203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 207 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
204 } 208 }
205 209
206 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info) 210 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info)
207 { 211 {
208 v8::Local<v8::Object> holder = info.Holder(); 212 v8::Local<v8::Object> holder = info.Holder();
209 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 213 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
210 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); 214 v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
211 } 215 }
212 216
213 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Name >, const v8::PropertyCallbackInfo<v8::Value>& info) 217 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
214 { 218 {
215 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 219 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
216 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG etter(info); 220 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG etter(info);
217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 221 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
218 } 222 }
219 223
220 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info) 224 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info)
221 { 225 {
222 v8::Local<v8::Object> holder = info.Holder(); 226 v8::Local<v8::Object> holder = info.Holder();
223 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface5", holder, info.GetIsolate()); 227 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface5", holder, info.GetIsolate());
224 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 228 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
225 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); 229 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState);
226 if (exceptionState.throwIfNeeded()) 230 if (exceptionState.throwIfNeeded())
227 return; 231 return;
228 impl->setUnrestrictedFloatAttribute(cppValue); 232 impl->setUnrestrictedFloatAttribute(cppValue);
229 } 233 }
230 234
231 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Name >, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 235 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
232 { 236 {
237 v8::Local<v8::Value> v8Value = info[0];
233 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 238 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
234 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS etter(v8Value, info); 239 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS etter(v8Value, info);
235 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 240 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
236 } 241 }
237 242
238 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 243 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
239 { 244 {
240 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri bute(), info.GetIsolate()); 245 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri bute(), info.GetIsolate());
241 } 246 }
242 247
(...skipping 12 matching lines...) Expand all
255 TestInterface5Implementation::setStaticStringAttribute(cppValue); 260 TestInterface5Implementation::setStaticStringAttribute(cppValue);
256 } 261 }
257 262
258 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 263 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
259 { 264 {
260 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 265 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
261 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter (v8Value, info); 266 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter (v8Value, info);
262 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 267 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
263 } 268 }
264 269
265 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 270 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
266 { 271 {
267 v8::Local<v8::Object> holder = info.Holder(); 272 v8::Local<v8::Object> holder = info.Holder();
268 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 273 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
269 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); 274 v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
270 } 275 }
271 276
272 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 277 static void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
273 { 278 {
274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 279 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
275 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette r(info); 280 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette r(info);
276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 281 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
277 } 282 }
278 283
279 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 284 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
280 { 285 {
281 v8::Local<v8::Object> holder = info.Holder(); 286 v8::Local<v8::Object> holder = info.Holder();
282 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 287 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
283 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 288 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
284 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 289 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
285 if (exceptionState.throwIfNeeded()) 290 if (exceptionState.throwIfNeeded())
286 return; 291 return;
287 impl->setAlwaysExposedAttribute(cppValue); 292 impl->setAlwaysExposedAttribute(cppValue);
288 } 293 }
289 294
290 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 295 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
291 { 296 {
297 v8::Local<v8::Value> v8Value = info[0];
292 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 298 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
293 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette r(v8Value, info); 299 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette r(v8Value, info);
294 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 300 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
295 } 301 }
296 302
297 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 303 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
298 { 304 {
299 v8::Local<v8::Object> holder = info.Holder(); 305 v8::Local<v8::Object> holder = info.Holder();
300 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 306 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
301 v8SetReturnValueInt(info, impl->workerExposedAttribute()); 307 v8SetReturnValueInt(info, impl->workerExposedAttribute());
302 } 308 }
303 309
304 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 310 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
305 { 311 {
306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 312 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
307 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette r(info); 313 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette r(info);
308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 314 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
309 } 315 }
310 316
311 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 317 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
312 { 318 {
313 v8::Local<v8::Object> holder = info.Holder(); 319 v8::Local<v8::Object> holder = info.Holder();
314 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 320 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
315 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 321 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
316 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 322 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
317 if (exceptionState.throwIfNeeded()) 323 if (exceptionState.throwIfNeeded())
318 return; 324 return;
319 impl->setWorkerExposedAttribute(cppValue); 325 impl->setWorkerExposedAttribute(cppValue);
320 } 326 }
321 327
322 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 328 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
323 { 329 {
330 v8::Local<v8::Value> v8Value = info[0];
324 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 331 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
325 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette r(v8Value, info); 332 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette r(v8Value, info);
326 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 333 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
327 } 334 }
328 335
329 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 336 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
330 { 337 {
331 v8::Local<v8::Object> holder = info.Holder(); 338 v8::Local<v8::Object> holder = info.Holder();
332 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 339 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
333 v8SetReturnValueInt(info, impl->windowExposedAttribute()); 340 v8SetReturnValueInt(info, impl->windowExposedAttribute());
334 } 341 }
335 342
336 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 343 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
337 { 344 {
338 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 345 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
339 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette r(info); 346 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette r(info);
340 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 347 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
341 } 348 }
342 349
343 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 350 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
344 { 351 {
345 v8::Local<v8::Object> holder = info.Holder(); 352 v8::Local<v8::Object> holder = info.Holder();
346 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 353 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
347 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 354 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
348 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 355 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
349 if (exceptionState.throwIfNeeded()) 356 if (exceptionState.throwIfNeeded())
350 return; 357 return;
351 impl->setWindowExposedAttribute(cppValue); 358 impl->setWindowExposedAttribute(cppValue);
352 } 359 }
353 360
354 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 361 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
355 { 362 {
363 v8::Local<v8::Value> v8Value = info[0];
356 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 364 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
357 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette r(v8Value, info); 365 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette r(v8Value, info);
358 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 366 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
359 } 367 }
360 368
361 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 369 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
362 { 370 {
363 if (UNLIKELY(info.Length() < 1)) { 371 if (UNLIKELY(info.Length() < 1)) {
364 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le ngth()), info.GetIsolate()); 372 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le ngth()), info.GetIsolate());
365 return; 373 return;
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 TestInterface5Implementation* referencedName = impl->referencedName(); 900 TestInterface5Implementation* referencedName = impl->referencedName();
893 if (referencedName) { 901 if (referencedName) {
894 if (!DOMDataStore::containsWrapper(referencedName, isolate)) 902 if (!DOMDataStore::containsWrapper(referencedName, isolate))
895 referencedName->wrap(creationContext, isolate); 903 referencedName->wrap(creationContext, isolate);
896 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate); 904 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate);
897 } 905 }
898 setObjectGroup(isolate, scriptWrappable, wrapper); 906 setObjectGroup(isolate, scriptWrappable, wrapper);
899 } 907 }
900 908
901 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut es[] = { 909 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut es[] = {
902 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
903 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo) , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance}, 910 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo) , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance},
904 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri pts, V8DOMConfiguration::OnInstance}, 911 };
905 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts , V8DOMConfiguration::OnInstance}, 912
906 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast <v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 913 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors [] = {
907 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 914 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts},
908 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al waysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 915 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri pts},
916 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts },
917 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast <v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts},
918 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts},
919 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al waysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts},
909 }; 920 };
910 921
911 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = { 922 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = {
912 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal:: voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 923 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal:: voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts},
913 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr ipts}, 924 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr ipts},
914 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 925 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
915 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl d, 0, V8DOMConfiguration::ExposedToAllScripts}, 926 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl d, 0, V8DOMConfiguration::ExposedToAllScripts},
916 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 927 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
917 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal:: voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 928 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal:: voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts},
918 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts}, 929 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts},
919 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, V 8DOMConfiguration::ExposedToAllScripts}, 930 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, V 8DOMConfiguration::ExposedToAllScripts},
920 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 931 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
921 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts}, 932 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts},
922 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0 , 1, V8DOMConfiguration::ExposedToAllScripts}, 933 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0 , 1, V8DOMConfiguration::ExposedToAllScripts},
923 }; 934 };
924 935
925 static void installV8TestInterface5Template(v8::Local<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate) 936 static void installV8TestInterface5Template(v8::Local<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate)
926 { 937 {
927 functionTemplate->ReadOnlyPrototype(); 938 functionTemplate->ReadOnlyPrototype();
928 939
929 v8::Local<v8::Signature> defaultSignature; 940 v8::Local<v8::Signature> defaultSignature;
930 if (!RuntimeEnabledFeatures::featureNameEnabled()) 941 if (!RuntimeEnabledFeatures::featureNameEnabled())
931 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfac e5::internalFieldCount, 0, 0, 0, 0, 0, 0); 942 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfac e5::internalFieldCount, 0, 0, 0, 0, 0, 0);
932 else 943 else
933 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface5::internalFieldCount, 944 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface5::internalFieldCount,
934 V8TestInterface5Attributes, WTF_ARRAY_LENGTH(V8TestInterface5Attribu tes), 945 V8TestInterface5Attributes, WTF_ARRAY_LENGTH(V8TestInterface5Attribu tes),
935 0, 0, 946 V8TestInterface5Accessors, WTF_ARRAY_LENGTH(V8TestInterface5Accessor s),
936 V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods)); 947 V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods));
937 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 948 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
938 ALLOW_UNUSED_LOCAL(instanceTemplate); 949 ALLOW_UNUSED_LOCAL(instanceTemplate);
939 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 950 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
940 ALLOW_UNUSED_LOCAL(prototypeTemplate); 951 ALLOW_UNUSED_LOCAL(prototypeTemplate);
941 static const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Const ants[] = { 952 static const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Const ants[] = {
942 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} , 953 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} ,
943 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, 954 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort},
944 }; 955 };
945 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants)); 956 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 { 1012 {
1002 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 1013 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
1003 } 1014 }
1004 1015
1005 void V8TestInterface5::installConditionallyEnabledProperties(v8::Local<v8::Objec t> instanceObject, v8::Isolate* isolate) 1016 void V8TestInterface5::installConditionallyEnabledProperties(v8::Local<v8::Objec t> instanceObject, v8::Isolate* isolate)
1006 { 1017 {
1007 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype()); 1018 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
1008 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1019 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1009 1020
1010 if (context && (context->isWorkerGlobalScope())) { 1021 if (context && (context->isWorkerGlobalScope())) {
1011 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::work erExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Interna l::workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfi guration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; 1022 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::worker ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts};
1012 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration); 1023 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo nfiguration);
1013 } 1024 }
1014 if (context && (context->isDocument())) { 1025 if (context && (context->isDocument())) {
1015 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::wind owExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Interna l::windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfi guration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; 1026 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::window ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts};
1016 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration); 1027 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo nfiguration);
1017 } 1028 }
1018 } 1029 }
1019 1030
1020 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8 ::Object> prototypeObject) 1031 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8 ::Object> prototypeObject)
1021 { 1032 {
1022 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 1033 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
1023 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1034 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1024 ASSERT(context); 1035 ASSERT(context);
1025 if (context && (context->isWorkerGlobalScope())) { 1036 if (context && (context->isWorkerGlobalScope())) {
1026 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterface5ImplementationV8Internal::workerEx posedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isol ate->GetCurrentContext()).ToLocalChecked()); 1037 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterface5ImplementationV8Internal::workerEx posedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isol ate->GetCurrentContext()).ToLocalChecked());
(...skipping 16 matching lines...) Expand all
1043 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 1054 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
1044 } 1055 }
1045 1056
1046 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 1057 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
1047 { 1058 {
1048 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 1059 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
1049 } 1060 }
1050 1061
1051 } // namespace blink 1062 } // namespace blink
1052 #endif // ENABLE(CONDITION) 1063 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | Source/core/html/HTMLAppletElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698