Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2534803002: Move InspectorTask handling from MainThreadTaskRunner to Document (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 5720 matching lines...) Expand 10 before | Expand all | Expand 10 after
5731 } 5731 }
5732 5732
5733 // FIXME(crbug.com/305497): This should be removed after 5733 // FIXME(crbug.com/305497): This should be removed after
5734 // ExecutionContext-LocalDOMWindow migration. 5734 // ExecutionContext-LocalDOMWindow migration.
5735 void Document::postTask(const WebTraceLocation& location, 5735 void Document::postTask(const WebTraceLocation& location,
5736 std::unique_ptr<ExecutionContextTask> task, 5736 std::unique_ptr<ExecutionContextTask> task,
5737 const String& taskNameForInstrumentation) { 5737 const String& taskNameForInstrumentation) {
5738 m_taskRunner->postTask(location, std::move(task), taskNameForInstrumentation); 5738 m_taskRunner->postTask(location, std::move(task), taskNameForInstrumentation);
5739 } 5739 }
5740 5740
5741 void Document::postInspectorTask(const WebTraceLocation& location,
5742 std::unique_ptr<ExecutionContextTask> task) {
5743 m_taskRunner->postInspectorTask(location, std::move(task));
5744 }
5745
5746 void Document::tasksWereSuspended() { 5741 void Document::tasksWereSuspended() {
5747 scriptRunner()->suspend(); 5742 scriptRunner()->suspend();
5748 5743
5749 if (m_parser) 5744 if (m_parser)
5750 m_parser->suspendScheduledTasks(); 5745 m_parser->suspendScheduledTasks();
5751 if (m_scriptedAnimationController) 5746 if (m_scriptedAnimationController)
5752 m_scriptedAnimationController->suspend(); 5747 m_scriptedAnimationController->suspend();
5753 } 5748 }
5754 5749
5755 void Document::tasksWereResumed() { 5750 void Document::tasksWereResumed() {
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
6576 } 6571 }
6577 6572
6578 void showLiveDocumentInstances() { 6573 void showLiveDocumentInstances() {
6579 WeakDocumentSet& set = liveDocumentSet(); 6574 WeakDocumentSet& set = liveDocumentSet();
6580 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6575 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6581 for (Document* document : set) 6576 for (Document* document : set)
6582 fprintf(stderr, "- Document %p URL: %s\n", document, 6577 fprintf(stderr, "- Document %p URL: %s\n", document,
6583 document->url().getString().utf8().data()); 6578 document->url().getString().utf8().data());
6584 } 6579 }
6585 #endif 6580 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/MainThreadTaskRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698