Commit 8cc2d519 authored by Hajime Hoshi's avatar Hajime Hoshi Committed by Commit Bot

Use per-frame task runners for Notification mojo binding

This might invoke V8, and V8 should not be executed on per-thread task
runners. This CL gives a per-frame task runner at binding.

Bug: 870606
Change-Id: Ib814c717e2805beca341a6ad1a10926b231c361f
Reviewed-on: https://chromium-review.googlesource.com/c/1343878Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609945}
parent 5f0bdf0b
......@@ -192,7 +192,10 @@ void Notification::DidLoadResources(NotificationResourcesLoader* loader) {
mojom::blink::NonPersistentNotificationListenerPtr event_listener;
listener_binding_.Bind(mojo::MakeRequest(&event_listener));
scoped_refptr<base::SingleThreadTaskRunner> task_runner =
GetExecutionContext()->GetTaskRunner(blink::TaskType::kInternalDefault);
listener_binding_.Bind(mojo::MakeRequest(&event_listener, task_runner),
task_runner);
NotificationManager::From(GetExecutionContext())
->DisplayNonPersistentNotification(token_, data_->Clone(),
......
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