~ubuntu-branches/ubuntu/karmic/webkit/karmic-proposed

« back to all changes in this revision

Viewing changes to WebCore/workers/WorkerThread.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-05-15 18:30:58 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090515183058-50q5exjo9b1kxy9s
Tags: 1.1.7-1
* New upstream release
* debian/libwebkit-1.0-2.symbols:
- updated with the new symbols in 1.1.7
* debian/libwebkit-dev.install, debian/libwebkit-dev.links,
  debian/rules:
- Build, and ship gtk-doc documentation (Closes: #526683)
* debian/copyright:
- updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
}
69
69
 
70
70
WorkerThread::WorkerThread(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerObjectProxy* workerObjectProxy)
71
 
    : m_threadID(0)
72
 
    , m_workerObjectProxy(workerObjectProxy)
 
71
    : m_workerObjectProxy(workerObjectProxy)
73
72
    , m_startupData(WorkerThreadStartupData::create(scriptURL, userAgent, sourceCode))
74
73
{
75
74
}
83
82
    // Mutex protection is necessary to ensure that m_threadID is initialized when the thread starts.
84
83
    MutexLocker lock(m_threadCreationMutex);
85
84
 
86
 
    if (m_threadID)
87
 
        return true;
88
 
 
89
 
    m_threadID = createThread(WorkerThread::workerThreadStart, this, "WebCore: Worker");
90
 
 
91
 
    return m_threadID;
 
85
    if (!m_threadID.isValid())
 
86
        m_threadID = createThread(WorkerThread::workerThreadStart, this, "WebCore: Worker");
 
87
 
 
88
    return m_threadID.isValid();
92
89
}
93
90
 
94
91
void* WorkerThread::workerThreadStart(void* thread)