Commit 14052f32 authored by Istiaque Ahmed's avatar Istiaque Ahmed Committed by Commit Bot

Remove incorrect thread restriction on ExtensionSWMessageFilter dtor.

ExtensionServiceWorkerMessageFilter is constructed on UI and it
*often* gets destroyed in IO thread, but there is no such gurantee.
It is possible for it to be destroyed on UI thread as it also handles
handful of messages on UI thread.

Remove the IO thread restriction, also add DCHECK in constructor.

Bug: None
Change-Id: I15ec9ecd347c44a8fc8fdea031f72b27689190b2
Reviewed-on: https://chromium-review.googlesource.com/1231695Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592218}
parent 6a583199
......@@ -22,12 +22,12 @@ ExtensionServiceWorkerMessageFilter::ExtensionServiceWorkerMessageFilter(
browser_context_(context),
render_process_id_(render_process_id),
service_worker_context_(service_worker_context),
dispatcher_(new ExtensionFunctionDispatcher(context)) {}
ExtensionServiceWorkerMessageFilter::~ExtensionServiceWorkerMessageFilter() {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
dispatcher_(new ExtensionFunctionDispatcher(context)) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}
ExtensionServiceWorkerMessageFilter::~ExtensionServiceWorkerMessageFilter() {}
void ExtensionServiceWorkerMessageFilter::OverrideThreadForMessage(
const IPC::Message& message,
content::BrowserThread::ID* thread) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment