| Index: Source/bindings/scripts/CodeGeneratorV8.pm
|
| diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm
|
| index 5ecf344c1e37fbba8a55317ea5aaf65a60004362..f47cf15eb22c6c24f6add8c58c16ab88161b5893 100644
|
| --- a/Source/bindings/scripts/CodeGeneratorV8.pm
|
| +++ b/Source/bindings/scripts/CodeGeneratorV8.pm
|
| @@ -2617,11 +2617,15 @@ sub GenerateSingleBatchedAttribute
|
| my $setterForMainWorld;
|
| my $propAttr = "v8::None";
|
|
|
| + my $isConstructor = ($attribute->signature->type =~ /Constructor$/);
|
| +
|
| # Check attributes.
|
| - if ($attrExt->{"NotEnumerable"}) {
|
| + # As per Web IDL specification, constructor properties on the ECMAScript global object should be
|
| + # configurable and should not be enumerable.
|
| + if ($attrExt->{"NotEnumerable"} || $isConstructor) {
|
| $propAttr .= " | v8::DontEnum";
|
| }
|
| - if ($attrExt->{"Unforgeable"}) {
|
| + if ($attrExt->{"Unforgeable"} && !$isConstructor) {
|
| $propAttr .= " | v8::DontDelete";
|
| }
|
|
|
| @@ -2629,7 +2633,7 @@ sub GenerateSingleBatchedAttribute
|
| my $data = "0 /* no data */";
|
|
|
| # Constructor
|
| - if ($attribute->signature->type =~ /Constructor$/) {
|
| + if ($isConstructor) {
|
| my $constructorType = $attribute->signature->type;
|
| $constructorType =~ s/Constructor$//;
|
| # $constructorType ~= /Constructor$/ indicates that it is NamedConstructor.
|
|
|