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