Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Issue 115396: Fix a memory leak in ResourceDispatcher... (Closed)

Created:
11 years, 7 months ago by Alpha Left Google
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, awong, fbarchard
Visibility:
Public.

Description

Fix a memory leak in ResourceDispatcher When we delete a ResourceLoaderBridge before OnCompletedRequest is received, bad things happen. There's a lot of leaks at the following points: 1. OnMessageReceived ignores the message. 2. RemovePendingRequest removes it's internal deferred_message_queue. But ViewHostMsg_Resource_DataReceived is not POD. We should also close the shared memory handle inside it. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=16297

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 3

Patch Set 4 : '' #

Total comments: 2

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -0 lines) Patch
M base/shared_memory.h View 1 chunk +3 lines, -0 lines 0 comments Download
M base/shared_memory_posix.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M base/shared_memory_win.cc View 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/resource_dispatcher.h View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/resource_dispatcher.cc View 1 2 3 4 5 6 3 chunks +34 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Alpha Left Google
I'll also find the one who touched ResourceDispatcher the most to review this.
11 years, 7 months ago (2009-05-15 09:07:18 UTC) #1
Alpha Left Google
11 years, 7 months ago (2009-05-15 17:12:57 UTC) #2
Alpha Left Google
May I should add a static method to SharedMemory to close a SharedMemoryHandle?
11 years, 7 months ago (2009-05-15 17:13:54 UTC) #3
scherkus (not reviewing)
brett you should really look over this too http://codereview.chromium.org/115396/diff/11/1009 File base/shared_memory.h (right): http://codereview.chromium.org/115396/diff/11/1009#newcode65 Line 65: ...
11 years, 7 months ago (2009-05-15 21:12:11 UTC) #4
brettw
http://codereview.chromium.org/115396/diff/13/15 File base/shared_memory_win.cc (right): http://codereview.chromium.org/115396/diff/13/15#newcode60 Line 60: if (IsHandleValid(handle)) { Why do we need this ...
11 years, 7 months ago (2009-05-15 21:20:16 UTC) #5
Alpha Left Google
http://codereview.chromium.org/115396/diff/13/15 File base/shared_memory_win.cc (right): http://codereview.chromium.org/115396/diff/13/15#newcode60 Line 60: if (IsHandleValid(handle)) { On 2009/05/15 21:20:16, brettw wrote: ...
11 years, 7 months ago (2009-05-15 22:04:39 UTC) #6
Alpha Left Google
Added SharedMemory::CloseHandle() to posix. Also fixed one more leak in ResourceDispatcher::RemovePendingRequest()
11 years, 7 months ago (2009-05-15 23:28:47 UTC) #7
brettw
11 years, 7 months ago (2009-05-15 23:33:14 UTC) #8
LGTM

Powered by Google App Engine
This is Rietveld 408576698