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

Issue 63036: Fix a crash where the ResourceMessageFilter is deleted (Closed)

Created:
11 years, 8 months ago by Paul Godavari
Modified:
9 years, 7 months ago
Reviewers:
jam, Matt Perry
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fix a crash where the ResourceMessageFilter is deleted before a SafeBrowsing check has completed. The problem occurs since the SafeBrowsingResourceHandler is not deleted when its associated URLRequest is cleaned up *and* a SafeBrowsing check is in progress. When the check completes, the next resource handler in the chain (the AsyncResourceHandler which caches a pointer the now deleted ResourceMessageFilter) will crash. This CL adds a notification for objects to know when the ResourceMessageFilter is destroyed. BUG=8544 (http://crbug.com) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=13644

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 10

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -35 lines) Patch
M chrome/browser/extensions/extension_message_service.h View 5 6 7 8 9 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_message_service.cc View 5 6 7 8 9 10 3 chunks +21 lines, -5 lines 1 comment Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_handler.h View 1 2 3 4 5 6 7 8 9 4 chunks +12 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_handler.cc View 1 2 3 4 5 6 5 chunks +29 lines, -6 lines 0 comments Download
M chrome/browser/worker_host/worker_service.h View 5 6 7 8 9 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/worker_host/worker_service.cc View 5 6 7 8 9 4 chunks +26 lines, -8 lines 0 comments Download
M chrome/common/notification_type.h View 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Paul Godavari
11 years, 8 months ago (2009-04-06 23:36:53 UTC) #1
Paul Godavari
11 years, 8 months ago (2009-04-13 19:03:34 UTC) #2
jam
http://codereview.chromium.org/63036/diff/5003/5012 File chrome/browser/extensions/extension_message_service.cc (right): http://codereview.chromium.org/63036/diff/5003/5012#newcode165 Line 165: // NotificationObserver interface. nit: I think this is ...
11 years, 8 months ago (2009-04-13 21:00:25 UTC) #3
Paul Godavari
http://codereview.chromium.org/63036/diff/5003/5012 File chrome/browser/extensions/extension_message_service.cc (right): http://codereview.chromium.org/63036/diff/5003/5012#newcode165 Line 165: // NotificationObserver interface. On 2009/04/13 21:00:25, John Abd-El-Malek ...
11 years, 8 months ago (2009-04-13 22:04:15 UTC) #4
jam
lgtm
11 years, 8 months ago (2009-04-13 22:48:43 UTC) #5
Matt Perry
11 years, 8 months ago (2009-04-17 23:31:02 UTC) #6
http://codereview.chromium.org/63036/diff/3036/3045
File chrome/browser/extensions/extension_message_service.cc (right):

http://codereview.chromium.org/63036/diff/3036/3045#newcode137
Line 137: NotificationService::current()->AddObserver(
This doesn't work.  RendererReady is called on the UI thread, but the
notification is sent on the IO thread.

Powered by Google App Engine
This is Rietveld 408576698