Chromium Code Reviews| Index: Source/bindings/scripts/deprecated_code_generator_v8.pm |
| diff --git a/Source/bindings/scripts/deprecated_code_generator_v8.pm b/Source/bindings/scripts/deprecated_code_generator_v8.pm |
| index cd82aff027380ca35809a45ddab051dae33d2e56..40cdd99ca93e64a0bbbdd6ee537e45dea7f26cc1 100644 |
| --- a/Source/bindings/scripts/deprecated_code_generator_v8.pm |
| +++ b/Source/bindings/scripts/deprecated_code_generator_v8.pm |
| @@ -2694,11 +2694,26 @@ END |
| END |
| } |
| + my $declaredFoundBoolean = 0; |
| foreach my $attribute (@{$interface->attributes}) { |
| if ($attribute->extendedAttributes->{"InitializedByEventConstructor"}) { |
| if ($attribute->type ne "any") { |
| my $attributeName = $attribute->name; |
| - $code .= " options.get(\"$attributeName\", eventInit.$attributeName);\n"; |
| + my $attributeImplName = GetImplName($attribute); |
| + my $deprecation = $attribute->extendedAttributes->{"DeprecateAs"}; |
| + $code .= " "; |
| + if ($deprecation) { |
| + unless ($declaredFoundBoolean) { |
| + $code .= "bool "; |
| + $declaredFoundBoolean = 1; |
| + } |
| + $code .= "found = "; |
| + } |
| + $code .= "options.get(\"$attributeName\", eventInit.$attributeImplName);\n"; |
| + if ($deprecation) { |
| + $code .= " if (found)\n"; |
| + $code .= " " . GenerateDeprecationNotification($deprecation); |
|
haraken
2013/07/23 09:21:30
How about generating the following code? Then 'fou
do-not-use
2013/07/23 10:12:04
OK. Will do.
|
| + } |
| } |
| } |
| } |