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

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

Issue 1305453003: Fix data race in blink::WorkerMessagingProxy::reportException (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« no previous file with comments | « Source/core/workers/WorkerThread.h ('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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 SafePointScope safePointScope(ThreadState::HeapPointersOnStack); 314 SafePointScope safePointScope(ThreadState::HeapPointersOnStack);
315 terminateInternal(); 315 terminateInternal();
316 } 316 }
317 317
318 void WorkerThread::terminateAndWait() 318 void WorkerThread::terminateAndWait()
319 { 319 {
320 terminate(); 320 terminate();
321 m_terminationEvent->wait(); 321 m_terminationEvent->wait();
322 } 322 }
323 323
324 WorkerGlobalScope* WorkerThread::workerGlobalScope()
325 {
326 ASSERT(isCurrentThread());
327 return m_workerGlobalScope.get();
328 }
329
324 bool WorkerThread::terminated() 330 bool WorkerThread::terminated()
325 { 331 {
326 MutexLocker lock(m_threadStateMutex); 332 MutexLocker lock(m_threadStateMutex);
327 return m_terminated; 333 return m_terminated;
328 } 334 }
329 335
330 void WorkerThread::terminateInternal() 336 void WorkerThread::terminateInternal()
331 { 337 {
332 ASSERT(isMainThread()); 338 ASSERT(isMainThread());
333 339
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); 517 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get());
512 } 518 }
513 519
514 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController) 520 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController)
515 { 521 {
516 MutexLocker locker(m_workerInspectorControllerMutex); 522 MutexLocker locker(m_workerInspectorControllerMutex);
517 m_workerInspectorController = workerInspectorController; 523 m_workerInspectorController = workerInspectorController;
518 } 524 }
519 525
520 } // namespace blink 526 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698