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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp

Issue 1531443003: [bindings] Implement an ExperimentEnabled IDL extended attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments. Created 4 years, 11 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 "V8TestInterface.h" 7 #include "V8TestInterface.h"
8 8
9 #if ENABLE(CONDITION) 9 #if ENABLE(CONDITION)
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 12 matching lines...) Expand all
23 #include "bindings/core/v8/V8TestInterface.h" 23 #include "bindings/core/v8/V8TestInterface.h"
24 #include "bindings/core/v8/V8TestInterface2.h" 24 #include "bindings/core/v8/V8TestInterface2.h"
25 #include "bindings/core/v8/V8TestInterfaceEmpty.h" 25 #include "bindings/core/v8/V8TestInterfaceEmpty.h"
26 #include "bindings/core/v8/V8Window.h" 26 #include "bindings/core/v8/V8Window.h"
27 #include "bindings/tests/idls/core/TestImplements2.h" 27 #include "bindings/tests/idls/core/TestImplements2.h"
28 #include "bindings/tests/idls/core/TestImplements3Implementation.h" 28 #include "bindings/tests/idls/core/TestImplements3Implementation.h"
29 #include "bindings/tests/idls/core/TestPartialInterface.h" 29 #include "bindings/tests/idls/core/TestPartialInterface.h"
30 #include "bindings/tests/idls/core/TestPartialInterfaceImplementation.h" 30 #include "bindings/tests/idls/core/TestPartialInterfaceImplementation.h"
31 #include "core/dom/ContextFeatures.h" 31 #include "core/dom/ContextFeatures.h"
32 #include "core/dom/Document.h" 32 #include "core/dom/Document.h"
33 #include "core/experiments/ExperimentalFeatures.h"
33 #include "core/frame/LocalFrame.h" 34 #include "core/frame/LocalFrame.h"
34 #include "core/frame/UseCounter.h" 35 #include "core/frame/UseCounter.h"
35 #include "core/inspector/ConsoleMessage.h" 36 #include "core/inspector/ConsoleMessage.h"
36 #include "platform/RuntimeEnabledFeatures.h" 37 #include "platform/RuntimeEnabledFeatures.h"
37 #include "platform/ScriptForbiddenScope.h" 38 #include "platform/ScriptForbiddenScope.h"
38 #include "platform/TraceEvent.h" 39 #include "platform/TraceEvent.h"
39 #include "wtf/GetPtr.h" 40 #include "wtf/GetPtr.h"
40 #include "wtf/RefPtr.h" 41 #include "wtf/RefPtr.h"
41 #include "wtf/build_config.h" 42 #include "wtf/build_config.h"
42 43
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data); 86 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data);
86 if (!wrapperTypeInfo) 87 if (!wrapperTypeInfo)
87 break; 88 break;
88 TestInterfaceImplementationCreateDataProperty(v8String(info.GetIsolate() , wrapperTypeInfo->interfaceName), v8Value, info); 89 TestInterfaceImplementationCreateDataProperty(v8String(info.GetIsolate() , wrapperTypeInfo->interfaceName), v8Value, info);
89 } while (false); // do ... while (false) just for use of break 90 } while (false); // do ... while (false) just for use of break
90 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 91 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
91 } 92 }
92 93
93 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 94 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
94 { 95 {
96 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
97 String errorMessage;
98 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
99 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
100 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
101 return;
102 }
95 v8::Local<v8::Object> holder = info.Holder(); 103 v8::Local<v8::Object> holder = info.Holder();
96 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 104 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
97 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); 105 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl );
98 } 106 }
99 107
100 static void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 108 static void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
101 { 109 {
102 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 110 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
103 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib uteGetter); 111 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib uteGetter);
112 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
113 String errorMessage;
114 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
115 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
116 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
117 return;
118 }
104 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter (info); 119 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter (info);
105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
106 } 121 }
107 122
108 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 123 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
109 { 124 {
110 v8::Local<v8::Object> holder = info.Holder(); 125 v8::Local<v8::Object> holder = info.Holder();
111 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface", holder, info.GetIsolate()); 126 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface", holder, info.GetIsolate());
112 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 127 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
113 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value); 128 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value);
(...skipping 22 matching lines...) Expand all
136 151
137 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v 8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo) 152 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v 8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo)
138 { 153 {
139 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 154 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
140 TestInterfaceImplementationV8Internal::testInterfaceConstructorAttributeAttr ibuteSetter(v8Value, info); 155 TestInterfaceImplementationV8Internal::testInterfaceConstructorAttributeAttr ibuteSetter(v8Value, info);
141 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 156 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
142 } 157 }
143 158
144 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info) 159 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info)
145 { 160 {
161 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
162 String errorMessage;
163 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
164 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
165 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
166 return;
167 }
146 v8::Local<v8::Object> holder = info.Holder(); 168 v8::Local<v8::Object> holder = info.Holder();
147 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 169 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
148 v8SetReturnValue(info, impl->doubleAttribute()); 170 v8SetReturnValue(info, impl->doubleAttribute());
149 } 171 }
150 172
151 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 173 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
152 { 174 {
153 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 175 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
176 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
177 String errorMessage;
178 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
179 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
180 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
181 return;
182 }
154 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info); 183 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info);
155 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 184 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
156 } 185 }
157 186
158 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info) 187 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info)
159 { 188 {
160 v8::Local<v8::Object> holder = info.Holder(); 189 v8::Local<v8::Object> holder = info.Holder();
161 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface", holder, info.GetIsolate()); 190 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface", holder, info.GetIsolate());
162 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 191 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
163 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate); 192 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate);
164 if (exceptionState.throwIfNeeded()) 193 if (exceptionState.throwIfNeeded())
165 return; 194 return;
166 impl->setDoubleAttribute(cppValue); 195 impl->setDoubleAttribute(cppValue);
167 } 196 }
168 197
169 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 198 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
170 { 199 {
171 v8::Local<v8::Value> v8Value = info[0]; 200 v8::Local<v8::Value> v8Value = info[0];
172 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
173 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu e, info); 202 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu e, info);
174 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
175 } 204 }
176 205
177 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info) 206 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info)
178 { 207 {
208 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
209 String errorMessage;
210 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
211 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
212 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
213 return;
214 }
179 v8::Local<v8::Object> holder = info.Holder(); 215 v8::Local<v8::Object> holder = info.Holder();
180 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 216 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
181 v8SetReturnValue(info, impl->floatAttribute()); 217 v8SetReturnValue(info, impl->floatAttribute());
182 } 218 }
183 219
184 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 220 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
185 { 221 {
186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 222 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
223 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
224 String errorMessage;
225 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
226 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
227 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
228 return;
229 }
187 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); 230 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info);
188 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
189 } 232 }
190 233
191 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info) 234 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info)
192 { 235 {
193 v8::Local<v8::Object> holder = info.Holder(); 236 v8::Local<v8::Object> holder = info.Holder();
194 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface", holder, info.GetIsolate()); 237 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface", holder, info.GetIsolate());
195 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 238 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
196 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e); 239 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e);
197 if (exceptionState.throwIfNeeded()) 240 if (exceptionState.throwIfNeeded())
198 return; 241 return;
199 impl->setFloatAttribute(cppValue); 242 impl->setFloatAttribute(cppValue);
200 } 243 }
201 244
202 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 245 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
203 { 246 {
204 v8::Local<v8::Value> v8Value = info[0]; 247 v8::Local<v8::Value> v8Value = info[0];
205 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 248 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
206 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value , info); 249 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value , info);
207 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 250 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
208 } 251 }
209 252
210 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) 253 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info)
211 { 254 {
255 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
256 String errorMessage;
257 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
258 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
259 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
260 return;
261 }
212 v8::Local<v8::Object> holder = info.Holder(); 262 v8::Local<v8::Object> holder = info.Holder();
213 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 263 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
214 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); 264 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
215 } 265 }
216 266
217 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 267 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
218 { 268 {
219 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 269 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
270 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
271 String errorMessage;
272 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
273 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
274 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
275 return;
276 }
220 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG etter(info); 277 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG etter(info);
221 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 278 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
222 } 279 }
223 280
224 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) 281 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info)
225 { 282 {
226 v8::Local<v8::Object> holder = info.Holder(); 283 v8::Local<v8::Object> holder = info.Holder();
227 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface", holder, info.GetIsolate()); 284 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface", holder, info.GetIsolate());
228 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 285 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
229 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); 286 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState);
230 if (exceptionState.throwIfNeeded()) 287 if (exceptionState.throwIfNeeded())
231 return; 288 return;
232 impl->setUnrestrictedDoubleAttribute(cppValue); 289 impl->setUnrestrictedDoubleAttribute(cppValue);
233 } 290 }
234 291
235 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 292 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
236 { 293 {
237 v8::Local<v8::Value> v8Value = info[0]; 294 v8::Local<v8::Value> v8Value = info[0];
238 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 295 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
239 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS etter(v8Value, info); 296 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS etter(v8Value, info);
240 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 297 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
241 } 298 }
242 299
243 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) 300 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info)
244 { 301 {
302 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
303 String errorMessage;
304 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
305 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
306 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
307 return;
308 }
245 v8::Local<v8::Object> holder = info.Holder(); 309 v8::Local<v8::Object> holder = info.Holder();
246 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 310 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
247 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); 311 v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
248 } 312 }
249 313
250 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 314 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
251 { 315 {
252 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 316 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
317 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
318 String errorMessage;
319 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
320 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
321 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
322 return;
323 }
253 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe tter(info); 324 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe tter(info);
254 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 325 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
255 } 326 }
256 327
257 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) 328 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info)
258 { 329 {
259 v8::Local<v8::Object> holder = info.Holder(); 330 v8::Local<v8::Object> holder = info.Holder();
260 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface", holder, info.GetIsolate()); 331 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface", holder, info.GetIsolate());
261 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 332 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
262 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); 333 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState);
263 if (exceptionState.throwIfNeeded()) 334 if (exceptionState.throwIfNeeded())
264 return; 335 return;
265 impl->setUnrestrictedFloatAttribute(cppValue); 336 impl->setUnrestrictedFloatAttribute(cppValue);
266 } 337 }
267 338
268 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 339 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
269 { 340 {
270 v8::Local<v8::Value> v8Value = info[0]; 341 v8::Local<v8::Value> v8Value = info[0];
271 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 342 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
272 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe tter(v8Value, info); 343 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe tter(v8Value, info);
273 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 344 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
274 } 345 }
275 346
276 static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:: Value>& info) 347 static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:: Value>& info)
277 { 348 {
349 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
350 String errorMessage;
351 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
352 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
353 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
354 return;
355 }
278 v8::Local<v8::Object> holder = info.Holder(); 356 v8::Local<v8::Object> holder = info.Holder();
279 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 357 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
280 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); 358 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate());
281 } 359 }
282 360
283 static void testEnumAttributeAttributeGetterCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 361 static void testEnumAttributeAttributeGetterCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
284 { 362 {
285 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 363 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
364 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
365 String errorMessage;
366 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
367 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
368 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
369 return;
370 }
286 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info ); 371 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info );
287 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 372 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
288 } 373 }
289 374
290 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 375 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
291 { 376 {
292 v8::Local<v8::Object> holder = info.Holder(); 377 v8::Local<v8::Object> holder = info.Holder();
293 ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumAttrib ute", "TestInterface", holder, info.GetIsolate()); 378 ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumAttrib ute", "TestInterface", holder, info.GetIsolate());
294 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 379 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
295 V8StringResource<> cppValue = v8Value; 380 V8StringResource<> cppValue = v8Value;
(...skipping 15 matching lines...) Expand all
311 static void testEnumAttributeAttributeSetterCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 396 static void testEnumAttributeAttributeSetterCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
312 { 397 {
313 v8::Local<v8::Value> v8Value = info[0]; 398 v8::Local<v8::Value> v8Value = info[0];
314 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 399 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
315 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va lue, info); 400 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va lue, info);
316 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 401 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
317 } 402 }
318 403
319 static void stringOrDoubleAttributeAttributeGetter(const v8::FunctionCallbackInf o<v8::Value>& info) 404 static void stringOrDoubleAttributeAttributeGetter(const v8::FunctionCallbackInf o<v8::Value>& info)
320 { 405 {
406 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
407 String errorMessage;
408 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
409 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
410 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
411 return;
412 }
321 v8::Local<v8::Object> holder = info.Holder(); 413 v8::Local<v8::Object> holder = info.Holder();
322 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 414 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
323 StringOrDouble result; 415 StringOrDouble result;
324 impl->stringOrDoubleAttribute(result); 416 impl->stringOrDoubleAttribute(result);
325 v8SetReturnValue(info, result); 417 v8SetReturnValue(info, result);
326 } 418 }
327 419
328 static void stringOrDoubleAttributeAttributeGetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 420 static void stringOrDoubleAttributeAttributeGetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
329 { 421 {
330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 422 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
423 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
424 String errorMessage;
425 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
426 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
427 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
428 return;
429 }
331 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette r(info); 430 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette r(info);
332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 431 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
333 } 432 }
334 433
335 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 434 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
336 { 435 {
337 v8::Local<v8::Object> holder = info.Holder(); 436 v8::Local<v8::Object> holder = info.Holder();
338 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble Attribute", "TestInterface", holder, info.GetIsolate()); 437 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble Attribute", "TestInterface", holder, info.GetIsolate());
339 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 438 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
340 StringOrDouble cppValue; 439 StringOrDouble cppValue;
341 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConv ersionMode::NotNullable, exceptionState); 440 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConv ersionMode::NotNullable, exceptionState);
342 if (exceptionState.throwIfNeeded()) 441 if (exceptionState.throwIfNeeded())
343 return; 442 return;
344 impl->setStringOrDoubleAttribute(cppValue); 443 impl->setStringOrDoubleAttribute(cppValue);
345 } 444 }
346 445
347 static void stringOrDoubleAttributeAttributeSetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 446 static void stringOrDoubleAttributeAttributeSetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
348 { 447 {
349 v8::Local<v8::Value> v8Value = info[0]; 448 v8::Local<v8::Value> v8Value = info[0];
350 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 449 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
351 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette r(v8Value, info); 450 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette r(v8Value, info);
352 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 451 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
353 } 452 }
354 453
355 static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackIn fo<v8::Value>& info) 454 static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackIn fo<v8::Value>& info)
356 { 455 {
456 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
457 String errorMessage;
458 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
459 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
460 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
461 return;
462 }
357 v8::Local<v8::Object> holder = info.Holder(); 463 v8::Local<v8::Object> holder = info.Holder();
358 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 464 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
359 v8SetReturnValueInt(info, impl->conditionalLongAttribute()); 465 v8SetReturnValueInt(info, impl->conditionalLongAttribute());
360 } 466 }
361 467
362 static void conditionalLongAttributeAttributeGetterCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 468 static void conditionalLongAttributeAttributeGetterCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
363 { 469 {
364 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 470 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
471 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
472 String errorMessage;
473 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
474 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
475 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
476 return;
477 }
365 TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeGett er(info); 478 TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeGett er(info);
366 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 479 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
367 } 480 }
368 481
369 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value , const v8::FunctionCallbackInfo<v8::Value>& info) 482 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value , const v8::FunctionCallbackInfo<v8::Value>& info)
370 { 483 {
371 v8::Local<v8::Object> holder = info.Holder(); 484 v8::Local<v8::Object> holder = info.Holder();
372 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon gAttribute", "TestInterface", holder, info.GetIsolate()); 485 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon gAttribute", "TestInterface", holder, info.GetIsolate());
373 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 486 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
374 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 487 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
375 if (exceptionState.throwIfNeeded()) 488 if (exceptionState.throwIfNeeded())
376 return; 489 return;
377 impl->setConditionalLongAttribute(cppValue); 490 impl->setConditionalLongAttribute(cppValue);
378 } 491 }
379 492
380 static void conditionalLongAttributeAttributeSetterCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 493 static void conditionalLongAttributeAttributeSetterCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
381 { 494 {
382 v8::Local<v8::Value> v8Value = info[0]; 495 v8::Local<v8::Value> v8Value = info[0];
383 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 496 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
384 TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeSett er(v8Value, info); 497 TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeSett er(v8Value, info);
385 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 498 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
386 } 499 }
387 500
388 static void conditionalReadOnlyLongAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info) 501 static void conditionalReadOnlyLongAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info)
389 { 502 {
503 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
504 String errorMessage;
505 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
506 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
507 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
508 return;
509 }
390 v8::Local<v8::Object> holder = info.Holder(); 510 v8::Local<v8::Object> holder = info.Holder();
391 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 511 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
392 v8SetReturnValueInt(info, impl->conditionalReadOnlyLongAttribute()); 512 v8SetReturnValueInt(info, impl->conditionalReadOnlyLongAttribute());
393 } 513 }
394 514
395 static void conditionalReadOnlyLongAttributeAttributeGetterCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 515 static void conditionalReadOnlyLongAttributeAttributeGetterCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
396 { 516 {
397 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 517 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
518 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
519 String errorMessage;
520 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
521 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
522 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
523 return;
524 }
398 TestInterfaceImplementationV8Internal::conditionalReadOnlyLongAttributeAttri buteGetter(info); 525 TestInterfaceImplementationV8Internal::conditionalReadOnlyLongAttributeAttri buteGetter(info);
399 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 526 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
400 } 527 }
401 528
402 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info) 529 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info)
403 { 530 {
531 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
532 String errorMessage;
533 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
534 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
535 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
536 return;
537 }
404 v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttrib ute(), info.GetIsolate()); 538 v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttrib ute(), info.GetIsolate());
405 } 539 }
406 540
407 static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 541 static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
408 { 542 {
409 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 543 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
544 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
545 String errorMessage;
546 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
547 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
548 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
549 return;
550 }
410 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetter( info); 551 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetter( info);
411 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 552 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
412 } 553 }
413 554
414 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) 555 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info)
415 { 556 {
416 V8StringResource<> cppValue = v8Value; 557 V8StringResource<> cppValue = v8Value;
417 if (!cppValue.prepare()) 558 if (!cppValue.prepare())
418 return; 559 return;
419 TestInterfaceImplementation::setStaticStringAttribute(cppValue); 560 TestInterfaceImplementation::setStaticStringAttribute(cppValue);
420 } 561 }
421 562
422 static void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 563 static void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
423 { 564 {
424 v8::Local<v8::Value> v8Value = info[0]; 565 v8::Local<v8::Value> v8Value = info[0];
425 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 566 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
426 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter( v8Value, info); 567 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter( v8Value, info);
427 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 568 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
428 } 569 }
429 570
430 static void staticReturnDOMWrapperAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info) 571 static void staticReturnDOMWrapperAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info)
431 { 572 {
573 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
574 String errorMessage;
575 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
576 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
577 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
578 return;
579 }
432 v8SetReturnValue(info, TestInterfaceImplementation::staticReturnDOMWrapperAt tribute(), info.GetIsolate()->GetCurrentContext()->Global()); 580 v8SetReturnValue(info, TestInterfaceImplementation::staticReturnDOMWrapperAt tribute(), info.GetIsolate()->GetCurrentContext()->Global());
433 } 581 }
434 582
435 static void staticReturnDOMWrapperAttributeAttributeGetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 583 static void staticReturnDOMWrapperAttributeAttributeGetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
436 { 584 {
437 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 585 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
586 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
587 String errorMessage;
588 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
589 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
590 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
591 return;
592 }
438 TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttrib uteGetter(info); 593 TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttrib uteGetter(info);
439 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 594 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
440 } 595 }
441 596
442 static void staticReturnDOMWrapperAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 597 static void staticReturnDOMWrapperAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
443 { 598 {
444 v8::Local<v8::Object> holder = info.Holder(); 599 v8::Local<v8::Object> holder = info.Holder();
445 ExceptionState exceptionState(ExceptionState::SetterContext, "staticReturnDO MWrapperAttribute", "TestInterface", holder, info.GetIsolate()); 600 ExceptionState exceptionState(ExceptionState::SetterContext, "staticReturnDO MWrapperAttribute", "TestInterface", holder, info.GetIsolate());
446 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value); 601 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value);
447 if (!cppValue) { 602 if (!cppValue) {
448 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'."); 603 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'.");
449 exceptionState.throwIfNeeded(); 604 exceptionState.throwIfNeeded();
450 return; 605 return;
451 } 606 }
452 TestInterfaceImplementation::setStaticReturnDOMWrapperAttribute(WTF::getPtr( cppValue)); 607 TestInterfaceImplementation::setStaticReturnDOMWrapperAttribute(WTF::getPtr( cppValue));
453 } 608 }
454 609
455 static void staticReturnDOMWrapperAttributeAttributeSetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 610 static void staticReturnDOMWrapperAttributeAttributeSetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
456 { 611 {
457 v8::Local<v8::Value> v8Value = info[0]; 612 v8::Local<v8::Value> v8Value = info[0];
458 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 613 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
459 TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttrib uteSetter(v8Value, info); 614 TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttrib uteSetter(v8Value, info);
460 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 615 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
461 } 616 }
462 617
463 static void staticReadOnlyStringAttributeAttributeGetter(const v8::FunctionCallb ackInfo<v8::Value>& info) 618 static void staticReadOnlyStringAttributeAttributeGetter(const v8::FunctionCallb ackInfo<v8::Value>& info)
464 { 619 {
620 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
621 String errorMessage;
622 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
623 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
624 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
625 return;
626 }
465 v8SetReturnValueString(info, TestInterfaceImplementation::staticReadOnlyStri ngAttribute(), info.GetIsolate()); 627 v8SetReturnValueString(info, TestInterfaceImplementation::staticReadOnlyStri ngAttribute(), info.GetIsolate());
466 } 628 }
467 629
468 static void staticReadOnlyStringAttributeAttributeGetterCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 630 static void staticReadOnlyStringAttributeAttributeGetterCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
469 { 631 {
470 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 632 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
633 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
634 String errorMessage;
635 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
636 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
637 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
638 return;
639 }
471 TestInterfaceImplementationV8Internal::staticReadOnlyStringAttributeAttribut eGetter(info); 640 TestInterfaceImplementationV8Internal::staticReadOnlyStringAttributeAttribut eGetter(info);
472 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 641 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
473 } 642 }
474 643
475 static void staticReadOnlyReturnDOMWrapperAttributeAttributeGetter(const v8::Fun ctionCallbackInfo<v8::Value>& info) 644 static void staticReadOnlyReturnDOMWrapperAttributeAttributeGetter(const v8::Fun ctionCallbackInfo<v8::Value>& info)
476 { 645 {
646 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
647 String errorMessage;
648 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
649 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
650 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
651 return;
652 }
477 RefPtr<TestInterfaceImplementation> cppValue(TestInterfaceImplementation::st aticReadOnlyReturnDOMWrapperAttribute()); 653 RefPtr<TestInterfaceImplementation> cppValue(TestInterfaceImplementation::st aticReadOnlyReturnDOMWrapperAttribute());
478 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue .get())) 654 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue .get()))
479 return; 655 return;
480 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate()) ); 656 v8::Local<v8::Value> v8Value(toV8(cppValue.get(), holder, info.GetIsolate()) );
481 if (!v8Value.IsEmpty()) { 657 if (!v8Value.IsEmpty()) {
482 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h older, v8AtomicString(info.GetIsolate(), "staticReadOnlyReturnDOMWrapperAttribut e"), v8Value); 658 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h older, v8AtomicString(info.GetIsolate(), "staticReadOnlyReturnDOMWrapperAttribut e"), v8Value);
483 v8SetReturnValue(info, v8Value); 659 v8SetReturnValue(info, v8Value);
484 } 660 }
485 } 661 }
486 662
487 static void staticReadOnlyReturnDOMWrapperAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 663 static void staticReadOnlyReturnDOMWrapperAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
488 { 664 {
489 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 665 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
666 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
667 String errorMessage;
668 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
669 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
670 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
671 return;
672 }
490 TestInterfaceImplementationV8Internal::staticReadOnlyReturnDOMWrapperAttribu teAttributeGetter(info); 673 TestInterfaceImplementationV8Internal::staticReadOnlyReturnDOMWrapperAttribu teAttributeGetter(info);
491 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 674 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
492 } 675 }
493 676
494 static void staticConditionalReadOnlyLongAttributeAttributeGetter(const v8::Func tionCallbackInfo<v8::Value>& info) 677 static void staticConditionalReadOnlyLongAttributeAttributeGetter(const v8::Func tionCallbackInfo<v8::Value>& info)
495 { 678 {
679 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
680 String errorMessage;
681 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
682 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
683 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
684 return;
685 }
496 v8SetReturnValueInt(info, TestInterfaceImplementation::staticConditionalRead OnlyLongAttribute()); 686 v8SetReturnValueInt(info, TestInterfaceImplementation::staticConditionalRead OnlyLongAttribute());
497 } 687 }
498 688
499 static void staticConditionalReadOnlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 689 static void staticConditionalReadOnlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
500 { 690 {
501 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 691 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
692 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
693 String errorMessage;
694 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
695 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
696 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
697 return;
698 }
502 TestInterfaceImplementationV8Internal::staticConditionalReadOnlyLongAttribut eAttributeGetter(info); 699 TestInterfaceImplementationV8Internal::staticConditionalReadOnlyLongAttribut eAttributeGetter(info);
503 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 700 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
504 } 701 }
505 702
506 static void legacyInterfaceTypeCheckingAttributeAttributeGetter(const v8::Functi onCallbackInfo<v8::Value>& info) 703 static void legacyInterfaceTypeCheckingAttributeAttributeGetter(const v8::Functi onCallbackInfo<v8::Value>& info)
507 { 704 {
705 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
706 String errorMessage;
707 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
708 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
709 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
710 return;
711 }
508 v8::Local<v8::Object> holder = info.Holder(); 712 v8::Local<v8::Object> holder = info.Holder();
509 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 713 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
510 v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingAttr ibute()), impl); 714 v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingAttr ibute()), impl);
511 } 715 }
512 716
513 static void legacyInterfaceTypeCheckingAttributeAttributeGetterCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info) 717 static void legacyInterfaceTypeCheckingAttributeAttributeGetterCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info)
514 { 718 {
515 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 719 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
720 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
721 String errorMessage;
722 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
723 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
724 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
725 return;
726 }
516 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA ttributeGetter(info); 727 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA ttributeGetter(info);
517 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 728 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
518 } 729 }
519 730
520 static void legacyInterfaceTypeCheckingAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 731 static void legacyInterfaceTypeCheckingAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
521 { 732 {
522 v8::Local<v8::Object> holder = info.Holder(); 733 v8::Local<v8::Object> holder = info.Holder();
523 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 734 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
524 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf o.GetIsolate(), v8Value); 735 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf o.GetIsolate(), v8Value);
525 impl->setLegacyInterfaceTypeCheckingAttribute(WTF::getPtr(cppValue)); 736 impl->setLegacyInterfaceTypeCheckingAttribute(WTF::getPtr(cppValue));
526 } 737 }
527 738
528 static void legacyInterfaceTypeCheckingAttributeAttributeSetterCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info) 739 static void legacyInterfaceTypeCheckingAttributeAttributeSetterCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info)
529 { 740 {
530 v8::Local<v8::Value> v8Value = info[0]; 741 v8::Local<v8::Value> v8Value = info[0];
531 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 742 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
532 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA ttributeSetter(v8Value, info); 743 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA ttributeSetter(v8Value, info);
533 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 744 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
534 } 745 }
535 746
536 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 747 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
537 { 748 {
749 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
750 String errorMessage;
751 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
752 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
753 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
754 return;
755 }
538 v8::Local<v8::Object> holder = info.Holder(); 756 v8::Local<v8::Object> holder = info.Holder();
539 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 757 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
540 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); 758 v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
541 } 759 }
542 760
543 static void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 761 static void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
544 { 762 {
545 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 763 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
764 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
765 String errorMessage;
766 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
767 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
768 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
769 return;
770 }
546 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter (info); 771 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter (info);
547 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 772 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
548 } 773 }
549 774
550 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 775 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
551 { 776 {
552 v8::Local<v8::Object> holder = info.Holder(); 777 v8::Local<v8::Object> holder = info.Holder();
553 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface", holder, info.GetIsolate()); 778 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface", holder, info.GetIsolate());
554 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 779 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
555 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 780 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
556 if (exceptionState.throwIfNeeded()) 781 if (exceptionState.throwIfNeeded())
557 return; 782 return;
558 impl->setAlwaysExposedAttribute(cppValue); 783 impl->setAlwaysExposedAttribute(cppValue);
559 } 784 }
560 785
561 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 786 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
562 { 787 {
563 v8::Local<v8::Value> v8Value = info[0]; 788 v8::Local<v8::Value> v8Value = info[0];
564 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 789 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
565 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter (v8Value, info); 790 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter (v8Value, info);
566 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 791 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
567 } 792 }
568 793
569 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 794 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
570 { 795 {
796 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
797 String errorMessage;
798 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
799 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
800 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
801 return;
802 }
571 v8::Local<v8::Object> holder = info.Holder(); 803 v8::Local<v8::Object> holder = info.Holder();
572 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 804 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
573 v8SetReturnValueInt(info, impl->workerExposedAttribute()); 805 v8SetReturnValueInt(info, impl->workerExposedAttribute());
574 } 806 }
575 807
576 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 808 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
577 { 809 {
578 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 810 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
811 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
812 String errorMessage;
813 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
814 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
815 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
816 return;
817 }
579 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter (info); 818 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter (info);
580 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 819 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
581 } 820 }
582 821
583 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 822 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
584 { 823 {
585 v8::Local<v8::Object> holder = info.Holder(); 824 v8::Local<v8::Object> holder = info.Holder();
586 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface", holder, info.GetIsolate()); 825 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface", holder, info.GetIsolate());
587 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 826 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
588 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 827 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
589 if (exceptionState.throwIfNeeded()) 828 if (exceptionState.throwIfNeeded())
590 return; 829 return;
591 impl->setWorkerExposedAttribute(cppValue); 830 impl->setWorkerExposedAttribute(cppValue);
592 } 831 }
593 832
594 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 833 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
595 { 834 {
596 v8::Local<v8::Value> v8Value = info[0]; 835 v8::Local<v8::Value> v8Value = info[0];
597 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 836 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
598 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter (v8Value, info); 837 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter (v8Value, info);
599 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 838 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
600 } 839 }
601 840
602 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 841 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
603 { 842 {
843 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
844 String errorMessage;
845 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
846 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
847 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
848 return;
849 }
604 v8::Local<v8::Object> holder = info.Holder(); 850 v8::Local<v8::Object> holder = info.Holder();
605 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 851 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
606 v8SetReturnValueInt(info, impl->windowExposedAttribute()); 852 v8SetReturnValueInt(info, impl->windowExposedAttribute());
607 } 853 }
608 854
609 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 855 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
610 { 856 {
611 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 857 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
858 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
859 String errorMessage;
860 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
861 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
862 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
863 return;
864 }
612 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter (info); 865 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter (info);
613 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 866 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
614 } 867 }
615 868
616 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 869 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
617 { 870 {
618 v8::Local<v8::Object> holder = info.Holder(); 871 v8::Local<v8::Object> holder = info.Holder();
619 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface", holder, info.GetIsolate()); 872 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface", holder, info.GetIsolate());
620 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 873 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
621 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 874 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
622 if (exceptionState.throwIfNeeded()) 875 if (exceptionState.throwIfNeeded())
623 return; 876 return;
624 impl->setWindowExposedAttribute(cppValue); 877 impl->setWindowExposedAttribute(cppValue);
625 } 878 }
626 879
627 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 880 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
628 { 881 {
629 v8::Local<v8::Value> v8Value = info[0]; 882 v8::Local<v8::Value> v8Value = info[0];
630 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 883 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
631 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter (v8Value, info); 884 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter (v8Value, info);
632 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 885 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
633 } 886 }
634 887
635 static void lenientThisAttributeAttributeGetter(const v8::FunctionCallbackInfo<v 8::Value>& info) 888 static void lenientThisAttributeAttributeGetter(const v8::FunctionCallbackInfo<v 8::Value>& info)
636 { 889 {
890 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
891 String errorMessage;
892 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
893 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
894 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
895 return;
896 }
637 if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate())) 897 if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate()))
638 return; // Return silently because of [LenientThis]. 898 return; // Return silently because of [LenientThis].
639 v8::Local<v8::Object> holder = info.Holder(); 899 v8::Local<v8::Object> holder = info.Holder();
640 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 900 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
641 v8SetReturnValue(info, impl->lenientThisAttribute().v8Value()); 901 v8SetReturnValue(info, impl->lenientThisAttribute().v8Value());
642 } 902 }
643 903
644 static void lenientThisAttributeAttributeGetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 904 static void lenientThisAttributeAttributeGetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
645 { 905 {
646 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 906 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
907 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
908 String errorMessage;
909 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
910 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
911 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
912 return;
913 }
647 TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeGetter(i nfo); 914 TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeGetter(i nfo);
648 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 915 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
649 } 916 }
650 917
651 static void lenientThisAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info) 918 static void lenientThisAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info)
652 { 919 {
653 if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate())) 920 if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate()))
654 return; // Return silently because of [LenientThis]. 921 return; // Return silently because of [LenientThis].
655 v8::Local<v8::Object> holder = info.Holder(); 922 v8::Local<v8::Object> holder = info.Holder();
656 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 923 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
657 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value); 924 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value);
658 impl->setLenientThisAttribute(cppValue); 925 impl->setLenientThisAttribute(cppValue);
659 } 926 }
660 927
661 static void lenientThisAttributeAttributeSetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 928 static void lenientThisAttributeAttributeSetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
662 { 929 {
663 v8::Local<v8::Value> v8Value = info[0]; 930 v8::Local<v8::Value> v8Value = info[0];
664 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 931 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
665 TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeSetter(v 8Value, info); 932 TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeSetter(v 8Value, info);
666 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 933 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
667 } 934 }
668 935
669 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Funct ionCallbackInfo<v8::Value>& info) 936 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Funct ionCallbackInfo<v8::Value>& info)
670 { 937 {
938 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
939 String errorMessage;
940 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
941 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
942 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
943 return;
944 }
671 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO nlyLongAttribute()); 945 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO nlyLongAttribute());
672 } 946 }
673 947
674 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 948 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
675 { 949 {
676 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 950 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
951 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
952 String errorMessage;
953 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
954 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
955 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
956 return;
957 }
677 TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttribute AttributeGetter(info); 958 TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttribute AttributeGetter(info);
678 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 959 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
679 } 960 }
680 961
681 static void implementsStaticStringAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info) 962 static void implementsStaticStringAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info)
682 { 963 {
964 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
965 String errorMessage;
966 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
967 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
968 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
969 return;
970 }
683 v8SetReturnValueString(info, TestInterfaceImplementation::implementsStaticSt ringAttribute(), info.GetIsolate()); 971 v8SetReturnValueString(info, TestInterfaceImplementation::implementsStaticSt ringAttribute(), info.GetIsolate());
684 } 972 }
685 973
686 static void implementsStaticStringAttributeAttributeGetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 974 static void implementsStaticStringAttributeAttributeGetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
687 { 975 {
688 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 976 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
977 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
978 String errorMessage;
979 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
980 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
981 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
982 return;
983 }
689 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib uteGetter(info); 984 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib uteGetter(info);
690 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 985 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
691 } 986 }
692 987
693 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 988 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
694 { 989 {
695 V8StringResource<> cppValue = v8Value; 990 V8StringResource<> cppValue = v8Value;
696 if (!cppValue.prepare()) 991 if (!cppValue.prepare())
697 return; 992 return;
698 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue); 993 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue);
699 } 994 }
700 995
701 static void implementsStaticStringAttributeAttributeSetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 996 static void implementsStaticStringAttributeAttributeSetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
702 { 997 {
703 v8::Local<v8::Value> v8Value = info[0]; 998 v8::Local<v8::Value> v8Value = info[0];
704 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 999 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
705 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib uteSetter(v8Value, info); 1000 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib uteSetter(v8Value, info);
706 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1001 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
707 } 1002 }
708 1003
709 static void implementsReadonlyStringAttributeAttributeGetter(const v8::FunctionC allbackInfo<v8::Value>& info) 1004 static void implementsReadonlyStringAttributeAttributeGetter(const v8::FunctionC allbackInfo<v8::Value>& info)
710 { 1005 {
1006 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1007 String errorMessage;
1008 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1009 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1010 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1011 return;
1012 }
711 v8::Local<v8::Object> holder = info.Holder(); 1013 v8::Local<v8::Object> holder = info.Holder();
712 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1014 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
713 v8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info .GetIsolate()); 1015 v8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info .GetIsolate());
714 } 1016 }
715 1017
716 static void implementsReadonlyStringAttributeAttributeGetterCallback(const v8::F unctionCallbackInfo<v8::Value>& info) 1018 static void implementsReadonlyStringAttributeAttributeGetterCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
717 { 1019 {
718 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1020 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1021 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1022 String errorMessage;
1023 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1024 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1025 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1026 return;
1027 }
719 TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttr ibuteGetter(info); 1028 TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttr ibuteGetter(info);
720 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1029 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
721 } 1030 }
722 1031
723 static void implementsStringAttributeAttributeGetter(const v8::FunctionCallbackI nfo<v8::Value>& info) 1032 static void implementsStringAttributeAttributeGetter(const v8::FunctionCallbackI nfo<v8::Value>& info)
724 { 1033 {
1034 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1035 String errorMessage;
1036 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1037 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1038 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1039 return;
1040 }
725 v8::Local<v8::Object> holder = info.Holder(); 1041 v8::Local<v8::Object> holder = info.Holder();
726 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1042 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
727 v8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsol ate()); 1043 v8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsol ate());
728 } 1044 }
729 1045
730 static void implementsStringAttributeAttributeGetterCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 1046 static void implementsStringAttributeAttributeGetterCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
731 { 1047 {
732 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1048 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1049 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1050 String errorMessage;
1051 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1052 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1053 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1054 return;
1055 }
733 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet ter(info); 1056 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet ter(info);
734 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1057 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
735 } 1058 }
736 1059
737 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::FunctionCallbackInfo<v8::Value>& info) 1060 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::FunctionCallbackInfo<v8::Value>& info)
738 { 1061 {
739 v8::Local<v8::Object> holder = info.Holder(); 1062 v8::Local<v8::Object> holder = info.Holder();
740 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1063 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
741 V8StringResource<> cppValue = v8Value; 1064 V8StringResource<> cppValue = v8Value;
742 if (!cppValue.prepare()) 1065 if (!cppValue.prepare())
743 return; 1066 return;
744 impl->setImplementsStringAttribute(cppValue); 1067 impl->setImplementsStringAttribute(cppValue);
745 } 1068 }
746 1069
747 static void implementsStringAttributeAttributeSetterCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 1070 static void implementsStringAttributeAttributeSetterCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
748 { 1071 {
749 v8::Local<v8::Value> v8Value = info[0]; 1072 v8::Local<v8::Value> v8Value = info[0];
750 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1073 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
751 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet ter(v8Value, info); 1074 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet ter(v8Value, info);
752 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1075 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
753 } 1076 }
754 1077
755 static void implementsNodeAttributeAttributeGetter(const v8::FunctionCallbackInf o<v8::Value>& info) 1078 static void implementsNodeAttributeAttributeGetter(const v8::FunctionCallbackInf o<v8::Value>& info)
756 { 1079 {
1080 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1081 String errorMessage;
1082 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1083 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1084 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1085 return;
1086 }
757 v8::Local<v8::Object> holder = info.Holder(); 1087 v8::Local<v8::Object> holder = info.Holder();
758 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1088 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
759 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsNodeAttribute()), imp l); 1089 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsNodeAttribute()), imp l);
760 } 1090 }
761 1091
762 static void implementsNodeAttributeAttributeGetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 1092 static void implementsNodeAttributeAttributeGetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
763 { 1093 {
764 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1094 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1095 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1096 String errorMessage;
1097 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1098 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1099 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1100 return;
1101 }
765 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGette r(info); 1102 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGette r(info);
766 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
767 } 1104 }
768 1105
769 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1106 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
770 { 1107 {
771 v8::Local<v8::Object> holder = info.Holder(); 1108 v8::Local<v8::Object> holder = info.Holder();
772 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterface", holder, info.GetIsolate()); 1109 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterface", holder, info.GetIsolate());
773 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1110 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
774 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1111 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
775 if (!cppValue) { 1112 if (!cppValue) {
776 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 1113 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
777 exceptionState.throwIfNeeded(); 1114 exceptionState.throwIfNeeded();
778 return; 1115 return;
779 } 1116 }
780 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue)); 1117 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue));
781 } 1118 }
782 1119
783 static void implementsNodeAttributeAttributeSetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 1120 static void implementsNodeAttributeAttributeSetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
784 { 1121 {
785 v8::Local<v8::Value> v8Value = info[0]; 1122 v8::Local<v8::Value> v8Value = info[0];
786 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1123 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
787 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette r(v8Value, info); 1124 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette r(v8Value, info);
788 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1125 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
789 } 1126 }
790 1127
791 static void implementsEventHandlerAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info) 1128 static void implementsEventHandlerAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info)
792 { 1129 {
1130 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1131 String errorMessage;
1132 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1133 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1134 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1135 return;
1136 }
793 v8::Local<v8::Object> holder = info.Holder(); 1137 v8::Local<v8::Object> holder = info.Holder();
794 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1138 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
795 EventListener* cppValue(impl->implementsEventHandlerAttribute()); 1139 EventListener* cppValue(impl->implementsEventHandlerAttribute());
796 v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListen er::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Local<v8: :Value>(v8::Null(info.GetIsolate()))); 1140 v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListen er::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Local<v8: :Value>(v8::Null(info.GetIsolate())));
797 } 1141 }
798 1142
799 static void implementsEventHandlerAttributeAttributeGetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 1143 static void implementsEventHandlerAttributeAttributeGetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
800 { 1144 {
801 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1145 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1146 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1147 String errorMessage;
1148 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1149 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1150 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1151 return;
1152 }
802 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib uteGetter(info); 1153 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib uteGetter(info);
803 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1154 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
804 } 1155 }
805 1156
806 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1157 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
807 { 1158 {
808 v8::Local<v8::Object> holder = info.Holder(); 1159 v8::Local<v8::Object> holder = info.Holder();
809 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1160 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
810 moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->implementsEve ntHandlerAttribute(), v8Value, V8TestInterface::eventListenerCacheIndex); 1161 moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->implementsEve ntHandlerAttribute(), v8Value, V8TestInterface::eventListenerCacheIndex);
811 impl->setImplementsEventHandlerAttribute(V8EventListenerList::getEventListen er(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate) ); 1162 impl->setImplementsEventHandlerAttribute(V8EventListenerList::getEventListen er(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate) );
812 } 1163 }
813 1164
814 static void implementsEventHandlerAttributeAttributeSetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 1165 static void implementsEventHandlerAttributeAttributeSetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
815 { 1166 {
816 v8::Local<v8::Value> v8Value = info[0]; 1167 v8::Local<v8::Value> v8Value = info[0];
817 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
818 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib uteSetter(v8Value, info); 1169 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib uteSetter(v8Value, info);
819 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
820 } 1171 }
821 1172
822 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Funct ionCallbackInfo<v8::Value>& info) 1173 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Funct ionCallbackInfo<v8::Value>& info)
823 { 1174 {
1175 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1176 String errorMessage;
1177 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1178 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1179 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1180 return;
1181 }
824 v8::Local<v8::Object> holder = info.Holder(); 1182 v8::Local<v8::Object> holder = info.Holder();
825 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1183 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
826 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsRuntimeEnabledNodeAtt ribute()), impl); 1184 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsRuntimeEnabledNodeAtt ribute()), impl);
827 } 1185 }
828 1186
829 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 1187 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
830 { 1188 {
831 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1189 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1190 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1191 String errorMessage;
1192 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1193 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1194 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1195 return;
1196 }
832 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeGetter(info); 1197 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeGetter(info);
833 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1198 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
834 } 1199 }
835 1200
836 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1201 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
837 { 1202 {
838 v8::Local<v8::Object> holder = info.Holder(); 1203 v8::Local<v8::Object> holder = info.Holder();
839 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); 1204 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate());
840 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1205 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
841 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1206 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
842 if (!cppValue) { 1207 if (!cppValue) {
843 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 1208 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
844 exceptionState.throwIfNeeded(); 1209 exceptionState.throwIfNeeded();
845 return; 1210 return;
846 } 1211 }
847 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue)); 1212 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue));
848 } 1213 }
849 1214
850 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 1215 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
851 { 1216 {
852 v8::Local<v8::Value> v8Value = info[0]; 1217 v8::Local<v8::Value> v8Value = info[0];
853 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1218 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
854 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeSetter(v8Value, info); 1219 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeSetter(v8Value, info);
855 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1220 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
856 } 1221 }
857 1222
858 static void implements2StaticStringAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info) 1223 static void implements2StaticStringAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info)
859 { 1224 {
1225 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1226 String errorMessage;
1227 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1228 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1229 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1230 return;
1231 }
860 v8SetReturnValueString(info, TestImplements2::implements2StaticStringAttribu te(), info.GetIsolate()); 1232 v8SetReturnValueString(info, TestImplements2::implements2StaticStringAttribu te(), info.GetIsolate());
861 } 1233 }
862 1234
863 static void implements2StaticStringAttributeAttributeGetterCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 1235 static void implements2StaticStringAttributeAttributeGetterCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
864 { 1236 {
865 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1237 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1238 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1239 String errorMessage;
1240 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1241 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1242 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1243 return;
1244 }
866 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri buteGetter(info); 1245 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri buteGetter(info);
867 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
868 } 1247 }
869 1248
870 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1249 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
871 { 1250 {
872 V8StringResource<> cppValue = v8Value; 1251 V8StringResource<> cppValue = v8Value;
873 if (!cppValue.prepare()) 1252 if (!cppValue.prepare())
874 return; 1253 return;
875 TestImplements2::setImplements2StaticStringAttribute(cppValue); 1254 TestImplements2::setImplements2StaticStringAttribute(cppValue);
876 } 1255 }
877 1256
878 static void implements2StaticStringAttributeAttributeSetterCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 1257 static void implements2StaticStringAttributeAttributeSetterCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
879 { 1258 {
880 v8::Local<v8::Value> v8Value = info[0]; 1259 v8::Local<v8::Value> v8Value = info[0];
881 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1260 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
882 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri buteSetter(v8Value, info); 1261 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri buteSetter(v8Value, info);
883 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1262 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
884 } 1263 }
885 1264
886 static void implements2StringAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) 1265 static void implements2StringAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info)
887 { 1266 {
1267 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1268 String errorMessage;
1269 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1270 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1271 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1272 return;
1273 }
888 v8::Local<v8::Object> holder = info.Holder(); 1274 v8::Local<v8::Object> holder = info.Holder();
889 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1275 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
890 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im pl), info.GetIsolate()); 1276 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im pl), info.GetIsolate());
891 } 1277 }
892 1278
893 static void implements2StringAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 1279 static void implements2StringAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
894 { 1280 {
895 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1281 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1282 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1283 String errorMessage;
1284 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1285 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1286 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1287 return;
1288 }
896 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe tter(info); 1289 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe tter(info);
897 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
898 } 1291 }
899 1292
900 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) 1293 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info)
901 { 1294 {
902 v8::Local<v8::Object> holder = info.Holder(); 1295 v8::Local<v8::Object> holder = info.Holder();
903 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1296 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
904 V8StringResource<> cppValue = v8Value; 1297 V8StringResource<> cppValue = v8Value;
905 if (!cppValue.prepare()) 1298 if (!cppValue.prepare())
906 return; 1299 return;
907 TestImplements2::setImplements2StringAttribute(*impl, cppValue); 1300 TestImplements2::setImplements2StringAttribute(*impl, cppValue);
908 } 1301 }
909 1302
910 static void implements2StringAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 1303 static void implements2StringAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
911 { 1304 {
912 v8::Local<v8::Value> v8Value = info[0]; 1305 v8::Local<v8::Value> v8Value = info[0];
913 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
914 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe tter(v8Value, info); 1307 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe tter(v8Value, info);
915 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
916 } 1309 }
917 1310
918 static void implements3StringAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) 1311 static void implements3StringAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info)
919 { 1312 {
1313 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1314 String errorMessage;
1315 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1316 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1317 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1318 return;
1319 }
920 v8::Local<v8::Object> holder = info.Holder(); 1320 v8::Local<v8::Object> holder = info.Holder();
921 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1321 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
922 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin gAttribute(*impl), info.GetIsolate()); 1322 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin gAttribute(*impl), info.GetIsolate());
923 } 1323 }
924 1324
925 static void implements3StringAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 1325 static void implements3StringAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
926 { 1326 {
927 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1327 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1328 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1329 String errorMessage;
1330 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1331 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1332 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1333 return;
1334 }
928 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe tter(info); 1335 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe tter(info);
929 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1336 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
930 } 1337 }
931 1338
932 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) 1339 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info)
933 { 1340 {
934 v8::Local<v8::Object> holder = info.Holder(); 1341 v8::Local<v8::Object> holder = info.Holder();
935 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1342 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
936 V8StringResource<> cppValue = v8Value; 1343 V8StringResource<> cppValue = v8Value;
937 if (!cppValue.prepare()) 1344 if (!cppValue.prepare())
938 return; 1345 return;
939 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue ); 1346 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue );
940 } 1347 }
941 1348
942 static void implements3StringAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 1349 static void implements3StringAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
943 { 1350 {
944 v8::Local<v8::Value> v8Value = info[0]; 1351 v8::Local<v8::Value> v8Value = info[0];
945 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1352 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
946 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe tter(v8Value, info); 1353 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe tter(v8Value, info);
947 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1354 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
948 } 1355 }
949 1356
950 static void implements3StaticStringAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info) 1357 static void implements3StaticStringAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info)
951 { 1358 {
1359 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1360 String errorMessage;
1361 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1362 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1363 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1364 return;
1365 }
952 v8SetReturnValueString(info, TestImplements3Implementation::implements3Stati cStringAttribute(), info.GetIsolate()); 1366 v8SetReturnValueString(info, TestImplements3Implementation::implements3Stati cStringAttribute(), info.GetIsolate());
953 } 1367 }
954 1368
955 static void implements3StaticStringAttributeAttributeGetterCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 1369 static void implements3StaticStringAttributeAttributeGetterCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
956 { 1370 {
957 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1371 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1372 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1373 String errorMessage;
1374 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1375 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1376 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1377 return;
1378 }
958 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri buteGetter(info); 1379 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri buteGetter(info);
959 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1380 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
960 } 1381 }
961 1382
962 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1383 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
963 { 1384 {
964 V8StringResource<> cppValue = v8Value; 1385 V8StringResource<> cppValue = v8Value;
965 if (!cppValue.prepare()) 1386 if (!cppValue.prepare())
966 return; 1387 return;
967 TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue) ; 1388 TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue) ;
968 } 1389 }
969 1390
970 static void implements3StaticStringAttributeAttributeSetterCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 1391 static void implements3StaticStringAttributeAttributeSetterCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
971 { 1392 {
972 v8::Local<v8::Value> v8Value = info[0]; 1393 v8::Local<v8::Value> v8Value = info[0];
973 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1394 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
974 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri buteSetter(v8Value, info); 1395 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri buteSetter(v8Value, info);
975 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1396 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
976 } 1397 }
977 1398
978 #if ENABLE(PARTIAL_CONDITION) 1399 #if ENABLE(PARTIAL_CONDITION)
979 static void partialLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v 8::Value>& info) 1400 static void partialLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v 8::Value>& info)
980 { 1401 {
1402 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1403 String errorMessage;
1404 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1405 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1406 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1407 return;
1408 }
981 v8::Local<v8::Object> holder = info.Holder(); 1409 v8::Local<v8::Object> holder = info.Holder();
982 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1410 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
983 v8SetReturnValueInt(info, TestPartialInterface::partialLongAttribute(*impl)) ; 1411 v8SetReturnValueInt(info, TestPartialInterface::partialLongAttribute(*impl)) ;
984 } 1412 }
985 #endif // ENABLE(PARTIAL_CONDITION) 1413 #endif // ENABLE(PARTIAL_CONDITION)
986 1414
987 #if ENABLE(PARTIAL_CONDITION) 1415 #if ENABLE(PARTIAL_CONDITION)
988 static void partialLongAttributeAttributeGetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 1416 static void partialLongAttributeAttributeGetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
989 { 1417 {
990 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1418 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1419 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1420 String errorMessage;
1421 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1422 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1423 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1424 return;
1425 }
991 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(i nfo); 1426 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(i nfo);
992 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1427 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
993 } 1428 }
994 #endif // ENABLE(PARTIAL_CONDITION) 1429 #endif // ENABLE(PARTIAL_CONDITION)
995 1430
996 #if ENABLE(PARTIAL_CONDITION) 1431 #if ENABLE(PARTIAL_CONDITION)
997 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info) 1432 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info)
998 { 1433 {
999 v8::Local<v8::Object> holder = info.Holder(); 1434 v8::Local<v8::Object> holder = info.Holder();
1000 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt ribute", "TestInterface", holder, info.GetIsolate()); 1435 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt ribute", "TestInterface", holder, info.GetIsolate());
(...skipping 11 matching lines...) Expand all
1012 v8::Local<v8::Value> v8Value = info[0]; 1447 v8::Local<v8::Value> v8Value = info[0];
1013 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1448 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
1014 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v 8Value, info); 1449 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v 8Value, info);
1015 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1450 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1016 } 1451 }
1017 #endif // ENABLE(PARTIAL_CONDITION) 1452 #endif // ENABLE(PARTIAL_CONDITION)
1018 1453
1019 #if ENABLE(PARTIAL_CONDITION) 1454 #if ENABLE(PARTIAL_CONDITION)
1020 static void partialStaticLongAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) 1455 static void partialStaticLongAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info)
1021 { 1456 {
1457 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1458 String errorMessage;
1459 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1460 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1461 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1462 return;
1463 }
1022 v8SetReturnValueInt(info, TestPartialInterface::partialStaticLongAttribute() ); 1464 v8SetReturnValueInt(info, TestPartialInterface::partialStaticLongAttribute() );
1023 } 1465 }
1024 #endif // ENABLE(PARTIAL_CONDITION) 1466 #endif // ENABLE(PARTIAL_CONDITION)
1025 1467
1026 #if ENABLE(PARTIAL_CONDITION) 1468 #if ENABLE(PARTIAL_CONDITION)
1027 static void partialStaticLongAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 1469 static void partialStaticLongAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
1028 { 1470 {
1029 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1471 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1472 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1473 String errorMessage;
1474 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1475 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1476 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1477 return;
1478 }
1030 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGe tter(info); 1479 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGe tter(info);
1031 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1480 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1032 } 1481 }
1033 #endif // ENABLE(PARTIAL_CONDITION) 1482 #endif // ENABLE(PARTIAL_CONDITION)
1034 1483
1035 #if ENABLE(PARTIAL_CONDITION) 1484 #if ENABLE(PARTIAL_CONDITION)
1036 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) 1485 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info)
1037 { 1486 {
1038 v8::Local<v8::Object> holder = info.Holder(); 1487 v8::Local<v8::Object> holder = info.Holder();
1039 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL ongAttribute", "TestInterface", holder, info.GetIsolate()); 1488 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL ongAttribute", "TestInterface", holder, info.GetIsolate());
(...skipping 10 matching lines...) Expand all
1050 v8::Local<v8::Value> v8Value = info[0]; 1499 v8::Local<v8::Value> v8Value = info[0];
1051 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1500 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
1052 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe tter(v8Value, info); 1501 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe tter(v8Value, info);
1053 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1502 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1054 } 1503 }
1055 #endif // ENABLE(PARTIAL_CONDITION) 1504 #endif // ENABLE(PARTIAL_CONDITION)
1056 1505
1057 #if ENABLE(PARTIAL_CONDITION) 1506 #if ENABLE(PARTIAL_CONDITION)
1058 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::FunctionCallbackInfo<v8::Value>& info) 1507 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::FunctionCallbackInfo<v8::Value>& info)
1059 { 1508 {
1509 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1510 String errorMessage;
1511 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1512 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1513 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1514 return;
1515 }
1060 v8::Local<v8::Object> holder = info.Holder(); 1516 v8::Local<v8::Object> holder = info.Holder();
1061 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1517 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1062 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 1518 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1063 v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionCont extLongAttribute(executionContext, *impl)); 1519 v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionCont extLongAttribute(executionContext, *impl));
1064 } 1520 }
1065 #endif // ENABLE(PARTIAL_CONDITION) 1521 #endif // ENABLE(PARTIAL_CONDITION)
1066 1522
1067 #if ENABLE(PARTIAL_CONDITION) 1523 #if ENABLE(PARTIAL_CONDITION)
1068 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( const v8::FunctionCallbackInfo<v8::Value>& info) 1524 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
1069 { 1525 {
1070 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1526 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1527 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1528 String errorMessage;
1529 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1530 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1531 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1532 return;
1533 }
1071 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeGetter(info); 1534 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeGetter(info);
1072 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1535 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1073 } 1536 }
1074 #endif // ENABLE(PARTIAL_CONDITION) 1537 #endif // ENABLE(PARTIAL_CONDITION)
1075 1538
1076 #if ENABLE(PARTIAL_CONDITION) 1539 #if ENABLE(PARTIAL_CONDITION)
1077 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1540 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
1078 { 1541 {
1079 v8::Local<v8::Object> holder = info.Holder(); 1542 v8::Local<v8::Object> holder = info.Holder();
1080 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); 1543 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate());
(...skipping 12 matching lines...) Expand all
1093 v8::Local<v8::Value> v8Value = info[0]; 1556 v8::Local<v8::Value> v8Value = info[0];
1094 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1557 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
1095 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeSetter(v8Value, info); 1558 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeSetter(v8Value, info);
1096 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1559 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1097 } 1560 }
1098 #endif // ENABLE(PARTIAL_CONDITION) 1561 #endif // ENABLE(PARTIAL_CONDITION)
1099 1562
1100 #if ENABLE(PARTIAL_CONDITION) 1563 #if ENABLE(PARTIAL_CONDITION)
1101 static void partialPartialEnumTypeAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info) 1564 static void partialPartialEnumTypeAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info)
1102 { 1565 {
1566 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1567 String errorMessage;
1568 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1569 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1570 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1571 return;
1572 }
1103 v8::Local<v8::Object> holder = info.Holder(); 1573 v8::Local<v8::Object> holder = info.Holder();
1104 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1574 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1105 v8SetReturnValueString(info, TestPartialInterface::partialPartialEnumTypeAtt ribute(*impl), info.GetIsolate()); 1575 v8SetReturnValueString(info, TestPartialInterface::partialPartialEnumTypeAtt ribute(*impl), info.GetIsolate());
1106 } 1576 }
1107 #endif // ENABLE(PARTIAL_CONDITION) 1577 #endif // ENABLE(PARTIAL_CONDITION)
1108 1578
1109 #if ENABLE(PARTIAL_CONDITION) 1579 #if ENABLE(PARTIAL_CONDITION)
1110 static void partialPartialEnumTypeAttributeAttributeGetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 1580 static void partialPartialEnumTypeAttributeAttributeGetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
1111 { 1581 {
1112 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1582 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1583 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1584 String errorMessage;
1585 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1586 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1587 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1588 return;
1589 }
1113 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib uteGetter(info); 1590 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib uteGetter(info);
1114 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1591 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1115 } 1592 }
1116 #endif // ENABLE(PARTIAL_CONDITION) 1593 #endif // ENABLE(PARTIAL_CONDITION)
1117 1594
1118 #if ENABLE(PARTIAL_CONDITION) 1595 #if ENABLE(PARTIAL_CONDITION)
1119 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1596 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
1120 { 1597 {
1121 v8::Local<v8::Object> holder = info.Holder(); 1598 v8::Local<v8::Object> holder = info.Holder();
1122 ExceptionState exceptionState(ExceptionState::SetterContext, "partialPartial EnumTypeAttribute", "TestInterface", holder, info.GetIsolate()); 1599 ExceptionState exceptionState(ExceptionState::SetterContext, "partialPartial EnumTypeAttribute", "TestInterface", holder, info.GetIsolate());
(...skipping 19 matching lines...) Expand all
1142 v8::Local<v8::Value> v8Value = info[0]; 1619 v8::Local<v8::Value> v8Value = info[0];
1143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1620 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
1144 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib uteSetter(v8Value, info); 1621 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib uteSetter(v8Value, info);
1145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1622 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1146 } 1623 }
1147 #endif // ENABLE(PARTIAL_CONDITION) 1624 #endif // ENABLE(PARTIAL_CONDITION)
1148 1625
1149 #if ENABLE(PARTIAL_CONDITION) 1626 #if ENABLE(PARTIAL_CONDITION)
1150 static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info) 1627 static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info)
1151 { 1628 {
1629 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1630 String errorMessage;
1631 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1632 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1633 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1634 return;
1635 }
1152 v8::Local<v8::Object> holder = info.Holder(); 1636 v8::Local<v8::Object> holder = info.Holder();
1153 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1637 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1154 String result; 1638 String result;
1155 if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toLocalF rame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &resul t)) 1639 if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toLocalF rame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &resul t))
1156 return; 1640 return;
1157 v8SetReturnValueString(info, result, info.GetIsolate()); 1641 v8SetReturnValueString(info, result, info.GetIsolate());
1158 } 1642 }
1159 #endif // ENABLE(PARTIAL_CONDITION) 1643 #endif // ENABLE(PARTIAL_CONDITION)
1160 1644
1161 #if ENABLE(PARTIAL_CONDITION) 1645 #if ENABLE(PARTIAL_CONDITION)
1162 static void stringAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 1646 static void stringAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
1163 { 1647 {
1164 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1648 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1649 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1650 String errorMessage;
1651 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1652 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1653 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1654 return;
1655 }
1165 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); 1656 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info);
1166 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1657 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1167 } 1658 }
1168 #endif // ENABLE(PARTIAL_CONDITION) 1659 #endif // ENABLE(PARTIAL_CONDITION)
1169 1660
1170 #if ENABLE(PARTIAL_CONDITION) 1661 #if ENABLE(PARTIAL_CONDITION)
1171 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info) 1662 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info)
1172 { 1663 {
1173 v8::Local<v8::Object> holder = info.Holder(); 1664 v8::Local<v8::Object> holder = info.Holder();
1174 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1665 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1175 V8StringResource<> cppValue = v8Value; 1666 V8StringResource<> cppValue = v8Value;
1176 if (!cppValue.prepare()) 1667 if (!cppValue.prepare())
1177 return; 1668 return;
1178 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame( toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); 1669 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame( toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue);
1179 } 1670 }
1180 #endif // ENABLE(PARTIAL_CONDITION) 1671 #endif // ENABLE(PARTIAL_CONDITION)
1181 1672
1182 #if ENABLE(PARTIAL_CONDITION) 1673 #if ENABLE(PARTIAL_CONDITION)
1183 static void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 1674 static void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
1184 { 1675 {
1185 v8::Local<v8::Value> v8Value = info[0]; 1676 v8::Local<v8::Value> v8Value = info[0];
1186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1677 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
1187 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu e, info); 1678 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu e, info);
1188 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1679 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1189 } 1680 }
1190 #endif // ENABLE(PARTIAL_CONDITION) 1681 #endif // ENABLE(PARTIAL_CONDITION)
1191 1682
1192 static void partial2LongAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info) 1683 static void partial2LongAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info)
1193 { 1684 {
1685 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1686 String errorMessage;
1687 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1688 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1689 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1690 return;
1691 }
1194 v8::Local<v8::Object> holder = info.Holder(); 1692 v8::Local<v8::Object> holder = info.Holder();
1195 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1693 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1196 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2LongAt tribute(*impl)); 1694 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2LongAt tribute(*impl));
1197 } 1695 }
1198 1696
1199 static void partial2LongAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 1697 static void partial2LongAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
1200 { 1698 {
1201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1699 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1700 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1701 String errorMessage;
1702 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1703 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1704 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1705 return;
1706 }
1202 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter( info); 1707 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter( info);
1203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1708 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1204 } 1709 }
1205 1710
1206 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) 1711 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info)
1207 { 1712 {
1208 v8::Local<v8::Object> holder = info.Holder(); 1713 v8::Local<v8::Object> holder = info.Holder();
1209 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt tribute", "TestInterface", holder, info.GetIsolate()); 1714 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt tribute", "TestInterface", holder, info.GetIsolate());
1210 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1715 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1211 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 1716 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
1212 if (exceptionState.throwIfNeeded()) 1717 if (exceptionState.throwIfNeeded())
1213 return; 1718 return;
1214 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue ); 1719 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue );
1215 } 1720 }
1216 1721
1217 static void partial2LongAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 1722 static void partial2LongAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
1218 { 1723 {
1219 v8::Local<v8::Value> v8Value = info[0]; 1724 v8::Local<v8::Value> v8Value = info[0];
1220 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1725 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
1221 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter( v8Value, info); 1726 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter( v8Value, info);
1222 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1727 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1223 } 1728 }
1224 1729
1225 static void partial2StaticLongAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) 1730 static void partial2StaticLongAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info)
1226 { 1731 {
1732 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1733 String errorMessage;
1734 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1735 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1736 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1737 return;
1738 }
1227 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2Static LongAttribute()); 1739 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2Static LongAttribute());
1228 } 1740 }
1229 1741
1230 static void partial2StaticLongAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 1742 static void partial2StaticLongAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
1231 { 1743 {
1232 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 1744 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
1745 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1746 String errorMessage;
1747 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1748 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1749 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1750 return;
1751 }
1233 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeG etter(info); 1752 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeG etter(info);
1234 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1753 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1235 } 1754 }
1236 1755
1237 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) 1756 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info)
1238 { 1757 {
1239 v8::Local<v8::Object> holder = info.Holder(); 1758 v8::Local<v8::Object> holder = info.Holder();
1240 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static LongAttribute", "TestInterface", holder, info.GetIsolate()); 1759 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static LongAttribute", "TestInterface", holder, info.GetIsolate());
1241 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 1760 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
1242 if (exceptionState.throwIfNeeded()) 1761 if (exceptionState.throwIfNeeded())
(...skipping 23 matching lines...) Expand all
1266 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface", "paramete r 1 is not of type 'TestInterfaceEmpty'.")); 1785 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface", "paramete r 1 is not of type 'TestInterfaceEmpty'."));
1267 return; 1786 return;
1268 } 1787 }
1269 } 1788 }
1270 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 1789 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
1271 } 1790 }
1272 1791
1273 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 1792 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
1274 { 1793 {
1275 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1794 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1795 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1796 String errorMessage;
1797 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1798 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1799 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1800 return;
1801 }
1276 TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod (info); 1802 TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod (info);
1277 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1803 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1278 } 1804 }
1279 1805
1280 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 1806 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
1281 { 1807 {
1282 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleArgFloatArg", "TestInterface", info.Holder(), info.GetIsolate()); 1808 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleArgFloatArg", "TestInterface", info.Holder(), info.GetIsolate());
1283 if (UNLIKELY(info.Length() < 2)) { 1809 if (UNLIKELY(info.Length() < 2)) {
1284 setMinimumArityTypeError(exceptionState, 2, info.Length()); 1810 setMinimumArityTypeError(exceptionState, 2, info.Length());
1285 exceptionState.throwIfNeeded(); 1811 exceptionState.throwIfNeeded();
1286 return; 1812 return;
1287 } 1813 }
1288 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1814 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1289 double doubleArg; 1815 double doubleArg;
1290 float floatArg; 1816 float floatArg;
1291 { 1817 {
1292 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e); 1818 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e);
1293 if (exceptionState.throwIfNeeded()) 1819 if (exceptionState.throwIfNeeded())
1294 return; 1820 return;
1295 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState) ; 1821 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState) ;
1296 if (exceptionState.throwIfNeeded()) 1822 if (exceptionState.throwIfNeeded())
1297 return; 1823 return;
1298 } 1824 }
1299 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); 1825 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg);
1300 } 1826 }
1301 1827
1302 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 1828 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
1303 { 1829 {
1304 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1830 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1831 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1832 String errorMessage;
1833 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1834 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1835 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1836 return;
1837 }
1305 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf o); 1838 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf o);
1306 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1839 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1307 } 1840 }
1308 1841
1309 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info) 1842 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info)
1310 { 1843 {
1311 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface", info.Holder(), info. GetIsolate()); 1844 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface", info.Holder(), info. GetIsolate());
1312 if (UNLIKELY(info.Length() < 2)) { 1845 if (UNLIKELY(info.Length() < 2)) {
1313 setMinimumArityTypeError(exceptionState, 2, info.Length()); 1846 setMinimumArityTypeError(exceptionState, 2, info.Length());
1314 exceptionState.throwIfNeeded(); 1847 exceptionState.throwIfNeeded();
1315 return; 1848 return;
1316 } 1849 }
1317 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1850 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1318 double unrestrictedDoubleArg; 1851 double unrestrictedDoubleArg;
1319 float unrestrictedFloatArg; 1852 float unrestrictedFloatArg;
1320 { 1853 {
1321 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt ate); 1854 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt ate);
1322 if (exceptionState.throwIfNeeded()) 1855 if (exceptionState.throwIfNeeded())
1323 return; 1856 return;
1324 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat e); 1857 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat e);
1325 if (exceptionState.throwIfNeeded()) 1858 if (exceptionState.throwIfNeeded())
1326 return; 1859 return;
1327 } 1860 }
1328 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble Arg, unrestrictedFloatArg); 1861 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble Arg, unrestrictedFloatArg);
1329 } 1862 }
1330 1863
1331 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info) 1864 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info)
1332 { 1865 {
1333 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1866 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1867 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1868 String errorMessage;
1869 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1870 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1871 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1872 return;
1873 }
1334 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest rictedFloatArgMethod(info); 1874 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest rictedFloatArgMethod(info);
1335 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1875 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1336 } 1876 }
1337 1877
1338 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 1878 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
1339 { 1879 {
1340 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estEnumArg", "TestInterface", info.Holder(), info.GetIsolate()); 1880 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estEnumArg", "TestInterface", info.Holder(), info.GetIsolate());
1341 if (UNLIKELY(info.Length() < 1)) { 1881 if (UNLIKELY(info.Length() < 1)) {
1342 setMinimumArityTypeError(exceptionState, 1, info.Length()); 1882 setMinimumArityTypeError(exceptionState, 1, info.Length());
1343 exceptionState.throwIfNeeded(); 1883 exceptionState.throwIfNeeded();
(...skipping 15 matching lines...) Expand all
1359 exceptionState.throwIfNeeded(); 1899 exceptionState.throwIfNeeded();
1360 return; 1900 return;
1361 } 1901 }
1362 } 1902 }
1363 impl->voidMethodTestEnumArg(testEnumArg); 1903 impl->voidMethodTestEnumArg(testEnumArg);
1364 } 1904 }
1365 1905
1366 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 1906 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
1367 { 1907 {
1368 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1908 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1909 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1910 String errorMessage;
1911 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1912 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1913 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1914 return;
1915 }
1369 TestInterfaceImplementationV8Internal::voidMethodTestEnumArgMethod(info); 1916 TestInterfaceImplementationV8Internal::voidMethodTestEnumArgMethod(info);
1370 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1917 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1371 } 1918 }
1372 1919
1373 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 1920 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1374 { 1921 {
1375 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1922 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1376 impl->voidMethod(); 1923 impl->voidMethod();
1377 } 1924 }
1378 1925
1379 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 1926 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
1380 { 1927 {
1381 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1928 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1929 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1930 String errorMessage;
1931 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1932 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1933 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1934 return;
1935 }
1382 TestInterfaceImplementationV8Internal::voidMethodMethod(info); 1936 TestInterfaceImplementationV8Internal::voidMethodMethod(info);
1383 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1937 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1384 } 1938 }
1385 1939
1386 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu e>& info) 1940 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu e>& info)
1387 { 1941 {
1388 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1942 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1389 impl->voidMethod(); 1943 impl->voidMethod();
1390 } 1944 }
1391 1945
1392 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info) 1946 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info)
1393 { 1947 {
1394 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1948 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1949 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1950 String errorMessage;
1951 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1952 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1953 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1954 return;
1955 }
1395 TestInterfaceImplementationV8Internal::voidMethodMethodForMainWorld(info); 1956 TestInterfaceImplementationV8Internal::voidMethodMethodForMainWorld(info);
1396 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1957 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1397 } 1958 }
1398 1959
1399 static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 1960 static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1400 { 1961 {
1401 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1962 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1402 impl->alwaysExposedMethod(); 1963 impl->alwaysExposedMethod();
1403 } 1964 }
1404 1965
1405 static void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 1966 static void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
1406 { 1967 {
1407 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1968 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1969 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1970 String errorMessage;
1971 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1972 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1973 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1974 return;
1975 }
1408 TestInterfaceImplementationV8Internal::alwaysExposedMethodMethod(info); 1976 TestInterfaceImplementationV8Internal::alwaysExposedMethodMethod(info);
1409 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1977 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1410 } 1978 }
1411 1979
1412 static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 1980 static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1413 { 1981 {
1414 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1982 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1415 impl->workerExposedMethod(); 1983 impl->workerExposedMethod();
1416 } 1984 }
1417 1985
1418 static void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 1986 static void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
1419 { 1987 {
1420 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1988 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1989 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1990 String errorMessage;
1991 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
1992 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
1993 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
1994 return;
1995 }
1421 TestInterfaceImplementationV8Internal::workerExposedMethodMethod(info); 1996 TestInterfaceImplementationV8Internal::workerExposedMethodMethod(info);
1422 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1997 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1423 } 1998 }
1424 1999
1425 static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 2000 static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1426 { 2001 {
1427 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2002 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1428 impl->windowExposedMethod(); 2003 impl->windowExposedMethod();
1429 } 2004 }
1430 2005
1431 static void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 2006 static void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
1432 { 2007 {
1433 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2008 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2009 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2010 String errorMessage;
2011 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2012 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2013 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2014 return;
2015 }
1434 TestInterfaceImplementationV8Internal::windowExposedMethodMethod(info); 2016 TestInterfaceImplementationV8Internal::windowExposedMethodMethod(info);
1435 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2017 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1436 } 2018 }
1437 2019
1438 static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 2020 static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
1439 { 2021 {
1440 TestInterfaceImplementation::alwaysExposedStaticMethod(); 2022 TestInterfaceImplementation::alwaysExposedStaticMethod();
1441 } 2023 }
1442 2024
1443 static void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 2025 static void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
1444 { 2026 {
1445 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2027 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2028 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2029 String errorMessage;
2030 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2031 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2032 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2033 return;
2034 }
1446 TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethod(info) ; 2035 TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethod(info) ;
1447 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2036 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1448 } 2037 }
1449 2038
1450 static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 2039 static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
1451 { 2040 {
1452 TestInterfaceImplementation::workerExposedStaticMethod(); 2041 TestInterfaceImplementation::workerExposedStaticMethod();
1453 } 2042 }
1454 2043
1455 static void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 2044 static void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
1456 { 2045 {
1457 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2046 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2047 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2048 String errorMessage;
2049 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2050 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2051 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2052 return;
2053 }
1458 TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethod(info) ; 2054 TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethod(info) ;
1459 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2055 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1460 } 2056 }
1461 2057
1462 static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 2058 static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
1463 { 2059 {
1464 TestInterfaceImplementation::windowExposedStaticMethod(); 2060 TestInterfaceImplementation::windowExposedStaticMethod();
1465 } 2061 }
1466 2062
1467 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 2063 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
1468 { 2064 {
1469 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2065 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2066 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2067 String errorMessage;
2068 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2069 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2070 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2071 return;
2072 }
1470 TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethod(info) ; 2073 TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethod(info) ;
1471 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2074 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1472 } 2075 }
1473 2076
1474 static void staticReturnDOMWrapperMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 2077 static void staticReturnDOMWrapperMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
1475 { 2078 {
1476 v8SetReturnValue(info, TestInterfaceImplementation::staticReturnDOMWrapperMe thod(), info.GetIsolate()->GetCurrentContext()->Global()); 2079 v8SetReturnValue(info, TestInterfaceImplementation::staticReturnDOMWrapperMe thod(), info.GetIsolate()->GetCurrentContext()->Global());
1477 } 2080 }
1478 2081
1479 static void staticReturnDOMWrapperMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 2082 static void staticReturnDOMWrapperMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
1480 { 2083 {
1481 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2084 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2085 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2086 String errorMessage;
2087 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2088 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2089 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2090 return;
2091 }
1482 TestInterfaceImplementationV8Internal::staticReturnDOMWrapperMethodMethod(in fo); 2092 TestInterfaceImplementationV8Internal::staticReturnDOMWrapperMethodMethod(in fo);
1483 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2093 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1484 } 2094 }
1485 2095
1486 static void methodWithExposedAndRuntimeEnabledFlagMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 2096 static void methodWithExposedAndRuntimeEnabledFlagMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
1487 { 2097 {
1488 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2098 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1489 impl->methodWithExposedAndRuntimeEnabledFlag(); 2099 impl->methodWithExposedAndRuntimeEnabledFlag();
1490 } 2100 }
1491 2101
1492 static void methodWithExposedAndRuntimeEnabledFlagMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 2102 static void methodWithExposedAndRuntimeEnabledFlagMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
1493 { 2103 {
1494 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2105 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2106 String errorMessage;
2107 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2108 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2109 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2110 return;
2111 }
1495 TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFla gMethod(info); 2112 TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFla gMethod(info);
1496 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2113 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1497 } 2114 }
1498 2115
1499 static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::Func tionCallbackInfo<v8::Value>& info) 2116 static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::Func tionCallbackInfo<v8::Value>& info)
1500 { 2117 {
1501 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadMet hodWithExposedAndRuntimeEnabledFlag", "TestInterface", info.Holder(), info.GetIs olate()); 2118 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadMet hodWithExposedAndRuntimeEnabledFlag", "TestInterface", info.Holder(), info.GetIs olate());
1502 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2119 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1503 int longArg; 2120 int longArg;
1504 { 2121 {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 2200
1584 static void methodWithExposedHavingRuntimeEnabldFlagMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 2201 static void methodWithExposedHavingRuntimeEnabldFlagMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
1585 { 2202 {
1586 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2203 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1587 impl->methodWithExposedHavingRuntimeEnabldFlag(); 2204 impl->methodWithExposedHavingRuntimeEnabldFlag();
1588 } 2205 }
1589 2206
1590 static void methodWithExposedHavingRuntimeEnabldFlagMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 2207 static void methodWithExposedHavingRuntimeEnabldFlagMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
1591 { 2208 {
1592 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2209 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2210 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2211 String errorMessage;
2212 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2213 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2214 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2215 return;
2216 }
1593 TestInterfaceImplementationV8Internal::methodWithExposedHavingRuntimeEnabldF lagMethod(info); 2217 TestInterfaceImplementationV8Internal::methodWithExposedHavingRuntimeEnabldF lagMethod(info);
1594 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2218 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1595 } 2219 }
1596 2220
1597 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback Info<v8::Value>& info) 2221 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback Info<v8::Value>& info)
1598 { 2222 {
1599 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2223 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1600 impl->windowAndServiceWorkerExposedMethod(); 2224 impl->windowAndServiceWorkerExposedMethod();
1601 } 2225 }
1602 2226
1603 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 2227 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
1604 { 2228 {
1605 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2230 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2231 String errorMessage;
2232 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2233 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2234 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2235 return;
2236 }
1606 TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMe thod(info); 2237 TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMe thod(info);
1607 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2238 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1608 } 2239 }
1609 2240
1610 static void voidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8:: Value>& info) 2241 static void voidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8:: Value>& info)
1611 { 2242 {
1612 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2243 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1613 impl->voidMethodPartialOverload(); 2244 impl->voidMethodPartialOverload();
1614 } 2245 }
1615 2246
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 TestInterfaceEmpty* testInterfaceEmptyArg; 2297 TestInterfaceEmpty* testInterfaceEmptyArg;
1667 { 2298 {
1668 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]); 2299 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]);
1669 } 2300 }
1670 impl->legacyInterfaceTypeCheckingMethod(testInterfaceEmptyArg); 2301 impl->legacyInterfaceTypeCheckingMethod(testInterfaceEmptyArg);
1671 } 2302 }
1672 2303
1673 static void legacyInterfaceTypeCheckingMethodMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 2304 static void legacyInterfaceTypeCheckingMethodMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
1674 { 2305 {
1675 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2307 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2308 String errorMessage;
2309 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2310 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2311 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2312 return;
2313 }
1676 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingMethodMeth od(info); 2314 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingMethodMeth od(info);
1677 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2315 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1678 } 2316 }
1679 2317
1680 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 2318 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
1681 { 2319 {
1682 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2320 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1683 impl->implementsVoidMethod(); 2321 impl->implementsVoidMethod();
1684 } 2322 }
1685 2323
1686 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 2324 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
1687 { 2325 {
1688 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2326 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2327 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2328 String errorMessage;
2329 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2330 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2331 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2332 return;
2333 }
1689 TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info); 2334 TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info);
1690 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2335 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1691 } 2336 }
1692 2337
1693 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 2338 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
1694 { 2339 {
1695 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterface", info.Holder(), info.GetIsolate()); 2340 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterface", info.Holder(), info.GetIsolate());
1696 if (UNLIKELY(info.Length() < 2)) { 2341 if (UNLIKELY(info.Length() < 2)) {
1697 setMinimumArityTypeError(exceptionState, 2, info.Length()); 2342 setMinimumArityTypeError(exceptionState, 2, info.Length());
1698 exceptionState.throwIfNeeded(); 2343 exceptionState.throwIfNeeded();
(...skipping 18 matching lines...) Expand all
1717 if (exceptionState.hadException()) { 2362 if (exceptionState.hadException()) {
1718 exceptionState.throwIfNeeded(); 2363 exceptionState.throwIfNeeded();
1719 return; 2364 return;
1720 } 2365 }
1721 v8SetReturnValue(info, result.release()); 2366 v8SetReturnValue(info, result.release());
1722 } 2367 }
1723 2368
1724 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 2369 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
1725 { 2370 {
1726 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2371 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2372 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2373 String errorMessage;
2374 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2375 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2376 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2377 return;
2378 }
1727 TestInterfaceImplementationV8Internal::implementsComplexMethodMethod(info); 2379 TestInterfaceImplementationV8Internal::implementsComplexMethodMethod(info);
1728 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2380 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1729 } 2381 }
1730 2382
1731 static void implementsCustomVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 2383 static void implementsCustomVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
1732 { 2384 {
1733 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2385 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2386 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2387 String errorMessage;
2388 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2389 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2390 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2391 return;
2392 }
1734 V8TestInterface::implementsCustomVoidMethodMethodCustom(info); 2393 V8TestInterface::implementsCustomVoidMethodMethodCustom(info);
1735 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2394 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1736 } 2395 }
1737 2396
1738 static void implementsStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 2397 static void implementsStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
1739 { 2398 {
1740 TestInterfaceImplementation::implementsStaticVoidMethod(); 2399 TestInterfaceImplementation::implementsStaticVoidMethod();
1741 } 2400 }
1742 2401
1743 static void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 2402 static void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
1744 { 2403 {
1745 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2404 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2405 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2406 String errorMessage;
2407 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2408 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2409 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2410 return;
2411 }
1746 TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethod(info ); 2412 TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethod(info );
1747 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2413 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1748 } 2414 }
1749 2415
1750 static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 2416 static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
1751 { 2417 {
1752 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2418 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1753 TestImplements2::implements2VoidMethod(*impl); 2419 TestImplements2::implements2VoidMethod(*impl);
1754 } 2420 }
1755 2421
1756 static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 2422 static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
1757 { 2423 {
1758 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2424 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2425 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2426 String errorMessage;
2427 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2428 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2429 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2430 return;
2431 }
1759 TestInterfaceImplementationV8Internal::implements2VoidMethodMethod(info); 2432 TestInterfaceImplementationV8Internal::implements2VoidMethodMethod(info);
1760 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2433 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1761 } 2434 }
1762 2435
1763 static void implements3VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 2436 static void implements3VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
1764 { 2437 {
1765 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2438 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1766 TestImplements3Implementation::implements3VoidMethod(*impl); 2439 TestImplements3Implementation::implements3VoidMethod(*impl);
1767 } 2440 }
1768 2441
1769 static void implements3VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 2442 static void implements3VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
1770 { 2443 {
1771 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2444 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2445 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2446 String errorMessage;
2447 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2448 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2449 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2450 return;
2451 }
1772 TestInterfaceImplementationV8Internal::implements3VoidMethodMethod(info); 2452 TestInterfaceImplementationV8Internal::implements3VoidMethodMethod(info);
1773 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2453 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1774 } 2454 }
1775 2455
1776 static void implements3StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 2456 static void implements3StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
1777 { 2457 {
1778 TestImplements3Implementation::implements3StaticVoidMethod(); 2458 TestImplements3Implementation::implements3StaticVoidMethod();
1779 } 2459 }
1780 2460
1781 static void implements3StaticVoidMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 2461 static void implements3StaticVoidMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
1782 { 2462 {
1783 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2463 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2464 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2465 String errorMessage;
2466 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2467 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2468 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2469 return;
2470 }
1784 TestInterfaceImplementationV8Internal::implements3StaticVoidMethodMethod(inf o); 2471 TestInterfaceImplementationV8Internal::implements3StaticVoidMethodMethod(inf o);
1785 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2472 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1786 } 2473 }
1787 2474
1788 #if ENABLE(PARTIAL_CONDITION) 2475 #if ENABLE(PARTIAL_CONDITION)
1789 static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 2476 static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
1790 { 2477 {
1791 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2478 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1792 TestPartialInterface::partialVoidMethod(*impl); 2479 TestPartialInterface::partialVoidMethod(*impl);
1793 } 2480 }
1794 #endif // ENABLE(PARTIAL_CONDITION) 2481 #endif // ENABLE(PARTIAL_CONDITION)
1795 2482
1796 #if ENABLE(PARTIAL_CONDITION) 2483 #if ENABLE(PARTIAL_CONDITION)
1797 static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 2484 static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
1798 { 2485 {
1799 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2486 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2487 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2488 String errorMessage;
2489 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2490 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2491 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2492 return;
2493 }
1800 TestInterfaceImplementationV8Internal::partialVoidMethodMethod(info); 2494 TestInterfaceImplementationV8Internal::partialVoidMethodMethod(info);
1801 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2495 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1802 } 2496 }
1803 #endif // ENABLE(PARTIAL_CONDITION) 2497 #endif // ENABLE(PARTIAL_CONDITION)
1804 2498
1805 #if ENABLE(PARTIAL_CONDITION) 2499 #if ENABLE(PARTIAL_CONDITION)
1806 static void partialStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 2500 static void partialStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
1807 { 2501 {
1808 TestPartialInterface::partialStaticVoidMethod(); 2502 TestPartialInterface::partialStaticVoidMethod();
1809 } 2503 }
1810 #endif // ENABLE(PARTIAL_CONDITION) 2504 #endif // ENABLE(PARTIAL_CONDITION)
1811 2505
1812 #if ENABLE(PARTIAL_CONDITION) 2506 #if ENABLE(PARTIAL_CONDITION)
1813 static void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 2507 static void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
1814 { 2508 {
1815 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2509 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2510 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2511 String errorMessage;
2512 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2513 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2514 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2515 return;
2516 }
1816 TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethod(info); 2517 TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethod(info);
1817 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2518 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1818 } 2519 }
1819 #endif // ENABLE(PARTIAL_CONDITION) 2520 #endif // ENABLE(PARTIAL_CONDITION)
1820 2521
1821 #if ENABLE(PARTIAL_CONDITION) 2522 #if ENABLE(PARTIAL_CONDITION)
1822 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 2523 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
1823 { 2524 {
1824 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate()); 2525 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate());
1825 if (UNLIKELY(info.Length() < 1)) { 2526 if (UNLIKELY(info.Length() < 1)) {
1826 setMinimumArityTypeError(exceptionState, 1, info.Length()); 2527 setMinimumArityTypeError(exceptionState, 1, info.Length());
1827 exceptionState.throwIfNeeded(); 2528 exceptionState.throwIfNeeded();
1828 return; 2529 return;
1829 } 2530 }
1830 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2531 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1831 int longArg; 2532 int longArg;
1832 { 2533 {
1833 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 2534 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState);
1834 if (exceptionState.throwIfNeeded()) 2535 if (exceptionState.throwIfNeeded())
1835 return; 2536 return;
1836 } 2537 }
1837 TestPartialInterface::partialVoidMethodLongArg(*impl, longArg); 2538 TestPartialInterface::partialVoidMethodLongArg(*impl, longArg);
1838 } 2539 }
1839 #endif // ENABLE(PARTIAL_CONDITION) 2540 #endif // ENABLE(PARTIAL_CONDITION)
1840 2541
1841 #if ENABLE(PARTIAL_CONDITION) 2542 #if ENABLE(PARTIAL_CONDITION)
1842 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 2543 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
1843 { 2544 {
1844 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2545 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2546 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2547 String errorMessage;
2548 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2549 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2550 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2551 return;
2552 }
1845 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info); 2553 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info);
1846 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2554 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1847 } 2555 }
1848 #endif // ENABLE(PARTIAL_CONDITION) 2556 #endif // ENABLE(PARTIAL_CONDITION)
1849 2557
1850 #if ENABLE(PARTIAL_CONDITION) 2558 #if ENABLE(PARTIAL_CONDITION)
1851 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 2559 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1852 { 2560 {
1853 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); 2561 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
1854 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2562 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1855 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 2563 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1856 TestPartialInterface::partialCallWithExecutionContextRaisesExceptionVoidMeth od(executionContext, *impl, exceptionState); 2564 TestPartialInterface::partialCallWithExecutionContextRaisesExceptionVoidMeth od(executionContext, *impl, exceptionState);
1857 if (exceptionState.hadException()) { 2565 if (exceptionState.hadException()) {
1858 exceptionState.throwIfNeeded(); 2566 exceptionState.throwIfNeeded();
1859 return; 2567 return;
1860 } 2568 }
1861 } 2569 }
1862 #endif // ENABLE(PARTIAL_CONDITION) 2570 #endif // ENABLE(PARTIAL_CONDITION)
1863 2571
1864 #if ENABLE(PARTIAL_CONDITION) 2572 #if ENABLE(PARTIAL_CONDITION)
1865 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 2573 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
1866 { 2574 {
1867 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2575 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2576 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2577 String errorMessage;
2578 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2579 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2580 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2581 return;
2582 }
1868 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaises ExceptionVoidMethodMethod(info); 2583 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaises ExceptionVoidMethodMethod(info);
1869 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2584 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1870 } 2585 }
1871 #endif // ENABLE(PARTIAL_CONDITION) 2586 #endif // ENABLE(PARTIAL_CONDITION)
1872 2587
1873 #if ENABLE(PARTIAL_CONDITION) 2588 #if ENABLE(PARTIAL_CONDITION)
1874 static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall backInfo<v8::Value>& info) 2589 static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
1875 { 2590 {
1876 if (UNLIKELY(info.Length() < 1)) { 2591 if (UNLIKELY(info.Length() < 1)) {
1877 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "partialVoidMethodPartialCallbackTypeArg", "TestInterface", 1, info.Length()), info.GetIsolate()); 2592 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "partialVoidMethodPartialCallbackTypeArg", "TestInterface", 1, info.Length()), info.GetIsolate());
1878 return; 2593 return;
1879 } 2594 }
1880 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2595 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1881 ScriptValue partialCallbackTypeArg; 2596 ScriptValue partialCallbackTypeArg;
1882 { 2597 {
1883 if (!info[0]->IsFunction()) { 2598 if (!info[0]->IsFunction()) {
1884 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("partialVoidMethodPartialCallbackTypeArg", "TestInterface", " The callback provided as parameter 1 is not a function.")); 2599 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("partialVoidMethodPartialCallbackTypeArg", "TestInterface", " The callback provided as parameter 1 is not a function."));
1885 return; 2600 return;
1886 } 2601 }
1887 partialCallbackTypeArg = ScriptValue(ScriptState::current(info.GetIsolat e()), info[0]); 2602 partialCallbackTypeArg = ScriptValue(ScriptState::current(info.GetIsolat e()), info[0]);
1888 } 2603 }
1889 TestPartialInterface::partialVoidMethodPartialCallbackTypeArg(*impl, partial CallbackTypeArg); 2604 TestPartialInterface::partialVoidMethodPartialCallbackTypeArg(*impl, partial CallbackTypeArg);
1890 } 2605 }
1891 #endif // ENABLE(PARTIAL_CONDITION) 2606 #endif // ENABLE(PARTIAL_CONDITION)
1892 2607
1893 #if ENABLE(PARTIAL_CONDITION) 2608 #if ENABLE(PARTIAL_CONDITION)
1894 static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 2609 static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
1895 { 2610 {
1896 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2611 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2612 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2613 String errorMessage;
2614 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2615 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2616 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2617 return;
2618 }
1897 TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeA rgMethod(info); 2619 TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeA rgMethod(info);
1898 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2620 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1899 } 2621 }
1900 #endif // ENABLE(PARTIAL_CONDITION) 2622 #endif // ENABLE(PARTIAL_CONDITION)
1901 2623
1902 #if ENABLE(PARTIAL_CONDITION) 2624 #if ENABLE(PARTIAL_CONDITION)
1903 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v 8::FunctionCallbackInfo<v8::Value>& info) 2625 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v 8::FunctionCallbackInfo<v8::Value>& info)
1904 { 2626 {
1905 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestInterface", info.Holder(), in fo.GetIsolate()); 2627 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestInterface", info.Holder(), in fo.GetIsolate());
1906 if (UNLIKELY(info.Length() < 1)) { 2628 if (UNLIKELY(info.Length() < 1)) {
(...skipping 12 matching lines...) Expand all
1919 if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplemented InPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCu rrentContext())), impl, value, &result)) 2641 if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplemented InPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCu rrentContext())), impl, value, &result))
1920 return; 2642 return;
1921 v8SetReturnValueInt(info, result); 2643 v8SetReturnValueInt(info, result);
1922 } 2644 }
1923 #endif // ENABLE(PARTIAL_CONDITION) 2645 #endif // ENABLE(PARTIAL_CONDITION)
1924 2646
1925 #if ENABLE(PARTIAL_CONDITION) 2647 #if ENABLE(PARTIAL_CONDITION)
1926 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info) 2648 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info)
1927 { 2649 {
1928 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2650 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2651 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2652 String errorMessage;
2653 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2654 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2655 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2656 return;
2657 }
1929 TestInterfaceImplementationV8Internal::shortMethodWithShortArgumentImplement edInPrivateScriptMethod(info); 2658 TestInterfaceImplementationV8Internal::shortMethodWithShortArgumentImplement edInPrivateScriptMethod(info);
1930 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2659 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1931 } 2660 }
1932 #endif // ENABLE(PARTIAL_CONDITION) 2661 #endif // ENABLE(PARTIAL_CONDITION)
1933 2662
1934 static void partial2VoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 2663 static void partial2VoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
1935 { 2664 {
1936 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2665 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1937 TestPartialInterfaceImplementation::partial2VoidMethod(*impl); 2666 TestPartialInterfaceImplementation::partial2VoidMethod(*impl);
1938 } 2667 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 if (exceptionState.hadException()) { 2836 if (exceptionState.hadException()) {
2108 exceptionState.throwIfNeeded(); 2837 exceptionState.throwIfNeeded();
2109 return; 2838 return;
2110 } 2839 }
2111 v8SetReturnValue(info, result.v8Value()); 2840 v8SetReturnValue(info, result.v8Value());
2112 } 2841 }
2113 2842
2114 static void toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 2843 static void toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
2115 { 2844 {
2116 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2845 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2846 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2847 String errorMessage;
2848 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2849 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2850 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2851 return;
2852 }
2117 TestInterfaceImplementationV8Internal::toJSONMethod(info); 2853 TestInterfaceImplementationV8Internal::toJSONMethod(info);
2118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2854 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
2119 } 2855 }
2120 2856
2121 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 2857 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2122 { 2858 {
2123 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2859 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2124 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); 2860 v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
2125 } 2861 }
2126 2862
2127 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 2863 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
2128 { 2864 {
2129 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2865 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2866 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2867 String errorMessage;
2868 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2869 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2870 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2871 return;
2872 }
2130 TestInterfaceImplementationV8Internal::toStringMethod(info); 2873 TestInterfaceImplementationV8Internal::toStringMethod(info);
2131 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2874 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
2132 } 2875 }
2133 2876
2134 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 2877 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2135 { 2878 {
2136 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface", info.Holder(), info.GetIsolate()); 2879 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface", info.Holder(), info.GetIsolate());
2137 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2880 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2138 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 2881 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
2139 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState); 2882 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState);
2140 if (exceptionState.hadException()) { 2883 if (exceptionState.hadException()) {
2141 exceptionState.throwIfNeeded(); 2884 exceptionState.throwIfNeeded();
2142 return; 2885 return;
2143 } 2886 }
2144 v8SetReturnValue(info, result.release()); 2887 v8SetReturnValue(info, result.release());
2145 } 2888 }
2146 2889
2147 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 2890 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
2148 { 2891 {
2149 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 2892 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
2893 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2894 String errorMessage;
2895 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
2896 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
2897 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
2898 return;
2899 }
2150 TestInterfaceImplementationV8Internal::iteratorMethod(info); 2900 TestInterfaceImplementationV8Internal::iteratorMethod(info);
2151 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 2901 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
2152 } 2902 }
2153 2903
2154 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info) 2904 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info)
2155 { 2905 {
2156 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2906 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2157 String result = impl->anonymousIndexedGetter(index); 2907 String result = impl->anonymousIndexedGetter(index);
2158 if (result.isNull()) 2908 if (result.isNull())
2159 return; 2909 return;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 {"partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::partial2 StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnInterface}, 3132 {"partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::partial2 StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnInterface},
2383 {"toJSON", TestInterfaceImplementationV8Internal::toJSONMethodCallback, 0, 0 , static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedT oAllScripts, V8DOMConfiguration::OnPrototype}, 3133 {"toJSON", TestInterfaceImplementationV8Internal::toJSONMethodCallback, 0, 0 , static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedT oAllScripts, V8DOMConfiguration::OnPrototype},
2384 {"toString", TestInterfaceImplementationV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::Expo sedToAllScripts, V8DOMConfiguration::OnPrototype}, 3134 {"toString", TestInterfaceImplementationV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::Expo sedToAllScripts, V8DOMConfiguration::OnPrototype},
2385 }; 3135 };
2386 3136
2387 void V8TestInterface::installV8TestInterfaceTemplate(v8::Local<v8::FunctionTempl ate> functionTemplate, v8::Isolate* isolate) 3137 void V8TestInterface::installV8TestInterfaceTemplate(v8::Local<v8::FunctionTempl ate> functionTemplate, v8::Isolate* isolate)
2388 { 3138 {
2389 functionTemplate->ReadOnlyPrototype(); 3139 functionTemplate->ReadOnlyPrototype();
2390 3140
2391 v8::Local<v8::Signature> defaultSignature; 3141 v8::Local<v8::Signature> defaultSignature;
2392 if (!RuntimeEnabledFeatures::featureNameEnabled()) 3142 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V8Tes tInterface::internalFieldCount,
2393 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V 8TestInterface::internalFieldCount, 0, 0, 0, 0, 0, 0); 3143 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttributes),
2394 else 3144 V8TestInterfaceAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceAccessors),
2395 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V 8TestInterface::internalFieldCount, 3145 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
2396 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute s),
2397 V8TestInterfaceAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceAccessors) ,
2398 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
2399 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 3146 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
2400 ALLOW_UNUSED_LOCAL(instanceTemplate); 3147 ALLOW_UNUSED_LOCAL(instanceTemplate);
2401 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 3148 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
2402 ALLOW_UNUSED_LOCAL(prototypeTemplate); 3149 ALLOW_UNUSED_LOCAL(prototypeTemplate);
2403 ExecutionContext* context = currentExecutionContext(isolate); 3150 ExecutionContext* context = currentExecutionContext(isolate);
2404 ALLOW_UNUSED_LOCAL(context); 3151 ALLOW_UNUSED_LOCAL(context);
2405 if (RuntimeEnabledFeatures::featureNameEnabled()) { 3152 if (RuntimeEnabledFeatures::featureNameEnabled()) {
2406 const V8DOMConfiguration::AccessorConfiguration accessorconditionalReadO nlyLongAttributeConfiguration = \ 3153 const V8DOMConfiguration::AccessorConfiguration accessorconditionalReadO nlyLongAttributeConfiguration = \
2407 {"conditionalReadOnlyLongAttribute", TestInterfaceImplementationV8Intern al::conditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEF AULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedT oAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; 3154 {"conditionalReadOnlyLongAttribute", TestInterfaceImplementationV8Intern al::conditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEF AULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedT oAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
2408 V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototype Template, functionTemplate, defaultSignature, accessorconditionalReadOnlyLongAtt ributeConfiguration); 3155 V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototype Template, functionTemplate, defaultSignature, accessorconditionalReadOnlyLongAtt ributeConfiguration);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
2647 return false; 3394 return false;
2648 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 3395 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
2649 if (!scriptState->contextIsValid()) 3396 if (!scriptState->contextIsValid())
2650 return false; 3397 return false;
2651 3398
2652 ScriptState::Scope scope(scriptState); 3399 ScriptState::Scope scope(scriptState);
2653 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 3400 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
2654 if (holder.IsEmpty()) 3401 if (holder.IsEmpty())
2655 return false; 3402 return false;
2656 3403
3404 ExecutionContext* executionContext = currentExecutionContext(scriptState->is olate());
3405 String errorMessage;
3406 if (!ExperimentalFeatures::featureNameEnabled(executionContext, errorMessage )) {
3407 v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
3408 toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create( JSMessageSource, ErrorMessageLevel, errorMessage));
3409 return;
3410 }
3411
2657 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate()); 3412 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate());
2658 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(sc riptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttrib ute", holder); 3413 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(sc riptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttrib ute", holder);
2659 if (v8Value.IsEmpty()) 3414 if (v8Value.IsEmpty())
2660 return false; 3415 return false;
2661 V8StringResource<> cppValue = v8Value; 3416 V8StringResource<> cppValue = v8Value;
2662 if (!cppValue.prepare()) 3417 if (!cppValue.prepare())
2663 return false; 3418 return false;
2664 RELEASE_ASSERT(!exceptionState.hadException()); 3419 RELEASE_ASSERT(!exceptionState.hadException());
2665 *result = cppValue; 3420 *result = cppValue;
2666 return true; 3421 return true;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
2722 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method; 3477 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method;
2723 } 3478 }
2724 3479
2725 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 3480 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2726 { 3481 {
2727 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method; 3482 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method;
2728 } 3483 }
2729 3484
2730 } // namespace blink 3485 } // namespace blink
2731 #endif // ENABLE(CONDITION) 3486 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698