~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebCore/workers/WorkerRunLoop.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-02-04 19:30:57 UTC
  • mfrom: (1.2.8 upstream) (4.3.9 sid)
  • Revision ID: james.westby@ubuntu.com-20100204193057-d3018lm1fipb0703
* New upstream release
* debian/copyright:
- Updated with changes since 1.1.19.

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
    MessageQueueWaitResult result;
153
153
    OwnPtr<WorkerRunLoop::Task> task = m_messageQueue.waitForMessageFilteredWithTimeout(result, predicate, absoluteTime);
154
154
 
155
 
    // If the context is closing, don't dispatch any further tasks (per section 4.1.1 of the Web Workers spec).
156
 
    if (context->isClosing())
157
 
        return result;
 
155
    // If the context is closing, don't execute any further JavaScript tasks (per section 4.1.1 of the Web Workers spec).  However, there may be implementation cleanup tasks in the queue, so keep running through it.
158
156
 
159
157
    switch (result) {
160
158
    case MessageQueueTerminated:
165
163
        break;
166
164
 
167
165
    case MessageQueueTimeout:
168
 
        m_sharedTimer->fire();
 
166
        if (!context->isClosing())
 
167
            m_sharedTimer->fire();
169
168
        break;
170
169
    }
171
170
 
194
193
 
195
194
void WorkerRunLoop::Task::performTask(ScriptExecutionContext* context)
196
195
{
197
 
    m_task->performTask(context);
 
196
    WorkerContext* workerContext = static_cast<WorkerContext *>(context);
 
197
    if (!workerContext->isClosing() || m_task->isCleanupTask())
 
198
        m_task->performTask(context);
198
199
}
199
200
 
200
201
WorkerRunLoop::Task::Task(PassOwnPtr<ScriptExecutionContext::Task> task, const String& mode)