[Webkit-unassigned] [Bug 173251] [GTK] getPage() in WebKitWebView should return a reference instead of a pointer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 12 06:04:05 PDT 2017


--- Comment #5 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Michael Catanzaro from comment #4)
> Comment on attachment 312645 [details]
> Patch
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=312645&action=review
> Nice!
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:517
> >  static void webkitWebViewDisconnectSettingsSignalHandlers(WebKitWebView* webView)
> >  {
> > +    if (!webkitWebViewIsConstructed(webView))
> > +        return;
> Can this really ever be legitimately called before the WebKitWebView is
> constructed? It seems like you should be able to use an ASSERT here instead
> of an early return.

Yes, read the changelog:

"The WebPageProxy is created on WebKitWebView construction, so getPage() can only return nullptr if it's called during construction. And that can only happen when construct properties are set."

construct properties are set on GObjectClass::constructor() that happens before GObjectClass::constructed(). It's also explained in the code in several comments.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170612/49968f3b/attachment.html>

More information about the webkit-unassigned mailing list