Add WritableStreamNative methods for use by PipeTo

Add WritableStreamDefaultWriter::GetDesiredSizeInternal() method which
returns the same information as GetDesiredSize() but without creating
any JavaScript objects. Instead it returns a base::nullopt to indicate
that the stream is errored.

Also add accessor OwnerWritableStream() to WritableStreamDefaultWriter
and accessors IsErrored() and IsWritable() to WritableStreamNative.

Also fix a minor bug in the WritableStreamNative constructor (it didn't
return after throwing an exception).

BUG=902633

Change-Id: I5762b17b80eccf2139e9aff209733d9358692f7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1524742
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641548}
4 files changed