[webkit-dev] Watch out for std::optional's move constructor
Konstantin Tokarev
annulen at yandex.ru
Tue Dec 18 13:40:46 PST 2018
18.12.2018, 22:35, "Michael Catanzaro" <mcatanzaro at igalia.com>:
> I know I'm getting a bit far afield here, but:
>
> On Mon, Dec 17, 2018 at 9:26 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
>> But then our behavior of HashMap which doesn't accept the POD
>> integral value of 0 as a key
>
> This behavior is really unexpected and dangerous [1], and we should
> seriously consider changing it. No doubt lots of bugs caused by this
> are just waiting to be uncovered. I've been working on WebKit since
> 2014 and didn't know about this until last month.
>
> Another oddity: I recently learned that AtomicStrings are actually
> interned strings. WTF. Why not call them that? I had thought for years
> that they were strings safe to be shared across threads, like other
> atomics. Not at all. Maybe this was dumb of me, but it could have been
> avoided by better naming.
I agree that "atomic" part of AtomicString is kinda misleading, however wiki
explains it all
https://trac.webkit.org/wiki/EfficientStrings#AtomicStringVSString
BTW, /me personally didn't know what "interned string" is until today :)
>
> Michael
>
> [1] https://trac.webkit.org/changeset/238407/webkit
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
--
Regards,
Konstantin
More information about the webkit-dev
mailing list