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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 // ~WorkerScriptController. | 313 // ~WorkerScriptController. |
314 blink::Platform::current()->didStartWorkerRunLoop(blink::WebWorkerRunLoop(th
is)); | 314 blink::Platform::current()->didStartWorkerRunLoop(blink::WebWorkerRunLoop(th
is)); |
315 | 315 |
316 // Notify proxy that a new WorkerGlobalScope has been created and started. | 316 // Notify proxy that a new WorkerGlobalScope has been created and started. |
317 m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get()); | 317 m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get()); |
318 | 318 |
319 WorkerScriptController* script = m_workerGlobalScope->script(); | 319 WorkerScriptController* script = m_workerGlobalScope->script(); |
320 if (!script->isExecutionForbidden()) | 320 if (!script->isExecutionForbidden()) |
321 script->initializeContextIfNeeded(); | 321 script->initializeContextIfNeeded(); |
322 InspectorInstrumentation::willEvaluateWorkerScript(workerGlobalScope(), star
tMode); | 322 InspectorInstrumentation::willEvaluateWorkerScript(workerGlobalScope(), star
tMode); |
323 script->evaluate(ScriptSourceCode(sourceCode, scriptURL)); | 323 bool success = script->evaluate(ScriptSourceCode(sourceCode, scriptURL)); |
324 m_workerGlobalScope->didEvaluateWorkerScript(); | 324 m_workerGlobalScope->didEvaluateWorkerScript(); |
| 325 m_workerReportingProxy.didEvaluateWorkerScript(success); |
325 | 326 |
326 postInitialize(); | 327 postInitialize(); |
327 | 328 |
328 postDelayedTask(createSameThreadTask(&WorkerThread::idleHandler, this), kSho
rtIdleHandlerDelayMs); | 329 postDelayedTask(createSameThreadTask(&WorkerThread::idleHandler, this), kSho
rtIdleHandlerDelayMs); |
329 } | 330 } |
330 | 331 |
331 void WorkerThread::cleanup() | 332 void WorkerThread::cleanup() |
332 { | 333 { |
333 | 334 |
334 // This should be called before we start the shutdown procedure. | 335 // This should be called before we start the shutdown procedure. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); | 527 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); |
527 } | 528 } |
528 | 529 |
529 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) | 530 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) |
530 { | 531 { |
531 MutexLocker locker(m_workerInspectorControllerMutex); | 532 MutexLocker locker(m_workerInspectorControllerMutex); |
532 m_workerInspectorController = workerInspectorController; | 533 m_workerInspectorController = workerInspectorController; |
533 } | 534 } |
534 | 535 |
535 } // namespace blink | 536 } // namespace blink |
OLD | NEW |