Browse Source

Merge pull request #11020 from pfrazee/fix-protocol-crash-error-17x

Fix crash in custom protocols caused by bad callback exec
Charles Kerr 7 years ago
parent
commit
4b8f3276b5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      atom/browser/net/url_request_fetch_job.cc

+ 3 - 1
atom/browser/net/url_request_fetch_job.cc

@@ -258,7 +258,9 @@ void URLRequestFetchJob::OnURLFetchComplete(const net::URLFetcher* source) {
       HeadersCompleted();
       return;
     }
-    ReadRawDataComplete(0);
+    if (request_->status().is_io_pending()) {
+      ReadRawDataComplete(0);
+    }
   } else {
     NotifyStartError(fetcher_->GetStatus());
   }