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