OOP PDF: Abort streams after a timeout of 10 seconds.
commit990d726b5d627323ddad04170dc2e2140312af8b
authorsammc <sammc@chromium.org>
Thu, 27 Nov 2014 01:09:41 +0000 (26 17:09 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 27 Nov 2014 01:11:22 +0000 (27 01:11 +0000)
treedf3128fda0152dd2a8e5832b749cd325c102c0cb
parent51d71e9f5a7d2d7e67b4a72aeb9576b282f126a6
OOP PDF: Abort streams after a timeout of 10 seconds.

If the PDF plugin does not finish reading from a stream, that stream is
left open. Future requests to the same URL will wait until the original
stream has completed or has been aborted. This CL adds a timeout to
abort the stream of 10 seconds to the following situations where  a
stream can be left incomplete:
1. The stream is passed to the PDF extension background page but not
claimed by a PDF viewer instance.
2. The stream is claimed by a PDF instance which fails to read the
entire stream.
The former timeout is cancelled if the latter is started.

This is a temporary work-around abandoned streams blocking further
access to their resources, until the streamsPrivate is made more robust
to this issue.

BUG=436345

Review URL: https://codereview.chromium.org/763463002

Cr-Commit-Position: refs/heads/master@{#305932}
chrome/browser/resources/pdf/background.js