OLD | NEW |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 virtual void willProcessTask() override | 70 virtual void willProcessTask() override |
71 { | 71 { |
72 // No tasks should get executed after we have closed. | 72 // No tasks should get executed after we have closed. |
73 WorkerGlobalScope* globalScope = m_workerThread->workerGlobalScope(); | 73 WorkerGlobalScope* globalScope = m_workerThread->workerGlobalScope(); |
74 ASSERT_UNUSED(globalScope, !globalScope || !globalScope->isClosing()); | 74 ASSERT_UNUSED(globalScope, !globalScope || !globalScope->isClosing()); |
75 } | 75 } |
76 | 76 |
77 virtual void didProcessTask() override | 77 virtual void didProcessTask() override |
78 { | 78 { |
79 Microtask::performCheckpoint(); | 79 Microtask::performCheckpoint(m_workerThread->isolate()); |
80 if (WorkerGlobalScope* globalScope = m_workerThread->workerGlobalScope()
) { | 80 if (WorkerGlobalScope* globalScope = m_workerThread->workerGlobalScope()
) { |
81 if (WorkerScriptController* scriptController = globalScope->script()
) | 81 if (WorkerScriptController* scriptController = globalScope->script()
) |
82 scriptController->rejectedPromises()->processQueue(); | 82 scriptController->rejectedPromises()->processQueue(); |
83 if (globalScope->isClosing()) { | 83 if (globalScope->isClosing()) { |
84 m_workerThread->workerReportingProxy().workerGlobalScopeClosed()
; | 84 m_workerThread->workerReportingProxy().workerGlobalScopeClosed()
; |
85 m_workerThread->shutdown(); | 85 m_workerThread->shutdown(); |
86 } | 86 } |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); | 580 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); |
581 } | 581 } |
582 | 582 |
583 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) | 583 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) |
584 { | 584 { |
585 MutexLocker locker(m_workerInspectorControllerMutex); | 585 MutexLocker locker(m_workerInspectorControllerMutex); |
586 m_workerInspectorController = workerInspectorController; | 586 m_workerInspectorController = workerInspectorController; |
587 } | 587 } |
588 | 588 |
589 } // namespace blink | 589 } // namespace blink |
OLD | NEW |