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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 | 520 |
521 WorkerThread::TaskQueueResult WorkerThread::runDebuggerTask(WaitMode waitMode) | 521 WorkerThread::TaskQueueResult WorkerThread::runDebuggerTask(WaitMode waitMode) |
522 { | 522 { |
523 ASSERT(isCurrentThread()); | 523 ASSERT(isCurrentThread()); |
524 TaskQueueResult result; | 524 TaskQueueResult result; |
525 double absoluteTime = DebuggerTaskQueue::infiniteTime(); | 525 double absoluteTime = DebuggerTaskQueue::infiniteTime(); |
526 OwnPtr<WebTaskRunner::Task> task; | 526 OwnPtr<WebTaskRunner::Task> task; |
527 { | 527 { |
528 if (waitMode == DontWaitForTask) | 528 if (waitMode == DontWaitForTask) |
529 absoluteTime = 0.0; | 529 absoluteTime = 0.0; |
530 SafePointScope safePointScope(BlinkGC::NoHeapPointersOnStack); | 530 SafePointScope safePointScope(BlinkGC::HeapPointersOnStack); |
531 task = m_debuggerTaskQueue->waitWithTimeout(result, absoluteTime); | 531 task = m_debuggerTaskQueue->waitWithTimeout(result, absoluteTime); |
532 } | 532 } |
533 | 533 |
534 if (result == TaskReceived) { | 534 if (result == TaskReceived) { |
535 InspectorInstrumentation::willProcessTask(workerGlobalScope()); | 535 InspectorInstrumentation::willProcessTask(workerGlobalScope()); |
536 task->run(); | 536 task->run(); |
537 InspectorInstrumentation::didProcessTask(workerGlobalScope()); | 537 InspectorInstrumentation::didProcessTask(workerGlobalScope()); |
538 } | 538 } |
539 | 539 |
540 return result; | 540 return result; |
541 } | 541 } |
542 | 542 |
543 void WorkerThread::willRunDebuggerTasks() | 543 void WorkerThread::willRunDebuggerTasks() |
544 { | 544 { |
545 InspectorInstrumentation::willEnterNestedRunLoop(m_workerGlobalScope.get()); | 545 InspectorInstrumentation::willEnterNestedRunLoop(m_workerGlobalScope.get()); |
546 } | 546 } |
547 | 547 |
548 void WorkerThread::didRunDebuggerTasks() | 548 void WorkerThread::didRunDebuggerTasks() |
549 { | 549 { |
550 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); | 550 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); |
551 } | 551 } |
552 | 552 |
553 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) | 553 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) |
554 { | 554 { |
555 MutexLocker locker(m_workerInspectorControllerMutex); | 555 MutexLocker locker(m_workerInspectorControllerMutex); |
556 m_workerInspectorController = workerInspectorController; | 556 m_workerInspectorController = workerInspectorController; |
557 } | 557 } |
558 | 558 |
559 } // namespace blink | 559 } // namespace blink |
OLD | NEW |