Chromium Code Reviews| Index: Source/bindings/scripts/CodeGeneratorV8.pm |
| diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm |
| index 1a5429d29c03c3db7d1d3329d406c56cba0398fb..c0f59973895e8b9f5a5a1cef7dc557cdeaa5f8fa 100644 |
| --- a/Source/bindings/scripts/CodeGeneratorV8.pm |
| +++ b/Source/bindings/scripts/CodeGeneratorV8.pm |
| @@ -2666,13 +2666,27 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) |
| V8TRYCATCH_VOID(Dictionary, options, Dictionary(args[1], args.GetIsolate())); |
| if (!fill${implClassName}Init(eventInit, options)) |
| return; |
| +END |
| + for (my $index = 0; $index < @{$interface->attributes}; $index++) { |
| + my $attribute = @{$interface->attributes}[$index]; |
| + if ($attribute->type eq "any") { |
| + my $attributeName = $attribute->name; |
| + $implementation{nameSpaceInternal}->add(<<END); |
| + v8::Local<v8::Value> ${attributeName}; |
| + options.get("${attributeName}", ${attributeName}); |
| + if (!${attributeName}.IsEmpty()) |
| + args.Holder()->SetHiddenValue(V8HiddenPropertyName::${attributeName}(), ${attributeName}); |
| +END |
| + } |
| + } |
| + $implementation{nameSpaceInternal}->add(<<END); |
| } |
| RefPtr<${implClassName}> event = ${implClassName}::create(type, eventInit); |
| v8::Handle<v8::Object> wrapper = args.Holder(); |
| V8DOMWrapper::associateObjectWithWrapper(event.release(), &${v8ClassName}::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); |
| - args.GetReturnValue().Set(wrapper); |
| + v8SetReturnValue(args, wrapper); |
| } |
| END |
| @@ -2694,7 +2708,10 @@ END |
| my $attribute = @{$interface->attributes}[$index]; |
| if ($attribute->extendedAttributes->{"InitializedByEventConstructor"}) { |
| my $attributeName = $attribute->name; |
| - $code .= " options.get(\"$attributeName\", eventInit.$attributeName);\n"; |
| + my $attributeType = $attribute->type; |
| + if (not ($attribute->type eq "any")) { |
|
haraken
2013/06/27 04:50:27
Perhaps you need to update run bindings tests.
jww
2013/06/27 17:44:42
Done.
|
| + $code .= " options.get(\"$attributeName\", eventInit.$attributeName);\n"; |
| + } |
| } |
| } |