@@ -536,23 +536,23 @@ def Mixins(self):
536
536
return mixins
537
537
538
538
def AddConstructors (self , constructors , factory_name ,
539
- factory_constructor_name , emitter ):
539
+ factory_constructor_name , constructor_emitter ):
540
540
""" Adds all of the constructors.
541
541
Arguments:
542
542
constructors - List of the constructors to be added.
543
543
factory_name - Name of the factory for this class.
544
544
factory_constructor_name - The name of the constructor on the
545
545
factory_name to call (calls an autogenerated FactoryProvider
546
546
if unspecified)
547
- emitter - Emitter used to emit constructors when generating classes
548
- using the static extension pattern.
547
+ constructor_emitter - Emitter used to emit constructors when generating
548
+ classes using the static extension pattern.
549
549
"""
550
550
for constructor_info in constructors :
551
551
self ._AddConstructor (constructor_info , factory_name ,
552
- factory_constructor_name , emitter )
552
+ factory_constructor_name , constructor_emitter )
553
553
554
554
def _AddConstructor (self , constructor_info , factory_name ,
555
- factory_constructor_name , emitter ):
555
+ factory_constructor_name , constructor_emitter ):
556
556
# Hack to ignore the constructor used by JavaScript.
557
557
if ((self ._interface .id == 'HTMLImageElement' or
558
558
self ._interface .id == 'Blob' or
@@ -566,7 +566,8 @@ def _AddConstructor(self, constructor_info, factory_name,
566
566
metadata = self ._metadata .GetFormattedMetadata (
567
567
self ._library_name , self ._interface , self ._interface .id , ' ' )
568
568
569
- target_emitter = emitter if emitter else self ._members_emitter
569
+ target_emitter = constructor_emitter if constructor_emitter else \
570
+ self ._members_emitter
570
571
571
572
if not factory_constructor_name :
572
573
factory_constructor_name = '_create'
@@ -669,7 +670,7 @@ def GenerateCall(stmts_emitter, call_emitter, version,
669
670
FACTORY_NAME = qualified_name ,
670
671
FACTORY_PARAMS = args )
671
672
self .EmitStaticFactoryOverload (constructor_info , name ,
672
- arguments , emitter )
673
+ arguments , constructor_emitter )
673
674
674
675
def IsOptional (signature_index , argument ):
675
676
return self .IsConstructorArgumentOptional (argument )
@@ -817,12 +818,13 @@ def _AddFutureifiedOperation(self, info, html_name):
817
818
FUTURE_GENERIC = future_generic ,
818
819
ORIGINAL_FUNCTION = html_name )
819
820
820
- def EmitHelpers (self , base_class , emitter ):
821
- if (not self ._members_emitter ) and (not emitter ):
821
+ def EmitHelpers (self , base_class , members_emitter ):
822
+ if (not self ._members_emitter ) and (not members_emitter ):
822
823
return
823
824
824
825
if self ._interface .id not in custom_html_constructors :
825
- target_emitter = emitter if emitter else self ._members_emitter
826
+ target_emitter = members_emitter if members_emitter else \
827
+ self ._members_emitter
826
828
target_emitter .Emit (
827
829
' // To suppress missing implicit constructor warnings.\n '
828
830
' factory $CLASSNAME._() { '
0 commit comments