Commit dce56180 authored by fdoray's avatar fdoray Committed by Commit bot

Revert of Remove calls to MessageLoop::current() in ios. (patchset #1 id:1 of...

Revert of Remove calls to MessageLoop::current() in ios. (patchset #1 id:1 of https://codereview.chromium.org/2079423002/ )

Reason for revert:
This causes crashes during browser startup.

Original issue's description:
> Remove calls to MessageLoop::current() in ios.
>
> Why?
> The fact that there's a MessageLoop on the thread is an
> unnecessary implementation detail. When browser threads
> are migrated to base/task_scheduler, tasks will no longer
> have access to a MessageLoop.
>
> These changes were generated manually.
>
> BUG=616447
> R=droger@chromium.org
>
> Committed: https://crrev.com/c5c127abb5f0d8ba0dd34cfbd6233bbf9209f0f2
> Cr-Commit-Position: refs/heads/master@{#401027}

TBR=sdefresne@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=616447

Review-Url: https://codereview.chromium.org/2326053002
Cr-Commit-Position: refs/heads/master@{#417583}
parent f3ebdac0
...@@ -377,7 +377,8 @@ bool WebThread::CurrentlyOn(ID identifier) { ...@@ -377,7 +377,8 @@ bool WebThread::CurrentlyOn(ID identifier) {
base::AutoLock lock(globals.lock); base::AutoLock lock(globals.lock);
DCHECK(identifier >= 0 && identifier < ID_COUNT); DCHECK(identifier >= 0 && identifier < ID_COUNT);
return globals.threads[identifier] && return globals.threads[identifier] &&
globals.threads[identifier]->task_runner()->BelongsToCurrentThread(); globals.threads[identifier]->message_loop() ==
base::MessageLoop::current();
} }
// static // static
......
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