diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-19 22:18:12 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-19 22:18:12 +0000 |
commit | c1f844dd22d6d2ca74e2d576070f66928737d5cd (patch) | |
tree | 99425e30f2bf1471186d496805dd788526558f13 /webkit/port | |
parent | 96ebac8cd728bf544a341c666a8533398858d48d (diff) | |
download | chromium_src-c1f844dd22d6d2ca74e2d576070f66928737d5cd.zip chromium_src-c1f844dd22d6d2ca74e2d576070f66928737d5cd.tar.gz chromium_src-c1f844dd22d6d2ca74e2d576070f66928737d5cd.tar.bz2 |
Enable IDL attribute [V8ReadOnly] to have the same
semantics as having specified an attribute as readonly.
This allows us to unfork IDL differences where V8 wants
readonly and JSC does not by using the V8ReadOnly
tag.
Review URL: http://codereview.chromium.org/50037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r-- | webkit/port/bindings/scripts/CodeGeneratorV8.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/port/bindings/scripts/CodeGeneratorV8.pm b/webkit/port/bindings/scripts/CodeGeneratorV8.pm index 8701a1f..5bb69cb 100644 --- a/webkit/port/bindings/scripts/CodeGeneratorV8.pm +++ b/webkit/port/bindings/scripts/CodeGeneratorV8.pm @@ -897,7 +897,7 @@ sub GenerateBatchedAttributeData $accessControl = "v8::ALL_CAN_WRITE"; } elsif ($attrExt->{"DoNotCheckDomainSecurity"}) { $accessControl = "v8::ALL_CAN_READ"; - if (!($attribute->type =~ /^readonly/)) { + if (!($attribute->type =~ /^readonly/) && !($attrExt->{"V8ReadOnly"})) { $accessControl .= "|v8::ALL_CAN_WRITE"; } } @@ -989,7 +989,7 @@ sub GenerateBatchedAttributeData } # Read only attributes - if ($attribute->type =~ /^readonly/) { + if ($attribute->type =~ /^readonly/ || $attrExt->{"V8ReadOnly"}) { $setter = "0"; } @@ -1105,7 +1105,8 @@ sub GenerateImplementation } elsif ($attribute->signature->extendedAttributes->{"Replaceable"}) { $dataNode->extendedAttributes->{"ExtendsDOMGlobalObject"} || die "Replaceable attribute can only be used in interface that defines ExtendsDOMGlobalObject attribute!"; # GenerateReplaceableAttrSetter($implClassName); - } elsif ($attribute->type !~ /^readonly/) { + } elsif ($attribute->type !~ /^readonly/ && + !$attribute->signature->extendedAttributes->{"V8ReadOnly"}) { GenerateNormalAttrSetter($attribute, $dataNode, $classIndex, $implClassName); } } |