Streams: Split construction from initialisation
Previously, initialisation of ReadableStreamNative, WritableStreamNative and TransformStreamNative objects was done in the constructor. However, this resulted in calling into JavaScript inside the constructor, which could cause problems with garbage collection. Move the code from inside the constructor to a separate InitInternal() method which is called from Create(). The content of the new methods is copied verbatim from the constructors so there should be no functional differences. Manually tested. There are no automated tests as I don't know how to make them not be flaky. BUG=1008470 Change-Id: I394cc60b0bac397dccbef18ca166a66528c22bd0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1837326Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#704104}
Showing
This diff is collapsed.
Please register or sign in to comment