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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
248 WorkerScriptController* script = m_workerGlobalScope->script(); | 248 WorkerScriptController* script = m_workerGlobalScope->script(); |
249 if (!script->isExecutionForbidden()) | 249 if (!script->isExecutionForbidden()) |
250 script->initializeContextIfNeeded(); | 250 script->initializeContextIfNeeded(); |
251 m_workerGlobalScope->workerInspectorController()->workerContextInitialized(s tartMode == PauseWorkerGlobalScopeOnStart); | 251 m_workerGlobalScope->workerInspectorController()->workerContextInitialized(s tartMode == PauseWorkerGlobalScopeOnStart); |
252 | 252 |
253 OwnPtrWillBeRawPtr<CachedMetadataHandler> handler(workerGlobalScope()->creat eWorkerScriptCachedMetadataHandler(scriptURL, cachedMetaData.get())); | 253 OwnPtrWillBeRawPtr<CachedMetadataHandler> handler(workerGlobalScope()->creat eWorkerScriptCachedMetadataHandler(scriptURL, cachedMetaData.get())); |
254 bool success = script->evaluate(ScriptSourceCode(sourceCode, scriptURL), nul lptr, handler.get(), v8CacheOptions); | 254 bool success = script->evaluate(ScriptSourceCode(sourceCode, scriptURL), nul lptr, handler.get(), v8CacheOptions); |
255 m_workerGlobalScope->didEvaluateWorkerScript(); | 255 m_workerGlobalScope->didEvaluateWorkerScript(); |
256 m_workerReportingProxy.didEvaluateWorkerScript(success); | 256 m_workerReportingProxy.didEvaluateWorkerScript(success); |
257 | 257 |
258 ScriptState::Scope scope(script->scriptState()); | |
259 m_workerReportingProxy.didInitializeWorkerContext(script->context()); | |
falken
2015/08/03 01:55:14
It seems to make sense to call didInitializeWorker
| |
260 | |
258 postInitialize(); | 261 postInitialize(); |
259 | 262 |
260 m_webScheduler->postIdleTaskAfterWakeup(FROM_HERE, WTF::bind<double>(&Worker Thread::performIdleWork, this)); | 263 m_webScheduler->postIdleTaskAfterWakeup(FROM_HERE, WTF::bind<double>(&Worker Thread::performIdleWork, this)); |
261 } | 264 } |
262 | 265 |
263 void WorkerThread::shutdown() | 266 void WorkerThread::shutdown() |
264 { | 267 { |
265 ASSERT(isCurrentThread()); | 268 ASSERT(isCurrentThread()); |
266 { | 269 { |
267 MutexLocker lock(m_threadStateMutex); | 270 MutexLocker lock(m_threadStateMutex); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
507 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); | 510 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); |
508 } | 511 } |
509 | 512 |
510 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController) | 513 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController) |
511 { | 514 { |
512 MutexLocker locker(m_workerInspectorControllerMutex); | 515 MutexLocker locker(m_workerInspectorControllerMutex); |
513 m_workerInspectorController = workerInspectorController; | 516 m_workerInspectorController = workerInspectorController; |
514 } | 517 } |
515 | 518 |
516 } // namespace blink | 519 } // namespace blink |
OLD | NEW |