[webkit-reviews] review granted: [Bug 183545] PerProcess<> should be safe by default : [Attachment 335520] the patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 11 01:34:22 PST 2018


Yusuke Suzuki <utatane.tea at gmail.com> has granted Filip Pizlo
<fpizlo at apple.com>'s request for review:
Bug 183545: PerProcess<> should be safe by default
https://bugs.webkit.org/show_bug.cgi?id=183545

Attachment 335520: the patch

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




--- Comment #4 from Yusuke Suzuki <utatane.tea at gmail.com> ---
Comment on attachment 335520
  --> https://bugs.webkit.org/attachment.cgi?id=335520
the patch

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

r=me with a micro nit.

> Source/bmalloc/bmalloc/PerProcess.cpp:49
> +static unsigned stringHash(const char* string)
> +{
> +    unsigned result = 5381;
> +    while (char c = *string++)
> +	   result = result * 33 + c;
> +    return result;
> +}

Nits: you can make this `constexpr` function, move it to a header, and
calculate hash value at compile time.


More information about the webkit-reviews mailing list