[webkit-reviews] review granted: [Bug 82238] Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls : [Attachment 133878] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 26 14:37:55 PDT 2012


Adam Barth <abarth at webkit.org> has granted Adam Klein <adamk at chromium.org>'s
request for review:
Bug 82238: Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref()
calls
https://bugs.webkit.org/show_bug.cgi?id=82238

Attachment 133878: Patch
https://bugs.webkit.org/attachment.cgi?id=133878&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=133878&action=review


In the words of dglazkov, the old version of this code was awesome.

> Source/WebCore/bindings/v8/V8DOMWindowShell.cpp:417
> -    V8DOMWrapper::setJSWrapperForDOMObject(window,
v8::Persistent<v8::Object>::New(jsWindow));
> +    V8DOMWrapper::setJSWrapperForDOMObject(PassRefPtr<DOMWindow>(window),
v8::Persistent<v8::Object>::New(jsWindow));

I don't think you need to call the constructor explicitly.  The call should be
generated implicitly.

> Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp:113
>      // Add object to the wrapper map.

Mayvbe remove this useless comment?

> Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:68
>      // Add object to the wrapper map.

Ditto.


More information about the webkit-reviews mailing list