Bug 180041

Summary: Give Document a strongly typed identifier instead of a uint64_t
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, cdumez, dbates, esprehn+autocc, ews-watchlist, ggaren, kangil.han, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2017-11-27 09:47:27 PST
Give Document a strongly typed identifier instead of a uint64_t, for clarity.
Comment 1 Chris Dumez 2017-11-27 10:53:55 PST
Created attachment 327648 [details]
Patch
Comment 2 youenn fablet 2017-11-27 10:59:10 PST
Comment on attachment 327648 [details]
Patch

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

> Source/WebCore/workers/service/ServiceWorkerClientIdentifier.h:40
> +    String toString() const { return String::number(serverConnectionIdentifier.toUInt64()) + "-" +  String::number(contextIdentifier.toUInt64()); }

Use StringBuilder?

Also, is this toString() being used to generate client ids, thus potentially exposing to the web page server connection id and context id?
If so, I am wondering whether we should not use some random UUID, at least when exposing the clientId to the web page, or have the storage process generate those random IDs.
Comment 3 Brady Eidson 2017-11-27 11:00:13 PST
Comment on attachment 327648 [details]
Patch

Fine once EWS is happy
Comment 4 Chris Dumez 2017-11-27 11:51:18 PST
Comment on attachment 327648 [details]
Patch

Clearing flags on attachment: 327648

Committed r225184: <https://trac.webkit.org/changeset/225184>
Comment 5 Chris Dumez 2017-11-27 11:51:20 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2017-11-27 11:52:19 PST
<rdar://problem/35703725>