Bug 181172 - Identify MessagePorts by a globally unique MessagePortIdentifier
Summary: Identify MessagePorts by a globally unique MessagePortIdentifier
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on: 181155
Blocks: 181178
  Show dependency treegraph
 
Reported: 2017-12-26 21:27 PST by Brady Eidson
Modified: 2018-01-09 15:14 PST (History)
10 users (show)

See Also:


Attachments
Patch (23.02 KB, patch)
2017-12-29 09:56 PST, Brady Eidson
achristensen: review+
Details | Formatted Diff | Diff
PFL (22.36 KB, patch)
2018-01-02 12:54 PST, Brady Eidson
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2 (2.35 MB, application/zip)
2018-01-02 14:09 PST, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2017-12-26 21:27:32 PST
Identify MessagePorts by a globally unique MessagePortIdentifier

"Globally unique" in this context means that no matter which process a MessagePort is originally created in, its identifier is guaranteed to not conflict with a port created in any other process. See https://bugs.webkit.org/show_bug.cgi?id=181155 for the precursor to this.

This is the final refactor necessary before WK2 multi-process MessagePorts.
Comment 1 Brady Eidson 2017-12-29 09:56:19 PST
Created attachment 330255 [details]
Patch
Comment 2 Alex Christensen 2018-01-02 11:07:05 PST
Comment on attachment 330255 [details]
Patch

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

> Source/WebCore/dom/MessagePortIdentifier.h:76
> +    unsigned hashes[2];
> +    hashes[0] = WTF::intHash(processIdentifier.toUInt64());
> +    hashes[1] = WTF::intHash(portIdentifier.toUInt64());
> +
> +    return StringHasher::hashMemory(hashes, sizeof(hashes));

Could this use Darin's new computeHash?  See https://bugs.webkit.org/show_bug.cgi?id=180318
Comment 3 Brady Eidson 2018-01-02 12:54:30 PST
Created attachment 330329 [details]
PFL
Comment 4 EWS Watchlist 2018-01-02 14:09:48 PST
Comment on attachment 330329 [details]
PFL

Attachment 330329 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/5895383

New failing tests:
imported/w3c/web-platform-tests/service-workers/service-worker/update-after-navigation-fetch-event.https.html
Comment 5 EWS Watchlist 2018-01-02 14:09:49 PST
Created attachment 330332 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 6 Brady Eidson 2018-01-02 14:21:35 PST
(In reply to Build Bot from comment #4)
> Comment on attachment 330329 [details]
> PFL
> 
> Attachment 330329 [details] did not pass ios-sim-ews (ios-simulator-wk2):
> Output: http://webkit-queues.webkit.org/results/5895383
> 
> New failing tests:
> imported/w3c/web-platform-tests/service-workers/service-worker/update-after-
> navigation-fetch-event.https.html

Hmmmmm not caused by this patch.
Comment 7 WebKit Commit Bot 2018-01-02 14:42:20 PST
Comment on attachment 330329 [details]
PFL

Clearing flags on attachment: 330329

Committed r226336: <https://trac.webkit.org/changeset/226336>
Comment 8 Radar WebKit Bug Importer 2018-01-09 15:14:33 PST
<rdar://problem/36387284>