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

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

Issue 1107523002: IDL: Drop [PerContextEnabled] extended attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 5 years, 8 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
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterfacePartial.h" 9 #include "V8TestInterfacePartial.h"
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 290 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
291 { 291 {
292 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 292 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
293 TestInterfaceImplementationPartialV8Internal::unscopeableVoidMethodMethod(in fo); 293 TestInterfaceImplementationPartialV8Internal::unscopeableVoidMethodMethod(in fo);
294 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 294 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
295 } 295 }
296 296
297 } // namespace TestInterfaceImplementationPartialV8Internal 297 } // namespace TestInterfaceImplementationPartialV8Internal
298 298
299 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
300 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8 Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, V8DOMConfigur ation::ExposedToAllScripts},
301 {"unscopeableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsc opeableVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
302 };
303
299 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Local<v8::Functi onTemplate> functionTemplate, v8::Isolate* isolate) 304 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Local<v8::Functi onTemplate> functionTemplate, v8::Isolate* isolate)
300 { 305 {
301 V8TestInterface::installV8TestInterfaceTemplate(functionTemplate, isolate); 306 V8TestInterface::installV8TestInterfaceTemplate(functionTemplate, isolate);
302 307
303 v8::Local<v8::Signature> defaultSignature; 308 v8::Local<v8::Signature> defaultSignature;
304 if (!RuntimeEnabledFeatures::featureNameEnabled()) 309 if (!RuntimeEnabledFeatures::featureNameEnabled())
305 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "", v8::Local<v8::FunctionTemplate>(), V8TestInterface::intern alFieldCount, 0, 0, 0, 0, 0, 0); 310 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "", v8::Local<v8::FunctionTemplate>(), V8TestInterface::intern alFieldCount, 0, 0, 0, 0, 0, 0);
306 else 311 else
307 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface", v8::Local<v8::FunctionTemplate>(), V8TestInte rface::internalFieldCount, 312 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface", v8::Local<v8::FunctionTemplate>(), V8TestInte rface::internalFieldCount,
308 0, 0, 313 0, 0,
309 0, 0, 314 0, 0,
310 0, 0); 315 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
311 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 316 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
312 ALLOW_UNUSED_LOCAL(instanceTemplate); 317 ALLOW_UNUSED_LOCAL(instanceTemplate);
313 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 318 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
314 ALLOW_UNUSED_LOCAL(prototypeTemplate); 319 ALLOW_UNUSED_LOCAL(prototypeTemplate);
315 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = { 320 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = {
316 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort}, 321 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort},
317 }; 322 };
318 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); 323 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
319 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce::legacyCallCustom); 324 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce::legacyCallCustom);
320 } 325 }
321 326
322 void V8TestInterfacePartial::preparePrototypeObject(v8::Isolate* isolate, v8::Lo cal<v8::Object> prototypeObject) 327 void V8TestInterfacePartial::preparePrototypeObject(v8::Isolate* isolate, v8::Lo cal<v8::Object> prototypeObject)
323 { 328 {
324 V8TestInterface::preparePrototypeObject(isolate, prototypeObject); 329 V8TestInterface::preparePrototypeObject(isolate, prototypeObject);
325 v8::Local<v8::Context> v8Context(prototypeObject->CreationContext()); 330 v8::Local<v8::Context> v8Context(prototypeObject->CreationContext());
326 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); 331 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate));
327 v8::Local<v8::Object> unscopeables; 332 v8::Local<v8::Object> unscopeables;
328 if (v8CallBoolean(prototypeObject->HasOwnProperty(v8Context, unscopablesSymb ol))) 333 if (v8CallBoolean(prototypeObject->HasOwnProperty(v8Context, unscopablesSymb ol)))
329 unscopeables = prototypeObject->Get(v8Context, unscopablesSymbol).ToLoca lChecked().As<v8::Object>(); 334 unscopeables = prototypeObject->Get(v8Context, unscopablesSymbol).ToLoca lChecked().As<v8::Object>();
330 else 335 else
331 unscopeables = v8::Object::New(isolate); 336 unscopeables = v8::Object::New(isolate);
332 unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableVoidMe thod"), v8::True(isolate)).FromJust(); 337 unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableVoidMe thod"), v8::True(isolate)).FromJust();
333 prototypeObject->ForceSet(v8Context, unscopablesSymbol, unscopeables).FromJu st(); 338 prototypeObject->ForceSet(v8Context, unscopablesSymbol, unscopeables).FromJu st();
334 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
335 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
336 ASSERT(context);
337 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) {
338 prototypeObject->Set(v8AtomicString(isolate, "partialVoidTestEnumModules ArgMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationParti alV8Internal::partialVoidTestEnumModulesArgMethodMethodCallback, v8Undefined(), defaultSignature, 1)->GetFunction(isolate->GetCurrentContext()).ToLocalChecked() );
339 }
340 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) {
341 prototypeObject->Set(v8AtomicString(isolate, "unscopeableVoidMethod"), v 8::FunctionTemplate::New(isolate, TestInterfaceImplementationPartialV8Internal:: unscopeableVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFun ction(isolate->GetCurrentContext()).ToLocalChecked());
342 }
343 } 339 }
344 340
345 bool V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPr ivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result) 341 bool V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPr ivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result)
346 { 342 {
347 if (!frame) 343 if (!frame)
348 return false; 344 return false;
349 v8::HandleScope handleScope(toIsolate(frame)); 345 v8::HandleScope handleScope(toIsolate(frame));
350 ScriptForbiddenScope::AllowUserAgentScript script; 346 ScriptForbiddenScope::AllowUserAgentScript script;
351 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe rWorld::privateScriptIsolatedWorld()); 347 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe rWorld::privateScriptIsolatedWorld());
352 if (contextInPrivateScript.IsEmpty()) 348 if (contextInPrivateScript.IsEmpty())
(...skipping 29 matching lines...) Expand all
382 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface( &TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); 378 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface( &TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod);
383 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver loadMethod); 379 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver loadMethod);
384 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe thod); 380 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe thod);
385 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti alOverloadMethod); 381 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti alOverloadMethod);
386 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); 382 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn terfaceImplementationPartialV8Internal::partial2VoidMethodMethod);
387 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(& TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); 383 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(& TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod);
388 } 384 }
389 385
390 } // namespace blink 386 } // namespace blink
391 #endif // ENABLE(CONDITION) 387 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698