diff options
Diffstat (limited to 'WebCore/bindings/js/WorkerScriptController.cpp')
-rw-r--r-- | WebCore/bindings/js/WorkerScriptController.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/WebCore/bindings/js/WorkerScriptController.cpp b/WebCore/bindings/js/WorkerScriptController.cpp index 85d6861..1d45dfa 100644 --- a/WebCore/bindings/js/WorkerScriptController.cpp +++ b/WebCore/bindings/js/WorkerScriptController.cpp @@ -71,22 +71,26 @@ void WorkerScriptController::initScript() // when we allocate the global object. (Once the global object is fully // constructed, it can mark its own prototype.) RefPtr<Structure> workerContextPrototypeStructure = JSWorkerContextPrototype::createStructure(jsNull()); - ProtectedPtr<JSWorkerContextPrototype> workerContextPrototype = new (m_globalData.get()) JSWorkerContextPrototype(workerContextPrototypeStructure.release()); + ProtectedPtr<JSWorkerContextPrototype> workerContextPrototype = new (m_globalData.get()) JSWorkerContextPrototype(0, workerContextPrototypeStructure.release()); if (m_workerContext->isDedicatedWorkerContext()) { RefPtr<Structure> dedicatedContextPrototypeStructure = JSDedicatedWorkerContextPrototype::createStructure(workerContextPrototype); - ProtectedPtr<JSDedicatedWorkerContextPrototype> dedicatedContextPrototype = new (m_globalData.get()) JSDedicatedWorkerContextPrototype(dedicatedContextPrototypeStructure.release()); + ProtectedPtr<JSDedicatedWorkerContextPrototype> dedicatedContextPrototype = new (m_globalData.get()) JSDedicatedWorkerContextPrototype(0, dedicatedContextPrototypeStructure.release()); RefPtr<Structure> structure = JSDedicatedWorkerContext::createStructure(dedicatedContextPrototype); m_workerContextWrapper = new (m_globalData.get()) JSDedicatedWorkerContext(structure.release(), m_workerContext->toDedicatedWorkerContext()); + workerContextPrototype->putAnonymousValue(0, m_workerContextWrapper); + dedicatedContextPrototype->putAnonymousValue(0, m_workerContextWrapper); #if ENABLE(SHARED_WORKERS) } else { ASSERT(m_workerContext->isSharedWorkerContext()); RefPtr<Structure> sharedContextPrototypeStructure = JSSharedWorkerContextPrototype::createStructure(workerContextPrototype); - ProtectedPtr<JSSharedWorkerContextPrototype> sharedContextPrototype = new (m_globalData.get()) JSSharedWorkerContextPrototype(sharedContextPrototypeStructure.release()); + ProtectedPtr<JSSharedWorkerContextPrototype> sharedContextPrototype = new (m_globalData.get()) JSSharedWorkerContextPrototype(0, sharedContextPrototypeStructure.release()); RefPtr<Structure> structure = JSSharedWorkerContext::createStructure(sharedContextPrototype); m_workerContextWrapper = new (m_globalData.get()) JSSharedWorkerContext(structure.release(), m_workerContext->toSharedWorkerContext()); + workerContextPrototype->putAnonymousValue(0, m_workerContextWrapper); + sharedContextPrototype->putAnonymousValue(0, m_workerContextWrapper); #endif } } |