| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(m_workerGlobalScope.get()); | 128 m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get()); |
| 129 | 129 |
| 130 WorkerScriptController* script = m_workerGlobalScope->script(); | 130 WorkerScriptController* script = m_workerGlobalScope->script(); |
| 131 if (!script->isExecutionForbidden()) |
| 132 script->initializeContextIfNeeded(); |
| 131 InspectorInstrumentation::willEvaluateWorkerScript(workerGlobalScope(), star
tMode); | 133 InspectorInstrumentation::willEvaluateWorkerScript(workerGlobalScope(), star
tMode); |
| 132 script->evaluate(ScriptSourceCode(sourceCode, scriptURL)); | 134 script->evaluate(ScriptSourceCode(sourceCode, scriptURL)); |
| 133 | 135 |
| 134 runEventLoop(); | 136 runEventLoop(); |
| 135 | 137 |
| 136 // This should be called before we start the shutdown procedure. | 138 // This should be called before we start the shutdown procedure. |
| 137 workerReportingProxy().willDestroyWorkerGlobalScope(); | 139 workerReportingProxy().willDestroyWorkerGlobalScope(); |
| 138 | 140 |
| 139 ThreadIdentifier threadID = m_threadID; | 141 ThreadIdentifier threadID = m_threadID; |
| 140 | 142 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 240 } |
| 239 m_runLoop.terminate(); | 241 m_runLoop.terminate(); |
| 240 } | 242 } |
| 241 | 243 |
| 242 bool WorkerThread::isCurrentThread() const | 244 bool WorkerThread::isCurrentThread() const |
| 243 { | 245 { |
| 244 return m_threadID == currentThread(); | 246 return m_threadID == currentThread(); |
| 245 } | 247 } |
| 246 | 248 |
| 247 } // namespace WebCore | 249 } // namespace WebCore |
| OLD | NEW |