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

Issue 2748353003: [Bindings] Remove redundant ToObject invocation in dictionary toImpl. (Closed)

Created:
3 years, 9 months ago by jbroman
Modified:
3 years, 9 months ago
Reviewers:
haraken, bashi, Yuki
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Bindings] Remove redundant ToObject invocation in dictionary toImpl. Code earlier in the method already checks IsObject, and in that case ToObject never throws an exception but simply casts the handle type. Review-Url: https://codereview.chromium.org/2748353003 Cr-Commit-Position: refs/heads/master@{#457539} Committed: https://chromium.googlesource.com/chromium/src/+/1b1306a03f9c9650c23d2b0d3f48ce1a3282da0d

Patch Set 1 #

Total comments: 1

Patch Set 2 : cast directly after check #

Total comments: 2

Messages

Total messages: 20 (11 generated)
jbroman
Noticed this while working on dictionary stuff.
3 years, 9 months ago (2017-03-15 22:19:51 UTC) #4
bashi
lgtm
3 years, 9 months ago (2017-03-15 23:49:37 UTC) #6
Yuki
LGTM. https://codereview.chromium.org/2748353003/diff/1/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl File third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl (right): https://codereview.chromium.org/2748353003/diff/1/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl#newcode40 third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl:40: v8::Local<v8::Object> v8Object = v8Value.As<v8::Object>(); nit: Could you move ...
3 years, 9 months ago (2017-03-16 07:10:43 UTC) #9
haraken
LGTM
3 years, 9 months ago (2017-03-16 08:34:56 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2748353003/20001
3 years, 9 months ago (2017-03-16 19:07:42 UTC) #13
jbroman
Done. Because of unused variable warnings, I have to either suppress or guard with {% ...
3 years, 9 months ago (2017-03-16 19:07:57 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/1b1306a03f9c9650c23d2b0d3f48ce1a3282da0d
3 years, 9 months ago (2017-03-16 20:43:25 UTC) #18
Yuki
https://codereview.chromium.org/2748353003/diff/20001/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl File third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl (right): https://codereview.chromium.org/2748353003/diff/20001/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl#newcode31 third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl:31: (void)v8Object; nit: You can use ALLOW_UNUSED_LOCAL, just FYI.
3 years, 9 months ago (2017-03-17 06:07:33 UTC) #19
jbroman
3 years, 9 months ago (2017-03-17 14:50:26 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/2748353003/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
(right):

https://codereview.chromium.org/2748353003/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl:31:
(void)v8Object;
On 2017/03/17 at 06:07:33, Yuki wrote:
> nit: You can use ALLOW_UNUSED_LOCAL, just FYI.

I'd thought that wtf had something and couldn't find it. Hadn't realized that
base's ALLOW_UNUSED_LOCAL was okay now.
https://codereview.chromium.org/2761493002

Powered by Google App Engine
This is Rietveld 408576698