[webkit-reviews] review granted: [Bug 75756] Implement navigator.startActivity; add IntentsController for managing web intents callbacks. : [Attachment 121757] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 9 17:06:43 PST 2012


Adam Barth <abarth at webkit.org> has granted Greg Billock <gbillock at google.com>'s
request for review:
Bug 75756: Implement navigator.startActivity; add IntentsController for
managing web intents callbacks.
https://bugs.webkit.org/show_bug.cgi?id=75756

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

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


Two minor issues below.

> Source/WebCore/Modules/intents/IntentRequest.cpp:59
> +void IntentRequest::contextDestroyed()

Sorry, I don't think that contextDestroyed is quite the right thing.  I think
you want to override stop().  contextDestroyed is when the context is finally
deallocated (e.g., it's called in the destructor).  This stuff is kind of
obscure.  I should write some documentation explaining the lifecycle of these
objects.

> Source/WebCore/Modules/intents/IntentRequest.cpp:70
> +

Please add the following line here:

RefPtr<Intent> protector(this);

We don't control the lifetime of |this|, so we have to assume that handleEvent,
which can do arbitrary things, can remove all existing references to us.  That
means we need to take a reference to ourselves because we assume that |this| is
still alive after handleEvent returns.

> Source/WebCore/Modules/intents/IntentRequest.cpp:82
> +

ditto


More information about the webkit-reviews mailing list