Chromium Code Reviews| Index: Source/bindings/templates/dictionary_v8.cpp |
| diff --git a/Source/bindings/templates/dictionary_v8.cpp b/Source/bindings/templates/dictionary_v8.cpp |
| index 769f5ef44d67fb4e911f36455adc62950eb1bf29..e81780a200d000d68cb065c697b81ef66792b095 100644 |
| --- a/Source/bindings/templates/dictionary_v8.cpp |
| +++ b/Source/bindings/templates/dictionary_v8.cpp |
| @@ -28,15 +28,13 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Handle<v8::Value> v8Value, { |
| return; |
| {% endif %} |
| - // FIXME: Do not use Dictionary and DictionaryHelper |
| - // https://crbug.com/321462 |
| - Dictionary dictionary(v8Value, isolate); |
| - // FIXME: Remove this v8::TryCatch once the code is switched from |
| - // Dictionary/DictionaryHelper to something that uses ExceptionState. |
| + |
| + v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate); |
| v8::TryCatch block; |
| {% for member in members %} |
| - {{member.cpp_type}} {{member.name}}; |
| - if (DictionaryHelper::getWithUndefinedOrNullCheck(dictionary, "{{member.name}}", {{member.name}})) { |
| + v8::Local<v8::Value> {{member.name}}Value = v8Object->Get(v8String(isolate, "{{member.name}}")); |
| + if (!{{member.name}}Value.IsEmpty() && !isUndefinedOrNull({{member.name}}Value)) { |
| + {{member.v8_value_to_local_cpp_value}}; |
| {% if member.enum_validation_expression %} |
| String string = {{member.name}}; |
| if (!({{member.enum_validation_expression}})) { |
| @@ -52,7 +50,6 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Handle<v8::Value> v8Value, { |
| impl.{{member.setter_name}}({{member.name}}); |
| } else if (block.HasCaught()) { |
| exceptionState.rethrowV8Exception(block.Exception()); |
| - return; |
|
zino
2014/11/19 18:12:19
This is my mistake.. :-(
bashi
2014/11/20 02:18:02
I'm not sure why you removed this return. Early ex
zino
2014/11/20 02:40:43
Yep, you're right! It's just my mistake :-P
|
| } |
| {% endfor %} |