Changeset 96409 in webkit
- Timestamp:
- Sep 30, 2011 11:20:22 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96408 r96409 1 2011-09-30 Aaron Colwell <acolwell@chromium.org> 2 3 Fix EnabledAtRuntime support for constants. 4 https://bugs.webkit.org/show_bug.cgi?id=67311 5 6 Reviewed by Adam Barth. 7 8 * bindings/scripts/CodeGeneratorV8.pm: 9 (GenerateImplementation): 10 1 11 2011-09-29 David Hyatt <hyatt@apple.com> 2 12 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r96030 r96409 2100 2100 # Setup constants 2101 2101 my $has_constants = 0; 2102 my @constantsEnabledAtRuntime; 2102 2103 if (@{$dataNode->constants}) { 2103 2104 $has_constants = 1; … … 2107 2108 my $name = $constant->name; 2108 2109 my $value = $constant->value; 2109 # FIXME: we need the static_cast here only because of one constant, NodeFilter.idl 2110 # defines "const unsigned long SHOW_ALL = 0xFFFFFFFF". It would be better if we 2111 # handled this here, and converted it to a -1 constant in the c++ output. 2112 push(@implContent, <<END); 2110 my $attrExt = $constant->extendedAttributes; 2111 if ($attrExt->{"EnabledAtRuntime"}) { 2112 push(@constantsEnabledAtRuntime, $constant); 2113 } else { 2114 # FIXME: we need the static_cast here only because of one constant, NodeFilter.idl 2115 # defines "const unsigned long SHOW_ALL = 0xFFFFFFFF". It would be better if we 2116 # handled this here, and converted it to a -1 constant in the c++ output. 2117 push(@implContent, <<END); 2113 2118 {"${name}", static_cast<signed int>($value)}, 2114 2119 END 2120 } 2115 2121 } 2116 2122 if ($has_constants) { … … 2232 2238 } 2233 2239 END 2240 push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString; 2241 } 2242 2243 # Setup the enable-at-runtime constants if we have them 2244 foreach my $runtime_const (@constantsEnabledAtRuntime) { 2245 my $enable_function = GetRuntimeEnableFunctionName($runtime_const); 2246 my $conditionalString = GenerateConditionalString($runtime_const); 2247 my $name = $runtime_const->name; 2248 my $value = $runtime_const->value; 2249 push(@implContent, "\n#if ${conditionalString}\n") if $conditionalString; 2250 push(@implContent, " if (${enable_function}()) {\n"); 2251 push(@implContent, <<END); 2252 static const BatchedConstant constData = {"${name}", static_cast<signed int>(${value})}; 2253 batchConfigureConstants(desc, proto, &constData, 1); 2254 END 2255 push(@implContent, " }\n"); 2234 2256 push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString; 2235 2257 }
Note: See TracChangeset
for help on using the changeset viewer.