[webkit-reviews] review granted: [Bug 184012] Unable to use HashMap<WebCore::SecurityOriginData, Ref<WebSWServerToContextConnection>> type in StorageProcess.h : [Attachment 336628] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 16 11:37:17 PDT 2018


Ryosuke Niwa <rniwa at webkit.org> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 184012: Unable to use HashMap<WebCore::SecurityOriginData,
Ref<WebSWServerToContextConnection>> type in StorageProcess.h
https://bugs.webkit.org/show_bug.cgi?id=184012

Attachment 336628: Patch

https://bugs.webkit.org/attachment.cgi?id=336628&action=review




--- Comment #8 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 336628
  --> https://bugs.webkit.org/attachment.cgi?id=336628
Patch

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

> Source/WebCore/ChangeLog:9
> +	   Set SecurityOriginDataHashTraits::emptyValueIsZero to true. This is
OK because
> +	   the data members of SecurityOriginData are of type String or
std::optional<uint16_t>.

This seems a bit fragile. Can we add an assertion somewhere to make sure this
assumption holds?
e.g. memset SecurityOriginData and make sure isEmpty returns true there.


More information about the webkit-reviews mailing list