Index: Source/bindings/templates/dictionary_v8.cpp |
diff --git a/Source/bindings/templates/dictionary_v8.cpp b/Source/bindings/templates/dictionary_v8.cpp |
index 76240ac35cc94f2477e15d0090d640b11683ce5b..24e9152490635dd0ce40c9e2dbe22b7404d7a743 100644 |
--- a/Source/bindings/templates/dictionary_v8.cpp |
+++ b/Source/bindings/templates/dictionary_v8.cpp |
@@ -16,12 +16,13 @@ namespace blink { |
{{cpp_class}}* {{v8_class}}::toNative(v8::Isolate* isolate, v8::Handle<v8::Value> v8Value) |
{ |
{{cpp_class}}* impl = {{cpp_class}}::create(); |
- // FIXME: Do not use Dictionary and DictionaryHelper |
- // https://crbug.com/321462 |
- Dictionary dictionary(v8Value, isolate); |
+ if (v8Value.IsEmpty() || !v8Value->IsObject()) |
+ return impl; |
+ v8::Local<v8::Object> v8Object = v8Value->ToObject(); |
+ PropertyBag bag(isolate, v8Object); |
{% for member in members %} |
{{member.cpp_type}} {{member.name}}; |
- if (DictionaryHelper::get(dictionary, "{{member.name}}", {{member.name}})) |
+ if (bag.get("{{member.name}}", {{member.name}})) |
impl->{{member.setter_name}}({{member.name}}); |
{% endfor %} |
return impl; |