RESOLVED FIXED 100853
[V8] Cleanup V8DOMWrapper::getCachedWrapper
https://bugs.webkit.org/show_bug.cgi?id=100853
Summary [V8] Cleanup V8DOMWrapper::getCachedWrapper
Dan Carney
Reported 2012-10-31 06:55:46 PDT
[V8] Cleanup V8DOMWrapper::getCachedWrapper
Attachments
Patch (1.97 KB, patch)
2012-10-31 06:57 PDT, Dan Carney
no flags
Dan Carney
Comment 1 2012-10-31 06:57:22 PDT
Kentaro Hara
Comment 2 2012-10-31 07:03:36 PDT
Comment on attachment 171643 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=171643&action=review > Source/WebCore/bindings/v8/V8DOMWrapper.h:-115 > - v8::Persistent<v8::Object> wrapper = node->wrapper(); > - if (LIKELY(!wrapper.IsEmpty())) Why is this branch redundant? This branch will fail and has to fall back to the following slow path in a case where we are in the main world and a wrapper has not yet created for a given node, won't it?
Adam Barth
Comment 3 2012-10-31 08:42:27 PDT
Comment on attachment 171643 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=171643&action=review >> Source/WebCore/bindings/v8/V8DOMWrapper.h:-115 >> - if (LIKELY(!wrapper.IsEmpty())) > > Why is this branch redundant? This branch will fail and has to fall back to the following slow path in a case where we are in the main world and a wrapper has not yet created for a given node, won't it? You're right Kentaro, but this function is only responsible for getting the cached wrapper. The caller of this function will create the wrapper if this function returns an empty handle.
Kentaro Hara
Comment 4 2012-10-31 08:49:11 PDT
(In reply to comment #3) > > Why is this branch redundant? This branch will fail and has to fall back to the following slow path in a case where we are in the main world and a wrapper has not yet created for a given node, won't it? > > You're right Kentaro, but this function is only responsible for getting the cached wrapper. The caller of this function will create the wrapper if this function returns an empty handle. Makes sense. Thanks.
WebKit Review Bot
Comment 5 2012-11-07 03:14:59 PST
Comment on attachment 171643 [details] Patch Clearing flags on attachment: 171643 Committed r133734: <http://trac.webkit.org/changeset/133734>
WebKit Review Bot
Comment 6 2012-11-07 03:15:03 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.