[Webkit-unassigned] [Bug 202924] [GTK][WPE] WebKitWebContext should identify web views by their WebPageProxy identifier

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 15 00:38:47 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=202924

Adrian Perez <aperez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aperez at igalia.com
 Attachment #380877|review?                     |review+
              Flags|                            |

--- Comment #3 from Adrian Perez <aperez at igalia.com> ---
Comment on attachment 380877
  --> https://bugs.webkit.org/attachment.cgi?id=380877
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380877&action=review

I just have a comment suggesting a small improvement to the code that
touches the “webViews” map, which could as well be a follow-up.

Otherwise r=me :)

> Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:1807
> +    context->priv->webViews.set(page.identifier().toUInt64(), webView);

Instead of having the explicit .toUInt64() conversions where the “webViews”
is used, the map could be declared as:

  HashMap<WebPageProxyIdentifier, WebKitWebView*> webViews;

This would make explicit in the data type that the mapping is from page
proxy identifiers to web views, and the compiler would help a little bit
doing type checks. There will be still a couple of (unavoidable) casts
when crossing the public API boundaries, but I think it would make the
code a bit more robust. Could be a follow-up patch :)

-- 
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/20191015/02817e60/attachment-0001.html>


More information about the webkit-unassigned mailing list