Expose Controller() in UnderlyingSinkBase
In the JavaScript API for underlying sinks, they usually capture the controller if they need it in the start() method. However, the C++ UnderlyingSinkBase needs to store the controller internally for its own use. It's wasteful for subclasses to take their own copy. Instead expose it to subclasses directly via a protected getter. This getter will be used by the implementation of WebSocketStream. See the design doc at https://docs.google.com/document/d/1XuxEshh5VYBYm1qRVKordTamCOsR-uGQBCYFcHXP4L0/edit. Also fix a bug in the generic version of WritableStreamDefaultControllerInterface::Error(). BUG=983030 Change-Id: I5339f9117f52b78947592b417cb595b2fa496c3f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1734738Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#684284}
Showing
Please register or sign in to comment