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

Side by Side Diff: Source/WebCore/workers/WorkerThread.cpp

Issue 12096050: Merge 140483 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « Source/WebCore/workers/WorkerRunLoop.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // Mutex protection is necessary because stop() can be called before the con text is fully created. 260 // Mutex protection is necessary because stop() can be called before the con text is fully created.
261 MutexLocker lock(m_threadCreationMutex); 261 MutexLocker lock(m_threadCreationMutex);
262 262
263 // Ensure that tasks are being handled by thread event loop. If script execu tion weren't forbidden, a while(1) loop in JS could keep the thread alive foreve r. 263 // Ensure that tasks are being handled by thread event loop. If script execu tion weren't forbidden, a while(1) loop in JS could keep the thread alive foreve r.
264 if (m_workerContext) { 264 if (m_workerContext) {
265 m_workerContext->script()->scheduleExecutionTermination(); 265 m_workerContext->script()->scheduleExecutionTermination();
266 266
267 #if ENABLE(SQL_DATABASE) 267 #if ENABLE(SQL_DATABASE)
268 DatabaseManager::manager().interruptAllDatabasesForContext(m_workerConte xt.get()); 268 DatabaseManager::manager().interruptAllDatabasesForContext(m_workerConte xt.get());
269 #endif 269 #endif
270 m_runLoop.postTask(WorkerThreadShutdownStartTask::create()); 270 m_runLoop.postTaskAndTerminate(WorkerThreadShutdownStartTask::create());
271 return;
271 } 272 }
272 m_runLoop.terminate(); 273 m_runLoop.terminate();
273 } 274 }
274 275
275 } // namespace WebCore 276 } // namespace WebCore
276 277
277 #endif // ENABLE(WORKERS) 278 #endif // ENABLE(WORKERS)
OLDNEW
« no previous file with comments | « Source/WebCore/workers/WorkerRunLoop.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698