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

Side by Side Diff: Source/core/dom/MainThreadTaskRunner.cpp

Issue 1296243004: Oilpan: Move MainThreadTaskRunner into Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All Rights Reserved. 2 * Copyright (C) 2013 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 , m_weakFactory(this) 67 , m_weakFactory(this)
68 , m_pendingTasksTimer(this, &MainThreadTaskRunner::pendingTasksTimerFired) 68 , m_pendingTasksTimer(this, &MainThreadTaskRunner::pendingTasksTimerFired)
69 , m_suspended(false) 69 , m_suspended(false)
70 { 70 {
71 } 71 }
72 72
73 MainThreadTaskRunner::~MainThreadTaskRunner() 73 MainThreadTaskRunner::~MainThreadTaskRunner()
74 { 74 {
75 } 75 }
76 76
77 DEFINE_TRACE(MainThreadTaskRunner)
78 {
79 visitor->trace(m_context);
80 }
81
77 void MainThreadTaskRunner::postTask(const WebTraceLocation& location, PassOwnPtr <ExecutionContextTask> task) 82 void MainThreadTaskRunner::postTask(const WebTraceLocation& location, PassOwnPtr <ExecutionContextTask> task)
78 { 83 {
79 if (!task->taskNameForInstrumentation().isEmpty()) 84 if (!task->taskNameForInstrumentation().isEmpty())
80 InspectorInstrumentation::didPostExecutionContextTask(m_context, task.ge t()); 85 InspectorInstrumentation::didPostExecutionContextTask(m_context, task.ge t());
81 Platform::current()->mainThread()->postTask(location, new MainThreadTask(m_w eakFactory.createWeakPtr(), task, false)); 86 Platform::current()->mainThread()->postTask(location, new MainThreadTask(m_w eakFactory.createWeakPtr(), task, false));
82 } 87 }
83 88
84 void MainThreadTaskRunner::postInspectorTask(const WebTraceLocation& location, P assOwnPtr<ExecutionContextTask> task) 89 void MainThreadTaskRunner::postInspectorTask(const WebTraceLocation& location, P assOwnPtr<ExecutionContextTask> task)
85 { 90 {
86 Platform::current()->mainThread()->postTask(location, new MainThreadTask(m_w eakFactory.createWeakPtr(), task, true)); 91 Platform::current()->mainThread()->postTask(location, new MainThreadTask(m_w eakFactory.createWeakPtr(), task, true));
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 const bool instrumenting = !task->taskNameForInstrumentation().isEmpty() ; 130 const bool instrumenting = !task->taskNameForInstrumentation().isEmpty() ;
126 if (instrumenting) 131 if (instrumenting)
127 InspectorInstrumentation::willPerformExecutionContextTask(m_context, task.get()); 132 InspectorInstrumentation::willPerformExecutionContextTask(m_context, task.get());
128 task->performTask(m_context); 133 task->performTask(m_context);
129 if (instrumenting) 134 if (instrumenting)
130 InspectorInstrumentation::didPerformExecutionContextTask(m_context); 135 InspectorInstrumentation::didPerformExecutionContextTask(m_context);
131 } 136 }
132 } 137 }
133 138
134 } // namespace 139 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698