| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 didStartRunLoop(); | 239 didStartRunLoop(); |
| 240 | 240 |
| 241 // Notify proxy that a new WorkerGlobalScope has been created and started. | 241 // Notify proxy that a new WorkerGlobalScope has been created and started. |
| 242 m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get()); | 242 m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get()); |
| 243 | 243 |
| 244 WorkerScriptController* script = m_workerGlobalScope->script(); | 244 WorkerScriptController* script = m_workerGlobalScope->script(); |
| 245 if (!script->isExecutionForbidden()) | 245 if (!script->isExecutionForbidden()) |
| 246 script->initializeContextIfNeeded(); | 246 script->initializeContextIfNeeded(); |
| 247 m_workerGlobalScope->workerInspectorController()->workerContextInitialized(s
tartMode == PauseWorkerGlobalScopeOnStart); | 247 m_workerGlobalScope->workerInspectorController()->workerContextInitialized(s
tartMode == PauseWorkerGlobalScopeOnStart); |
| 248 | 248 |
| 249 OwnPtr<CachedMetadataHandler> handler(workerGlobalScope()->createWorkerScrip
tCachedMetadataHandler(scriptURL, cachedMetaData.get())); | 249 OwnPtrWillBeRawPtr<CachedMetadataHandler> handler(workerGlobalScope()->creat
eWorkerScriptCachedMetadataHandler(scriptURL, cachedMetaData.get())); |
| 250 bool success = script->evaluate(ScriptSourceCode(sourceCode, scriptURL), nul
lptr, handler.get(), v8CacheOptions); | 250 bool success = script->evaluate(ScriptSourceCode(sourceCode, scriptURL), nul
lptr, handler.get(), v8CacheOptions); |
| 251 m_workerGlobalScope->didEvaluateWorkerScript(); | 251 m_workerGlobalScope->didEvaluateWorkerScript(); |
| 252 m_workerReportingProxy.didEvaluateWorkerScript(success); | 252 m_workerReportingProxy.didEvaluateWorkerScript(success); |
| 253 | 253 |
| 254 postInitialize(); | 254 postInitialize(); |
| 255 | 255 |
| 256 m_webScheduler->postIdleTaskAfterWakeup(FROM_HERE, WTF::bind<double>(&Worker
Thread::performIdleWork, this)); | 256 m_webScheduler->postIdleTaskAfterWakeup(FROM_HERE, WTF::bind<double>(&Worker
Thread::performIdleWork, this)); |
| 257 } | 257 } |
| 258 | 258 |
| 259 void WorkerThread::shutdown() | 259 void WorkerThread::shutdown() |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); | 499 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); |
| 500 } | 500 } |
| 501 | 501 |
| 502 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) | 502 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) |
| 503 { | 503 { |
| 504 MutexLocker locker(m_workerInspectorControllerMutex); | 504 MutexLocker locker(m_workerInspectorControllerMutex); |
| 505 m_workerInspectorController = workerInspectorController; | 505 m_workerInspectorController = workerInspectorController; |
| 506 } | 506 } |
| 507 | 507 |
| 508 } // namespace blink | 508 } // namespace blink |
| OLD | NEW |