Browse Source

fix: memory leak in net.request (#25382)

Jeremy Rose 4 years ago
parent
commit
75f193a089
1 changed files with 1 additions and 0 deletions
  1. 1 0
      shell/browser/api/electron_api_url_loader.cc

+ 1 - 0
shell/browser/api/electron_api_url_loader.cc

@@ -439,6 +439,7 @@ void SimpleURLLoaderWrapper::OnRetry(base::OnceClosure start_retry) {}
 void SimpleURLLoaderWrapper::OnResponseStarted(
     const GURL& final_url,
     const network::mojom::URLResponseHead& response_head) {
+  v8::HandleScope scope(isolate());
   gin::Dictionary dict = gin::Dictionary::CreateEmpty(isolate());
   dict.Set("statusCode", response_head.headers->response_code());
   dict.Set("statusMessage", response_head.headers->GetStatusText());