[webkit-reviews] review granted: [Bug 219483] [WTF] Avoid JSONValue::create with raw string falling to bool overload : [Attachment 415278] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 3 02:09:38 PST 2020


Adrian Perez <aperez at igalia.com> has granted Lauro Moura <lmoura at igalia.com>'s
request for review:
Bug 219483: [WTF] Avoid JSONValue::create with raw string falling to bool
overload
https://bugs.webkit.org/show_bug.cgi?id=219483

Attachment 415278: Patch

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




--- Comment #3 from Adrian Perez <aperez at igalia.com> ---
Comment on attachment 415278
  --> https://bugs.webkit.org/attachment.cgi?id=415278
Patch

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

>> Source/WTF/wtf/JSONValues.h:81
>> +	static Ref<Value> create(T) = delete;
> 
> If `create(T)` is too strict, it could use `create(T*)` instead, to avoid
only the pointer conversions.

I think this is fine, and forbidding all possible implicit conversions is
probably even a good thing, thus ensuring that only the provided create()
factory functions are ever used.


More information about the webkit-reviews mailing list