Commit 0bcc565d authored by Hajime Hoshi's avatar Hajime Hoshi Committed by Commit Bot

translate: Use a per-frame task runner at TranslateHelper

V8 must not be executed on the default task runner. This CL replaces
that with a per-frame task runner.

Bug: 870606
Change-Id: I9c3844692235baad411a83ed50a7c6402e0a3b8f
Reviewed-on: https://chromium-review.googlesource.com/c/1312444Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610007}
parent 06db5b4e
......@@ -134,7 +134,9 @@ void TranslateHelper::PageCaptured(const base::string16& contents) {
// captured, it should be treated as a new page to do translation.
ResetPage();
mojom::PagePtr page;
binding_.Bind(mojo::MakeRequest(&page));
binding_.Bind(
mojo::MakeRequest(&page),
main_frame->GetTaskRunner(blink::TaskType::kInternalTranslation));
GetTranslateHandler()->RegisterPage(
std::move(page), details, !details.has_notranslate && !language.empty());
}
......
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