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

This commit is contained in:
Jeremy Rose
2020-09-09 19:40:53 -07:00
committed by GitHub
parent 7de2539399
commit 75f193a089

View File

@@ -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());