The callbacks can directly retrieve it by capturing the JSReadableStream object itself.
Created attachment 248070 [details] Patch
Comment on attachment 248070 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=248070&action=review > Source/WebCore/bindings/js/JSReadableStreamCustom.cpp:74 > + wrapper.resolve(&impl()); What guarantees that "this" won’t be deallocated before this function gets called? > Source/WebCore/bindings/js/JSReadableStreamCustom.cpp:92 > + wrapper.resolve(&impl()); What guarantees that "this" won’t be deallocated before this function gets called?
Created attachment 248240 [details] Patch for landing
(In reply to comment #2) > Comment on attachment 248070 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=248070&action=review > > > Source/WebCore/bindings/js/JSReadableStreamCustom.cpp:74 > > + wrapper.resolve(&impl()); > > What guarantees that "this" won’t be deallocated before this function gets > called? > > > Source/WebCore/bindings/js/JSReadableStreamCustom.cpp:92 > > + wrapper.resolve(&impl()); > > What guarantees that "this" won’t be deallocated before this function gets > called? Good point. It is not implemented yet. Plan is to use ActiveDOMObject from which ReadableStream is deriving. I filed bug 142478 for that purpose.
Comment on attachment 248240 [details] Patch for landing Clearing flags on attachment: 248240 Committed r181262: <http://trac.webkit.org/changeset/181262>
All reviewed patches have been landed. Closing bug.