ReadableStreamOperations.cpp uses CallExtraOrCrash 11 times. This will crash the renderer process if an exception occurs. This appears reasonable because the Javascript in question looks like it can't throw an exception.
Unfortunately, any Javascript function in Blink can throw an exception. I know of two ways to do it:
1. Shutdown the Worker while the function is executing. A special internal exception is thrown to leave V8 code.
2. Call the function with inadequate stack space so it overflows the stack.
There are probably more, but I think they are all "extreme" cases when things are shutting down or failing anyway, so simply not doing anything or passing on the exception is fine.
The difficult part is when ReadableStreamOperations::CreateReadableStream is called by the BodyStreamBuffer constructor during construction of a Response from the network. In this case we probably can't throw. It looks like BodyStreamBuffer::Stream() can deal safely with the stream not being set, so maybe just not setting it if construction failed is the best option.
Comment 1 by ricea@chromium.org
, Apr 6 2018