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

Unified Diff: Source/bindings/scripts/code_generator_v8.pm

Issue 27476003: IDL compiler: [Unforgeable] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/bindings/scripts/unstable/v8_attributes.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/code_generator_v8.pm
diff --git a/Source/bindings/scripts/code_generator_v8.pm b/Source/bindings/scripts/code_generator_v8.pm
index edf7fcd46472e83876924fdd563250429cc15bbc..0e42572f62cdd30d3fd43f2d947e843a1ecd47e6 100644
--- a/Source/bindings/scripts/code_generator_v8.pm
+++ b/Source/bindings/scripts/code_generator_v8.pm
@@ -3043,21 +3043,22 @@ sub GenerateAttributeConfigurationParameters
my $attrExt = $attribute->extendedAttributes;
my $implClassName = GetImplName($interface);
- my $accessControl = "v8::DEFAULT";
+ my @accessControlList;
if ($attrExt->{"DoNotCheckSecurityOnGetter"}) {
- $accessControl = "v8::ALL_CAN_READ";
+ push(@accessControlList, "v8::ALL_CAN_READ");
} elsif ($attrExt->{"DoNotCheckSecurityOnSetter"}) {
- $accessControl = "v8::ALL_CAN_WRITE";
+ push(@accessControlList, "v8::ALL_CAN_WRITE");
} elsif ($attrExt->{"DoNotCheckSecurity"}) {
- $accessControl = "v8::ALL_CAN_READ";
+ push(@accessControlList, "v8::ALL_CAN_READ");
if (!IsReadonly($attribute)) {
- $accessControl .= " | v8::ALL_CAN_WRITE";
+ push(@accessControlList, "v8::ALL_CAN_WRITE");
}
}
if ($attrExt->{"Unforgeable"}) {
- $accessControl .= " | v8::PROHIBITS_OVERWRITING";
+ push(@accessControlList, "v8::PROHIBITS_OVERWRITING");
}
- $accessControl = "static_cast<v8::AccessControl>(" . $accessControl . ")";
+ @accessControlList = ("v8::DEFAULT") unless @accessControlList;
+ my $accessControl = "static_cast<v8::AccessControl>(" . join(" | ", @accessControlList) . ")";
my $customAccessor = HasCustomGetter($attrExt) || HasCustomSetter($attribute) || "";
if ($customAccessor eq "VALUE_IS_MISSING") {
« no previous file with comments | « no previous file | Source/bindings/scripts/unstable/v8_attributes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698