RESOLVED FIXED 219723
Remove unnecessary locking from JSValue API functions
https://bugs.webkit.org/show_bug.cgi?id=219723
Summary Remove unnecessary locking from JSValue API functions
Tadeu Zagallo
Reported 2020-12-09 18:41:35 PST
...
Attachments
Patch (12.62 KB, patch)
2020-12-09 18:47 PST, Tadeu Zagallo
no flags
Patch for landing (12.66 KB, patch)
2020-12-10 19:16 PST, Tadeu Zagallo
no flags
Tadeu Zagallo
Comment 1 2020-12-09 18:47:16 PST
Created attachment 415819 [details] Patch The patch won't apply since it was written on top of b219663
Mark Lam
Comment 2 2020-12-10 14:05:48 PST
Comment on attachment 415819 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415819&action=review > Source/JavaScriptCore/API/JSValue.mm:404 > + return bitwise_cast<JSC::JSValue>(m_value).isUndefined(); nit: Why not encapsulate this in a toJS(JSValueRef) inline function (complement to the toRef(JSCJSValue) you have above? Currently, you're doing bitwise_cast in many places. I think such an inline function would express the intent a little better.
Tadeu Zagallo
Comment 3 2020-12-10 14:14:19 PST
Comment on attachment 415819 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415819&action=review >> Source/JavaScriptCore/API/JSValue.mm:404 >> + return bitwise_cast<JSC::JSValue>(m_value).isUndefined(); > > nit: Why not encapsulate this in a toJS(JSValueRef) inline function (complement to the toRef(JSCJSValue) you have above? Currently, you're doing bitwise_cast in many places. I think such an inline function would express the intent a little better. That sounds fair, I'll refactor it before landing.
Tadeu Zagallo
Comment 4 2020-12-10 19:16:25 PST
Created attachment 415959 [details] Patch for landing
EWS
Comment 5 2020-12-10 20:20:45 PST
Committed r270665: <https://trac.webkit.org/changeset/270665> All reviewed patches have been landed. Closing bug and clearing flags on attachment 415959 [details].
Radar WebKit Bug Importer
Comment 6 2020-12-10 20:21:18 PST
Note You need to log in before you can comment on or make changes to this bug.