Commit 9a7108cd authored by Kouhei Ueno's avatar Kouhei Ueno Committed by Commit Bot

Remove Document::execute_scripts_waiting_for_resources_task_handle_

The task handle is never cancelled, so it can be replaced w/ a simple PostTask.
The task lifetime is managed by weakPersistent anyways.

Bug: None
Change-Id: I191c9cad4982c42ba5d0177d1464d32b31bc2354
Reviewed-on: https://chromium-review.googlesource.com/571110Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486726}
parent e4584af3
...@@ -3700,12 +3700,10 @@ void Document::DidRemoveAllPendingBodyStylesheets() { ...@@ -3700,12 +3700,10 @@ void Document::DidRemoveAllPendingBodyStylesheets() {
void Document::DidLoadAllScriptBlockingResources() { void Document::DidLoadAllScriptBlockingResources() {
// Use wrapWeakPersistent because the task should not keep this Document alive // Use wrapWeakPersistent because the task should not keep this Document alive
// just for executing scripts. // just for executing scripts.
execute_scripts_waiting_for_resources_task_handle_ = TaskRunnerHelper::Get(TaskType::kNetworking, this)
TaskRunnerHelper::Get(TaskType::kNetworking, this) ->PostTask(BLINK_FROM_HERE,
->PostCancellableTask( WTF::Bind(&Document::ExecuteScriptsWaitingForResources,
BLINK_FROM_HERE, WrapWeakPersistent(this)));
WTF::Bind(&Document::ExecuteScriptsWaitingForResources,
WrapWeakPersistent(this)));
if (IsHTMLDocument() && body()) { if (IsHTMLDocument() && body()) {
// For HTML if we have no more stylesheets to load and we're past the body // For HTML if we have no more stylesheets to load and we're past the body
......
...@@ -1497,8 +1497,6 @@ class CORE_EXPORT Document : public ContainerNode, ...@@ -1497,8 +1497,6 @@ class CORE_EXPORT Document : public ContainerNode,
// This is cheaper than making setCompatibilityMode virtual. // This is cheaper than making setCompatibilityMode virtual.
bool compatibility_mode_locked_; bool compatibility_mode_locked_;
TaskHandle execute_scripts_waiting_for_resources_task_handle_;
bool has_autofocused_; bool has_autofocused_;
TaskRunnerTimer<Document> clear_focused_element_timer_; TaskRunnerTimer<Document> clear_focused_element_timer_;
Member<Element> autofocus_element_; Member<Element> autofocus_element_;
......
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