ReadableStreamBytesConsumer should check read results

ReadableStreamBytesConsumer expected that the results from
ReadableStreamReaderDefaultRead should be Promise<Object> because that
is provided from ReadableStream provided by blink, but it's possible to
inject arbitrary values with the promise assimilation.

This CL adds additional checks for such injection.

(cherry picked from commit 7712d138374a92c4d2f3b05cdc86d1a7a523702b)

Bug: 840320
Change-Id: I7b3c6a8bfcf563dd860b133ff0295dd7a5d5fea5
Commit-Queue: Yutaka Hirano <>
Reviewed-by: Adam Rice <>
Cr-Original-Commit-Position: refs/heads/master@{#556751}
Reviewed-by: Yutaka Hirano <>
Cr-Commit-Position: refs/branch-heads/3396@{#620}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
2 files changed