Always update buffer and send signal when ReadChunk is done.

There is a chance that VolumeReaderJavaScriptStream::Read() waits a response of
ReadChunk forever.
The problematic scenario is illustrated in
https://bugs.chromium.org/p/chromium/issues/detail?id=457448#c28

VolumeReaderJavaScriptStream can request ReadChunk without a client's request to
read ahead.
It expects a response through VolumeReaderJavaScriptStream::SetBufferAndSignal,
but a response can be ignored in Volume::Volume::ReadChunkDone() if the file for
previous Read request is already closed. This can cause Read() to be hanged.

Considering the case of reading ahead (without explicit Read requests from
client), I think we should always set buffer and signal
VolumeReaderJavaScriptStream when ReadChunk is done.

BUG=chromium:457448
TEST=Open a zip file which contains 1000 photos, and browse photos by
scrolling randomly.
Change-Id: I4850b89ee6d5f8e808e0c94f76aabb4a3eda35b7
diff --git a/unpacker/cpp/volume.cc b/unpacker/cpp/volume.cc
index 588698f..e4a71fc 100644
--- a/unpacker/cpp/volume.cc
+++ b/unpacker/cpp/volume.cc
@@ -260,22 +260,15 @@
                            int64_t read_offset) {
   PP_DCHECK(volume_archive_);
 
-  job_lock_.Acquire();
-  if (request_id == reader_request_id_) {
-    static_cast<VolumeReaderJavaScriptStream*>(volume_archive_->reader())->
-        SetBufferAndSignal(array_buffer, read_offset);
-  }
-  job_lock_.Release();
+  static_cast<VolumeReaderJavaScriptStream*>(volume_archive_->reader())->
+      SetBufferAndSignal(array_buffer, read_offset);
 }
 
 void Volume::ReadChunkError(const std::string& request_id) {
   PP_DCHECK(volume_archive_);
-  job_lock_.Acquire();
-  if (request_id == reader_request_id_) {
-    static_cast<VolumeReaderJavaScriptStream*>(volume_archive_->reader())->
-        ReadErrorSignal();
-  }
-  job_lock_.Release();
+
+  static_cast<VolumeReaderJavaScriptStream*>(volume_archive_->reader())->
+      ReadErrorSignal();
 }
 
 void Volume::ReadPassphraseDone(const std::string& request_id,
diff --git a/unpacker/manifest.json b/unpacker/manifest.json
index b97e392..372d9bb 100644
--- a/unpacker/manifest.json
+++ b/unpacker/manifest.json
@@ -1,6 +1,6 @@
 {
   "name": "__MSG_name__",
-  "version": "0.76",
+  "version": "0.77",
   "manifest_version": 2,
   "minimum_chrome_version": "44.0.2400.0",
   "description": "__MSG_description__",