| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // The worker was terminated before the thread had a chance to run.
Since the context didn't exist yet, | 118 // The worker was terminated before the thread had a chance to run.
Since the context didn't exist yet, |
| 119 // forbidExecution() couldn't be called from stop(). | 119 // forbidExecution() couldn't be called from stop(). |
| 120 m_workerGlobalScope->script()->forbidExecution(); | 120 m_workerGlobalScope->script()->forbidExecution(); |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 // The corresponding call to didStopWorkerRunLoop is in | 123 // The corresponding call to didStopWorkerRunLoop is in |
| 124 // ~WorkerScriptController. | 124 // ~WorkerScriptController. |
| 125 blink::Platform::current()->didStartWorkerRunLoop(blink::WebWorkerRunLoop(&m
_runLoop)); | 125 blink::Platform::current()->didStartWorkerRunLoop(blink::WebWorkerRunLoop(&m
_runLoop)); |
| 126 | 126 |
| 127 // Notify proxy that a new WorkerGlobalScope has been created and started. | 127 // Notify proxy that a new WorkerGlobalScope has been created and started. |
| 128 m_workerReportingProxy.workerGlobalScopeStarted(); | 128 m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get()); |
| 129 | 129 |
| 130 WorkerScriptController* script = m_workerGlobalScope->script(); | 130 WorkerScriptController* script = m_workerGlobalScope->script(); |
| 131 InspectorInstrumentation::willEvaluateWorkerScript(workerGlobalScope(), star
tMode); | 131 InspectorInstrumentation::willEvaluateWorkerScript(workerGlobalScope(), star
tMode); |
| 132 script->evaluate(ScriptSourceCode(sourceCode, scriptURL)); | 132 script->evaluate(ScriptSourceCode(sourceCode, scriptURL)); |
| 133 | 133 |
| 134 runEventLoop(); | 134 runEventLoop(); |
| 135 | 135 |
| 136 ThreadIdentifier threadID = m_threadID; | 136 ThreadIdentifier threadID = m_threadID; |
| 137 | 137 |
| 138 ASSERT(m_workerGlobalScope->hasOneRef()); | 138 ASSERT(m_workerGlobalScope->hasOneRef()); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 void WorkerThread::releaseFastMallocFreeMemoryInAllThreads() | 239 void WorkerThread::releaseFastMallocFreeMemoryInAllThreads() |
| 240 { | 240 { |
| 241 MutexLocker lock(threadSetMutex()); | 241 MutexLocker lock(threadSetMutex()); |
| 242 HashSet<WorkerThread*>& threads = workerThreads(); | 242 HashSet<WorkerThread*>& threads = workerThreads(); |
| 243 HashSet<WorkerThread*>::iterator end = threads.end(); | 243 HashSet<WorkerThread*>::iterator end = threads.end(); |
| 244 for (HashSet<WorkerThread*>::iterator it = threads.begin(); it != end; ++it) | 244 for (HashSet<WorkerThread*>::iterator it = threads.begin(); it != end; ++it) |
| 245 (*it)->runLoop().postTask(adoptPtr(new ReleaseFastMallocFreeMemoryTask))
; | 245 (*it)->runLoop().postTask(adoptPtr(new ReleaseFastMallocFreeMemoryTask))
; |
| 246 } | 246 } |
| 247 | 247 |
| 248 } // namespace WebCore | 248 } // namespace WebCore |
| OLD | NEW |