* Electron version: 1.6.1
* Operating system: macOS 10.12.3, Windows 7 64bit

### Expected behavior

Should emit an error on the request object.

### Actual behavior

<img width="420" alt="image" src="https://cloud.githubusercontent.com/assets/99662/23713890/4e9b8f52-041f-11e7-9dfb-e8408bb58670.png">

An uncatchable error happens.

### How to reproduce
```bash
git clone https://github.com/arantes555/electron-net-encoding-testcase.git
cd electron-net-encoding-testcase
npm install
npm start
```

atom/browser/net/atom_url_request.cc
content::BrowserThread::UI, FROM_HERE,
        base::Bind(&AtomURLRequest::InformDelegateResponseCompleted, this));
    DoTerminate();
  } else if (data_transfer_error) {
    
    DoCancelWithError("Failed to transfer data from IO to UI thread.", false);
  }
}
void AtomURLRequest::OnContextShuttingDown() {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
  DoCancel();
}
bool AtomURLRequest::CopyAndPostBuffer(int bytes_read) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
  
  
  auto buffer_copy = new net::IOBufferWithSize(bytes_read);
  memcpy(buffer_copy->data(), response_read_buffer_->data(), bytes_read);
  return content::BrowserThread::PostTask(
      content::BrowserThread::UI, FROM_HERE,
      base::Bind(&AtomURLRequest::InformDelegateResponseData, this,
                 buffer_copy));
}
void AtomURLRequest::InformDelegateAuthenticationRequired(
    scoped_refptr<net::AuthChallengeInfo> auth_info) const {
  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
  if (delegate_)
    delegate_->OnAuthenticationRequired(auth_info);
}
void AtomURLRequest::InformDelegateResponseStarted(