RESOLVED FIXED 157795
Promise resolution should be able to use toJSNewlyCreated for new objects
https://bugs.webkit.org/show_bug.cgi?id=157795
Summary Promise resolution should be able to use toJSNewlyCreated for new objects
youenn fablet
Reported 2016-05-17 08:11:13 PDT
WebIDL defines NewObject for APIs returning new objects. This allows doing some optimization at the JS binding layer. I would be good to have the same thing somehow for promises, although there is no WebIDL flags to help on that.
Attachments
youenn fablet
Comment 1 2016-05-17 08:13:21 PDT
One option is to add to DOMPromise something like resolveWithNewValue which would take a Ref<T>&&/RefPtr<T>&&. Another option would be to use toJSNewlyCreated when resolve() is passed a Ref<T>&&/RefPtr<T>&&, although this may be too error-prone.
youenn fablet
Comment 2 2017-10-14 16:52:33 PDT
resolveWithNewlyCreated was added in another patch
Note You need to log in before you can comment on or make changes to this bug.