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

Side by Side Diff: Source/bindings/scripts/code_generator_v8.pm

Issue 34273002: Remove UnusedParam.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years 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 | « no previous file | Source/bindings/scripts/unstable/v8_interface.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org>
5 # Copyright (C) 2006 Apple Computer, Inc. 5 # Copyright (C) 2006 Apple Computer, Inc.
6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc.
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved.
9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 # Copyright (C) 2012 Ericsson AB. All rights reserved. 10 # Copyright (C) 2012 Ericsson AB. All rights reserved.
(...skipping 4483 matching lines...) Expand 10 before | Expand all | Expand 10 after
4494 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, \"\", $parentClassTemplate, ${v8ClassName}::internalFieldCount, 0, 0, 0 , 0, 0, 0, isolate, currentWorldType); 4494 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, \"\", $parentClassTemplate, ${v8ClassName}::internalFieldCount, 0, 0, 0 , 0, 0, 0, isolate, currentWorldType);
4495 else 4495 else
4496 END 4496 END
4497 } 4497 }
4498 $code .= $runtimeEnabledIndent . " defaultSignature = V8DOMConfiguration: :installDOMClassTemplate(functionTemplate, \"${interfaceName}\", $parentClassTem plate, ${v8ClassName}::internalFieldCount,\n"; 4498 $code .= $runtimeEnabledIndent . " defaultSignature = V8DOMConfiguration: :installDOMClassTemplate(functionTemplate, \"${interfaceName}\", $parentClassTem plate, ${v8ClassName}::internalFieldCount,\n";
4499 $code .= $runtimeEnabledIndent . " " . ($hasAttributes ? "${v8ClassNa me}Attributes, WTF_ARRAY_LENGTH(${v8ClassName}Attributes),\n" : "0, 0,\n"); 4499 $code .= $runtimeEnabledIndent . " " . ($hasAttributes ? "${v8ClassNa me}Attributes, WTF_ARRAY_LENGTH(${v8ClassName}Attributes),\n" : "0, 0,\n");
4500 $code .= $runtimeEnabledIndent . " " . ($hasAccessors ? "${v8ClassNam e}Accessors, WTF_ARRAY_LENGTH(${v8ClassName}Accessors),\n" : "0, 0,\n"); 4500 $code .= $runtimeEnabledIndent . " " . ($hasAccessors ? "${v8ClassNam e}Accessors, WTF_ARRAY_LENGTH(${v8ClassName}Accessors),\n" : "0, 0,\n");
4501 $code .= $runtimeEnabledIndent . " " . ($hasFunctions ? "${v8ClassNam e}Methods, WTF_ARRAY_LENGTH(${v8ClassName}Methods),\n" : "0, 0,\n"); 4501 $code .= $runtimeEnabledIndent . " " . ($hasFunctions ? "${v8ClassNam e}Methods, WTF_ARRAY_LENGTH(${v8ClassName}Methods),\n" : "0, 0,\n");
4502 $code .= $runtimeEnabledIndent . " isolate, currentWorldType);\n"; 4502 $code .= $runtimeEnabledIndent . " isolate, currentWorldType);\n";
4503 4503
4504 AddToImplIncludes("wtf/UnusedParam.h");
4505 $code .= " UNUSED_PARAM(defaultSignature);\n";
4506
4507 if (IsConstructable($interface)) { 4504 if (IsConstructable($interface)) {
4508 $code .= " functionTemplate->SetCallHandler(${v8ClassName}::construct orCallback);\n"; 4505 $code .= " functionTemplate->SetCallHandler(${v8ClassName}::construct orCallback);\n";
4509 my $interfaceLength = GetInterfaceLength($interface); 4506 my $interfaceLength = GetInterfaceLength($interface);
4510 $code .= " functionTemplate->SetLength(${interfaceLength});\n"; 4507 $code .= " functionTemplate->SetLength(${interfaceLength});\n";
4511 } 4508 }
4512 4509
4513 $code .= <<END; 4510 $code .= <<END;
4514 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 4511 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla te->InstanceTemplate();
4515 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 4512 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl ate->PrototypeTemplate();
4516 UNUSED_PARAM(instanceTemplate);
4517 UNUSED_PARAM(prototypeTemplate);
4518 END 4513 END
4519 4514
4520 if ($accessCheck) { 4515 if ($accessCheck) {
4521 $code .= " $accessCheck\n"; 4516 $code .= " $accessCheck\n";
4522 } 4517 }
4523 4518
4524 # Define runtime enabled attributes. 4519 # Define runtime enabled attributes.
4525 foreach my $runtimeEnabledAttribute (@runtimeEnabledAttributes) { 4520 foreach my $runtimeEnabledAttribute (@runtimeEnabledAttributes) {
4526 my $runtimeEnabledFunction = GetRuntimeEnabledFunctionName($runtimeEnabl edAttribute); 4521 my $runtimeEnabledFunction = GetRuntimeEnabledFunctionName($runtimeEnabl edAttribute);
4527 my $conditionalString = GenerateConditionalString($runtimeEnabledAttribu te); 4522 my $conditionalString = GenerateConditionalString($runtimeEnabledAttribu te);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
4686 4681
4687 END 4682 END
4688 $implementation{nameSpaceWebCore}->add($code); 4683 $implementation{nameSpaceWebCore}->add($code);
4689 } 4684 }
4690 4685
4691 if (@perContextEnabledFunctions) { 4686 if (@perContextEnabledFunctions) {
4692 my $code = ""; 4687 my $code = "";
4693 $code .= <<END; 4688 $code .= <<END;
4694 void ${v8ClassName}::installPerContextEnabledMethods(v8::Handle<v8::Object> prot otypeTemplate, v8::Isolate* isolate) 4689 void ${v8ClassName}::installPerContextEnabledMethods(v8::Handle<v8::Object> prot otypeTemplate, v8::Isolate* isolate)
4695 { 4690 {
4696 UNUSED_PARAM(prototypeTemplate);
4697 END 4691 END
4698 # Define per-context enabled operations. 4692 # Define per-context enabled operations.
4699 $code .= <<END; 4693 $code .= <<END;
4700 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate, worldType(isolate))); 4694 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate, worldType(isolate)));
4701 UNUSED_PARAM(defaultSignature);
4702 4695
4703 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo ntext()); 4696 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo ntext());
4704 END 4697 END
4705 4698
4706 foreach my $perContextEnabledFunction (@perContextEnabledFunctions) { 4699 foreach my $perContextEnabledFunction (@perContextEnabledFunctions) {
4707 my $contextEnabledFunction = GetContextEnabledFunctionName($perConte xtEnabledFunction); 4700 my $contextEnabledFunction = GetContextEnabledFunctionName($perConte xtEnabledFunction);
4708 my $functionLength = GetFunctionLength($perContextEnabledFunction); 4701 my $functionLength = GetFunctionLength($perContextEnabledFunction);
4709 my $conditionalString = GenerateConditionalString($perContextEnabled Function); 4702 my $conditionalString = GenerateConditionalString($perContextEnabled Function);
4710 $code .= "\n#if ${conditionalString}\n" if $conditionalString; 4703 $code .= "\n#if ${conditionalString}\n" if $conditionalString;
4711 $code .= " if (context && context->isDocument() && ${contextEnabl edFunction}(toDocument(context)))\n"; 4704 $code .= " if (context && context->isDocument() && ${contextEnabl edFunction}(toDocument(context)))\n";
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
6347 6340
6348 return 1 if ExtendedAttributeContains($interface->extendedAttributes->{"Cust om"}, "ToV8"); 6341 return 1 if ExtendedAttributeContains($interface->extendedAttributes->{"Cust om"}, "ToV8");
6349 return 1 if ExtendedAttributeContains($interface->extendedAttributes->{"Cust om"}, "Wrap"); 6342 return 1 if ExtendedAttributeContains($interface->extendedAttributes->{"Cust om"}, "Wrap");
6350 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; 6343 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"};
6351 return 1 if InheritsInterface($interface, "Document"); 6344 return 1 if InheritsInterface($interface, "Document");
6352 6345
6353 return 0; 6346 return 0;
6354 } 6347 }
6355 6348
6356 1; 6349 1;
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/unstable/v8_interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698