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

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

Issue 1898653002: Asserts tripped by failing to defer loading. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 void MainThreadTaskRunner::suspend() 86 void MainThreadTaskRunner::suspend()
87 { 87 {
88 DCHECK(!m_suspended); 88 DCHECK(!m_suspended);
89 m_pendingTasksTimer.stop(); 89 m_pendingTasksTimer.stop();
90 m_suspended = true; 90 m_suspended = true;
91 } 91 }
92 92
93 void MainThreadTaskRunner::resume() 93 void MainThreadTaskRunner::resume()
94 { 94 {
95 DCHECK(m_suspended); 95 // DCHECK(m_suspended);
96 if (!m_pendingTasks.isEmpty()) 96 if (!m_pendingTasks.isEmpty())
97 m_pendingTasksTimer.startOneShot(0, BLINK_FROM_HERE); 97 m_pendingTasksTimer.startOneShot(0, BLINK_FROM_HERE);
98 98
99 m_suspended = false; 99 m_suspended = false;
100 } 100 }
101 101
102 void MainThreadTaskRunner::pendingTasksTimerFired(Timer<MainThreadTaskRunner>*) 102 void MainThreadTaskRunner::pendingTasksTimerFired(Timer<MainThreadTaskRunner>*)
103 { 103 {
104 while (!m_pendingTasks.isEmpty()) { 104 while (!m_pendingTasks.isEmpty()) {
105 OwnPtr<ExecutionContextTask> task = m_pendingTasks[0].release(); 105 OwnPtr<ExecutionContextTask> task = m_pendingTasks[0].release();
106 m_pendingTasks.remove(0); 106 m_pendingTasks.remove(0);
107 const bool instrumenting = !task->taskNameForInstrumentation().isEmpty() ; 107 const bool instrumenting = !task->taskNameForInstrumentation().isEmpty() ;
108 InspectorInstrumentation::AsyncTask asyncTask(m_context, task.get(), ins trumenting); 108 InspectorInstrumentation::AsyncTask asyncTask(m_context, task.get(), ins trumenting);
109 task->performTask(m_context); 109 task->performTask(m_context);
110 } 110 }
111 } 111 }
112 112
113 } // namespace blink 113 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ExecutionContext.cpp ('k') | third_party/WebKit/Source/core/dom/ScriptRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698