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

Issue 6055002: Create a message filter for message port messages. This allows a nice cleanu... (Closed)

Created:
10 years ago by jam
Modified:
9 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Create a message filter for message port and worker messages. This allows a nice cleanup of getting rid of the notifications when RenderMessageFilter and WorkerProcessHost go away. SafeBrowsingResourceHandler doesn't need it anymore as well, since it now overrides OnRequestClosed() which does the same thing. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69862

Patch Set 1 : '' #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 16

Patch Set 4 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+928 lines, -1537 lines) Patch
M chrome/browser/browser_child_process_host.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 2 3 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_message_filter.h View 1 2 3 6 chunks +0 lines, -19 lines 0 comments Download
M chrome/browser/renderer_host/render_message_filter.cc View 1 2 3 4 chunks +109 lines, -201 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.cc View 1 2 3 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 1 chunk +4 lines, -10 lines 0 comments Download
M chrome/browser/renderer_host/resource_request_details.cc View 1 2 3 2 chunks +9 lines, -12 lines 0 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_handler.h View 1 2 3 4 chunks +1 line, -10 lines 0 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_handler.cc View 1 2 3 3 chunks +0 lines, -13 lines 0 comments Download
D chrome/browser/worker_host/message_port_dispatcher.h View 1 2 3 1 chunk +0 lines, -93 lines 0 comments Download
D chrome/browser/worker_host/message_port_dispatcher.cc View 1 2 3 1 chunk +0 lines, -291 lines 0 comments Download
A + chrome/browser/worker_host/message_port_service.h View 1 3 chunks +26 lines, -44 lines 0 comments Download
A + chrome/browser/worker_host/message_port_service.cc View 1 2 3 8 chunks +51 lines, -112 lines 1 comment Download
M chrome/browser/worker_host/worker_document_set.h View 1 2 3 2 chunks +21 lines, -20 lines 0 comments Download
M chrome/browser/worker_host/worker_document_set.cc View 1 2 3 3 chunks +19 lines, -16 lines 0 comments Download
A chrome/browser/worker_host/worker_message_filter.h View 1 2 3 1 chunk +62 lines, -0 lines 0 comments Download
A chrome/browser/worker_host/worker_message_filter.cc View 1 1 chunk +116 lines, -0 lines 0 comments Download
M chrome/browser/worker_host/worker_process_host.h View 1 2 3 5 chunks +47 lines, -68 lines 0 comments Download
M chrome/browser/worker_host/worker_process_host.cc View 1 2 3 16 chunks +133 lines, -219 lines 0 comments Download
M chrome/browser/worker_host/worker_service.h View 1 2 3 4 chunks +32 lines, -85 lines 0 comments Download
M chrome/browser/worker_host/worker_service.cc View 1 2 3 11 chunks +239 lines, -270 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/common/notification_type.h View 1 2 3 1 chunk +0 lines, -10 lines 0 comments Download
M chrome/common/worker_messages_internal.h View 1 2 3 1 chunk +7 lines, -6 lines 0 comments Download
M chrome_frame/chrome_frame_automation.cc View 1 2 3 6 chunks +6 lines, -6 lines 0 comments Download
M ipc/ipc_message.h View 1 2 3 1 chunk +10 lines, -8 lines 0 comments Download
M ipc/ipc_message_macros.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_message_utils.h View 1 2 3 8 chunks +15 lines, -15 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
jam
10 years ago (2010-12-20 06:31:37 UTC) #1
Andrew T Wilson (Slow)
Sorry this took so long - there were some routines rearranged in some files, and ...
10 years ago (2010-12-21 03:12:21 UTC) #2
jam
http://codereview.chromium.org/6055002/diff/77001/chrome/browser/renderer_host/resource_request_details.cc File chrome/browser/renderer_host/resource_request_details.cc (right): http://codereview.chromium.org/6055002/diff/77001/chrome/browser/renderer_host/resource_request_details.cc#newcode36 chrome/browser/renderer_host/resource_request_details.cc:36: info->child_id(), &origin_child_id_, &temp)) { On 2010/12/21 03:12:21, Andrew T ...
10 years ago (2010-12-21 07:41:51 UTC) #3
Andrew T Wilson (Slow)
10 years ago (2010-12-21 19:28:22 UTC) #4
LGTM. One nit below, but I don't want to hold up this patch, so I'll tackle it
in a followon patch.

Thanks again for tackling this - the code is way cleaner now.

http://codereview.chromium.org/6055002/diff/53003/chrome/browser/worker_host/...
File chrome/browser/worker_host/message_port_service.cc (right):

http://codereview.chromium.org/6055002/diff/53003/chrome/browser/worker_host/...
chrome/browser/worker_host/message_port_service.cc:148: } else if
(entangled_port.filter) {  // TODO: can filter ever be NULL?
Rather than leave this as a TODO, can we make it:

} else {
  if (!entangled_port.filter) {
    NOTREACHED();
    return;
  }
  ...

It seems bad to just drop messages on the floor, and if we're asserting that
this can't happen, lets actually add some EC code to test this case.

Powered by Google App Engine
This is Rietveld 408576698