Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl

Issue 2748353003: [Bindings] Remove redundant ToObject invocation in dictionary toImpl. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
index 6146238c740ee40050d1a8a9b76532efc58ab139..43c644ae1f32c309dbd3d7e6f2924580503b8df0 100644
--- a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
@@ -37,11 +37,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
{# Declare local variables only when the dictionary has members to avoid unused variable warnings. #}
{% if members %}
v8::TryCatch block(isolate);
- v8::Local<v8::Object> v8Object;
- if (!v8Call(v8Value->ToObject(isolate->GetCurrentContext()), v8Object, block)) {
- exceptionState.rethrowV8Exception(block.Exception());
- return;
- }
+ v8::Local<v8::Object> v8Object = v8Value.As<v8::Object>();
Yuki 2017/03/16 07:10:43 nit: Could you move this cast up to just after lin
{% endif %}
{% for member in members %}
{% filter runtime_enabled(member.runtime_enabled_feature_name) %}
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698