Index: Source/bindings/scripts/CodeGeneratorV8.pm |
diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm |
index 1a5429d29c03c3db7d1d3329d406c56cba0398fb..81dd8fefc2f31e7ec60f688945299a70d30cafa4 100644 |
--- a/Source/bindings/scripts/CodeGeneratorV8.pm |
+++ b/Source/bindings/scripts/CodeGeneratorV8.pm |
@@ -2666,13 +2666,29 @@ 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}); |
+ eventInit.${attributeName}IsSet = true; |
+ } |
+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 +2710,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")) { |
+ $code .= " options.get(\"$attributeName\", eventInit.$attributeName);\n"; |
+ } |
} |
} |