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

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

Issue 109943003: IDL compiler: [ConstructorCallWith] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add FIXME 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 | Annotate | Revision Log
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 2737 matching lines...) Expand 10 before | Expand all | Expand 10 after
2748 if ($raisesExceptions) { 2748 if ($raisesExceptions) {
2749 AddToImplIncludes("bindings/v8/ExceptionState.h"); 2749 AddToImplIncludes("bindings/v8/ExceptionState.h");
2750 $code .= " ExceptionState exceptionState(info.Holder(), info.GetIsola te());\n"; 2750 $code .= " ExceptionState exceptionState(info.Holder(), info.GetIsola te());\n";
2751 } 2751 }
2752 2752
2753 # FIXME: Currently [Constructor(...)] does not yet support optional argument s without [Default=...] 2753 # FIXME: Currently [Constructor(...)] does not yet support optional argument s without [Default=...]
2754 my ($parameterCheckString, $paramIndex, %replacements) = GenerateParametersC heck($function, $interface, ""); 2754 my ($parameterCheckString, $paramIndex, %replacements) = GenerateParametersC heck($function, $interface, "");
2755 $code .= $parameterCheckString; 2755 $code .= $parameterCheckString;
2756 2756
2757 if ($interface->extendedAttributes->{"ConstructorCallWith"}) { 2757 if ($interface->extendedAttributes->{"ConstructorCallWith"}) {
2758 if ($interface->extendedAttributes->{"ConstructorCallWith"} eq "Executio nContext") { 2758 if (ExtendedAttributeContains($interface->extendedAttributes->{"Construc torCallWith"}, "ExecutionContext")) {
2759 push(@beforeArgumentList, "context"); 2759 push(@beforeArgumentList, "context");
2760 $code .= " ExecutionContext* context = getExecutionContext();\n"; 2760 $code .= " ExecutionContext* context = getExecutionContext();\n";
2761 } elsif ($interface->extendedAttributes->{"ConstructorCallWith"} eq "Doc ument") { 2761 }
2762 if (ExtendedAttributeContains($interface->extendedAttributes->{"Construc torCallWith"}, "Document")) {
2762 push(@beforeArgumentList, "document"); 2763 push(@beforeArgumentList, "document");
2763 $code .= " Document& document = *toDocument(getExecutionContext() );\n"; 2764 $code .= " Document& document = *toDocument(getExecutionContext() );\n";
2764 } 2765 }
2765 } 2766 }
2766 2767
2767 if ($constructorRaisesException) { 2768 if ($constructorRaisesException) {
2768 push(@afterArgumentList, "exceptionState"); 2769 push(@afterArgumentList, "exceptionState");
2769 } 2770 }
2770 2771
2771 my @argumentList; 2772 my @argumentList;
(...skipping 3608 matching lines...) Expand 10 before | Expand all | Expand 10 after
6380 6381
6381 return 1 if ExtendedAttributeContains($interface->extendedAttributes->{"Cust om"}, "ToV8"); 6382 return 1 if ExtendedAttributeContains($interface->extendedAttributes->{"Cust om"}, "ToV8");
6382 return 1 if ExtendedAttributeContains($interface->extendedAttributes->{"Cust om"}, "Wrap"); 6383 return 1 if ExtendedAttributeContains($interface->extendedAttributes->{"Cust om"}, "Wrap");
6383 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; 6384 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"};
6384 return 1 if InheritsInterface($interface, "Document"); 6385 return 1 if InheritsInterface($interface, "Document");
6385 6386
6386 return 0; 6387 return 0;
6387 } 6388 }
6388 6389
6389 1; 6390 1;
OLDNEW
« no previous file with comments | « Source/bindings/IDLExtendedAttributes.txt ('k') | Source/bindings/scripts/unstable/v8_interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698