Title: [121417] trunk/Source
Revision
121417
Author
[email protected]
Date
2012-06-28 01:34:47 -0700 (Thu, 28 Jun 2012)

Log Message

Unreviewed, rolling out r121395.
http://trac.webkit.org/changeset/121395
https://bugs.webkit.org/show_bug.cgi?id=90143

Patch causes crashes in fast/workers/worker-context-gc.html
(Requested by zdobersek on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-06-28

Source/WebCore: 

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::create):
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
* workers/DedicatedWorkerThread.h:
(DedicatedWorkerThread):
* workers/DefaultSharedWorkerRepository.cpp:
(SharedWorkerProxy):
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::create):
(WebCore::SharedWorkerThread::SharedWorkerThread):
* workers/SharedWorkerThread.h:
(SharedWorkerThread):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerContext):
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::create):
(WorkerThreadStartupData):
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
* workers/WorkerThread.h:
(WorkerThread):

Source/WebKit/chromium: 

* src/WebSharedWorkerImpl.cpp:
(WebKit::WebSharedWorkerImpl::startWorkerContext):
* src/WebWorkerClientImpl.cpp:
(WebKit::WebWorkerClientImpl::startWorkerContext):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121416 => 121417)


--- trunk/Source/WebCore/ChangeLog	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebCore/ChangeLog	2012-06-28 08:34:47 UTC (rev 121417)
@@ -1,3 +1,37 @@
+2012-06-28  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r121395.
+        http://trac.webkit.org/changeset/121395
+        https://bugs.webkit.org/show_bug.cgi?id=90143
+
+        Patch causes crashes in fast/workers/worker-context-gc.html
+        (Requested by zdobersek on #webkit).
+
+        * Modules/indexeddb/IDBFactory.cpp:
+        (WebCore::IDBFactory::open):
+        * workers/DedicatedWorkerThread.cpp:
+        (WebCore::DedicatedWorkerThread::create):
+        (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
+        * workers/DedicatedWorkerThread.h:
+        (DedicatedWorkerThread):
+        * workers/DefaultSharedWorkerRepository.cpp:
+        (SharedWorkerProxy):
+        (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
+        * workers/SharedWorkerThread.cpp:
+        (WebCore::SharedWorkerThread::create):
+        (WebCore::SharedWorkerThread::SharedWorkerThread):
+        * workers/SharedWorkerThread.h:
+        (SharedWorkerThread):
+        * workers/WorkerMessagingProxy.cpp:
+        (WebCore::WorkerMessagingProxy::startWorkerContext):
+        * workers/WorkerThread.cpp:
+        (WebCore::WorkerThreadStartupData::create):
+        (WorkerThreadStartupData):
+        (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
+        (WebCore::WorkerThread::WorkerThread):
+        * workers/WorkerThread.h:
+        (WorkerThread):
+
 2012-06-28  Yoshifumi Inoue  <[email protected]>
 
         [Platform] Implement functions for localized time format information

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (121416 => 121417)


--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2012-06-28 08:34:47 UTC (rev 121417)
@@ -94,14 +94,12 @@
             return 0;
         Frame* frame = document->frame();
         RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this), 0);
-        m_backend->open(name, request.get(), context->securityOrigin(), frame, document->page()->group().groupSettings()->indexedDBDatabasePath());
+        m_backend->open(name, request.get(), context->securityOrigin(), frame, String());
         return request;
     }
 #if ENABLE(WORKERS)
     RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this), 0);
-    WorkerContext* workerContext = static_cast<WorkerContext*>(context);
-    GroupSettings* groupSettings = workerContext->thread()->groupSettings();
-    m_backend->openFromWorker(name, request.get(), context->securityOrigin(), workerContext, groupSettings ? groupSettings->indexedDBDatabasePath() : String());
+    m_backend->openFromWorker(name, request.get(), context->securityOrigin(), static_cast<WorkerContext*>(context), String());
     return request;
 #else
     return 0;

Modified: trunk/Source/WebCore/workers/DedicatedWorkerThread.cpp (121416 => 121417)


--- trunk/Source/WebCore/workers/DedicatedWorkerThread.cpp	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebCore/workers/DedicatedWorkerThread.cpp	2012-06-28 08:34:47 UTC (rev 121417)
@@ -39,13 +39,13 @@
 
 namespace WebCore {
 
-PassRefPtr<DedicatedWorkerThread> DedicatedWorkerThread::create(const KURL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
+PassRefPtr<DedicatedWorkerThread> DedicatedWorkerThread::create(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
 {
-    return adoptRef(new DedicatedWorkerThread(scriptURL, userAgent, settings, sourceCode, workerLoaderProxy, workerObjectProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType));
+    return adoptRef(new DedicatedWorkerThread(scriptURL, userAgent, sourceCode, workerLoaderProxy, workerObjectProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType));
 }
 
-DedicatedWorkerThread::DedicatedWorkerThread(const KURL& url, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
-    : WorkerThread(url, userAgent, settings, sourceCode, workerLoaderProxy, workerObjectProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType)
+DedicatedWorkerThread::DedicatedWorkerThread(const KURL& url, const String& userAgent, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
+    : WorkerThread(url, userAgent, sourceCode, workerLoaderProxy, workerObjectProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType)
     , m_workerObjectProxy(workerObjectProxy)
 {
 }

Modified: trunk/Source/WebCore/workers/DedicatedWorkerThread.h (121416 => 121417)


--- trunk/Source/WebCore/workers/DedicatedWorkerThread.h	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebCore/workers/DedicatedWorkerThread.h	2012-06-28 08:34:47 UTC (rev 121417)
@@ -41,7 +41,7 @@
 
     class DedicatedWorkerThread : public WorkerThread {
     public:
-        static PassRefPtr<DedicatedWorkerThread> create(const KURL& scriptURL, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
+        static PassRefPtr<DedicatedWorkerThread> create(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
         WorkerObjectProxy& workerObjectProxy() const { return m_workerObjectProxy; }
         ~DedicatedWorkerThread();
 
@@ -50,7 +50,7 @@
         virtual void runEventLoop();
 
     private:
-        DedicatedWorkerThread(const KURL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
+        DedicatedWorkerThread(const KURL&, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
 
         WorkerObjectProxy& m_workerObjectProxy;
     };

Modified: trunk/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp (121416 => 121417)


--- trunk/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp	2012-06-28 08:34:47 UTC (rev 121417)
@@ -42,7 +42,6 @@
 #include "MessageEvent.h"
 #include "MessagePort.h"
 #include "NotImplemented.h"
-#include "PageGroup.h"
 #include "PlatformString.h"
 #include "ScriptCallStack.h"
 #include "SecurityOrigin.h"
@@ -98,8 +97,6 @@
     // Removes a detached document from the list of worker's documents. May set the closing flag if this is the last document in the list.
     void documentDetached(Document*);
 
-    GroupSettings* groupSettings() const; // Page GroupSettings used by worker thread.
-
 private:
     SharedWorkerProxy(const String& name, const KURL&, PassRefPtr<SecurityOrigin>);
     void close();
@@ -163,16 +160,6 @@
     return true;
 }
 
-GroupSettings* SharedWorkerProxy::groupSettings() const
-{
-    if (isClosing())
-        return 0;
-    ASSERT(m_workerDocuments.size());
-    // Just pick the first active document, and use the groupsettings of that page.
-    Document* document = *(m_workerDocuments.begin());
-    return document->page()->group().groupSettings();
-}
-
 static void postExceptionTask(ScriptExecutionContext* context, const String& errorMessage, int lineNumber, const String& sourceURL)
 {
     context->reportException(errorMessage, lineNumber, sourceURL, 0);
@@ -356,7 +343,7 @@
 
     // Another loader may have already started up a thread for this proxy - if so, just send a connect to the pre-existing thread.
     if (!proxy.thread()) {
-        RefPtr<SharedWorkerThread> thread = SharedWorkerThread::create(proxy.name(), proxy.url(), userAgent, proxy.groupSettings(), workerScript, proxy, proxy, DontPauseWorkerContextOnStart, contentSecurityPolicy, contentSecurityPolicyType);
+        RefPtr<SharedWorkerThread> thread = SharedWorkerThread::create(proxy.name(), proxy.url(), userAgent, workerScript, proxy, proxy, DontPauseWorkerContextOnStart, contentSecurityPolicy, contentSecurityPolicyType);
         proxy.setThread(thread);
         thread->start();
     }

Modified: trunk/Source/WebCore/workers/SharedWorkerThread.cpp (121416 => 121417)


--- trunk/Source/WebCore/workers/SharedWorkerThread.cpp	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebCore/workers/SharedWorkerThread.cpp	2012-06-28 08:34:47 UTC (rev 121417)
@@ -38,13 +38,13 @@
 
 namespace WebCore {
 
-PassRefPtr<SharedWorkerThread> SharedWorkerThread::create(const String& name, const KURL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
+PassRefPtr<SharedWorkerThread> SharedWorkerThread::create(const String& name, const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
 {
-    return adoptRef(new SharedWorkerThread(name, scriptURL, userAgent, settings, sourceCode, workerLoaderProxy, workerReportingProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType));
+    return adoptRef(new SharedWorkerThread(name, scriptURL, userAgent, sourceCode, workerLoaderProxy, workerReportingProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType));
 }
 
-SharedWorkerThread::SharedWorkerThread(const String& name, const KURL& url, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
-    : WorkerThread(url, userAgent, settings, sourceCode, workerLoaderProxy, workerReportingProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType)
+SharedWorkerThread::SharedWorkerThread(const String& name, const KURL& url, const String& userAgent, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
+    : WorkerThread(url, userAgent, sourceCode, workerLoaderProxy, workerReportingProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType)
     , m_name(name.isolatedCopy())
 {
 }

Modified: trunk/Source/WebCore/workers/SharedWorkerThread.h (121416 => 121417)


--- trunk/Source/WebCore/workers/SharedWorkerThread.h	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebCore/workers/SharedWorkerThread.h	2012-06-28 08:34:47 UTC (rev 121417)
@@ -39,14 +39,14 @@
 
     class SharedWorkerThread : public WorkerThread {
     public:
-        static PassRefPtr<SharedWorkerThread> create(const String& name, const KURL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
+        static PassRefPtr<SharedWorkerThread> create(const String& name, const KURL&, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
         ~SharedWorkerThread();
 
     protected:
         virtual PassRefPtr<WorkerContext> createWorkerContext(const KURL&, const String&, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
 
     private:
-        SharedWorkerThread(const String& name, const KURL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
+        SharedWorkerThread(const String& name, const KURL&, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
 
         String m_name;
     };

Modified: trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp (121416 => 121417)


--- trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp	2012-06-28 08:34:47 UTC (rev 121417)
@@ -42,7 +42,6 @@
 #include "InspectorInstrumentation.h"
 #include "MessageEvent.h"
 #include "NotImplemented.h"
-#include "PageGroup.h"
 #include "ScriptCallStack.h"
 #include "ScriptExecutionContext.h"
 #include "Worker.h"
@@ -273,8 +272,7 @@
 
 void WorkerMessagingProxy::startWorkerContext(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode)
 {
-    GroupSettings* settings = static_cast<Document*>(m_workerObject->scriptExecutionContext())->page()->group().groupSettings();
-    RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, settings, sourceCode, *this, *this, startMode,
+    RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, sourceCode, *this, *this, startMode,
                                                                          m_scriptExecutionContext->contentSecurityPolicy()->deprecatedHeader(),
                                                                          m_scriptExecutionContext->contentSecurityPolicy()->deprecatedHeaderType());
     workerThreadCreated(thread);

Modified: trunk/Source/WebCore/workers/WorkerThread.cpp (121416 => 121417)


--- trunk/Source/WebCore/workers/WorkerThread.cpp	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebCore/workers/WorkerThread.cpp	2012-06-28 08:34:47 UTC (rev 121417)
@@ -71,23 +71,22 @@
 struct WorkerThreadStartupData {
     WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData); WTF_MAKE_FAST_ALLOCATED;
 public:
-    static PassOwnPtr<WorkerThreadStartupData> create(const KURL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
+    static PassOwnPtr<WorkerThreadStartupData> create(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
     {
-        return adoptPtr(new WorkerThreadStartupData(scriptURL, userAgent, settings, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType));
+        return adoptPtr(new WorkerThreadStartupData(scriptURL, userAgent, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType));
     }
 
     KURL m_scriptURL;
     String m_userAgent;
-    OwnPtr<GroupSettings> m_groupSettings;
     String m_sourceCode;
     WorkerThreadStartMode m_startMode;
     String m_contentSecurityPolicy;
     ContentSecurityPolicy::HeaderType m_contentSecurityPolicyType;
 private:
-    WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType);
+    WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType);
 };
 
-WorkerThreadStartupData::WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
+WorkerThreadStartupData::WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
     : m_scriptURL(scriptURL.copy())
     , m_userAgent(userAgent.isolatedCopy())
     , m_sourceCode(sourceCode.isolatedCopy())
@@ -95,20 +94,13 @@
     , m_contentSecurityPolicy(contentSecurityPolicy.isolatedCopy())
     , m_contentSecurityPolicyType(contentSecurityPolicyType)
 {
-    if (!settings)
-        return;
-
-    m_groupSettings = GroupSettings::create();
-    m_groupSettings->setLocalStorageQuotaBytes(settings->localStorageQuotaBytes());
-    m_groupSettings->setIndexedDBQuotaBytes(settings->indexedDBQuotaBytes());
-    m_groupSettings->setIndexedDBDatabasePath(settings->indexedDBDatabasePath());
 }
 
-WorkerThread::WorkerThread(const KURL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
+WorkerThread::WorkerThread(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
     : m_threadID(0)
     , m_workerLoaderProxy(workerLoaderProxy)
     , m_workerReportingProxy(workerReportingProxy)
-    , m_startupData(WorkerThreadStartupData::create(scriptURL, userAgent, settings, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType))
+    , m_startupData(WorkerThreadStartupData::create(scriptURL, userAgent, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType))
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     , m_notificationClient(0)
 #endif
@@ -193,11 +185,6 @@
     m_runLoop.run(m_workerContext.get());
 }
 
-GroupSettings* WorkerThread::groupSettings()
-{
-    return m_startupData->m_groupSettings.get();
-}
-
 class WorkerThreadShutdownFinishTask : public ScriptExecutionContext::Task {
 public:
     static PassOwnPtr<WorkerThreadShutdownFinishTask> create()

Modified: trunk/Source/WebCore/workers/WorkerThread.h (121416 => 121417)


--- trunk/Source/WebCore/workers/WorkerThread.h	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebCore/workers/WorkerThread.h	2012-06-28 08:34:47 UTC (rev 121417)
@@ -30,7 +30,6 @@
 #if ENABLE(WORKERS)
 
 #include "ContentSecurityPolicy.h"
-#include "GroupSettings.h"
 #include "WorkerRunLoop.h"
 #include <wtf/Forward.h>
 #include <wtf/OwnPtr.h>
@@ -62,7 +61,6 @@
 
         // Number of active worker threads.
         static unsigned workerThreadCount();
-        GroupSettings* groupSettings();
 
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
         NotificationClient* getNotificationClient() { return m_notificationClient; }
@@ -70,7 +68,7 @@
 #endif
 
     protected:
-        WorkerThread(const KURL&, const String& userAgent, const GroupSettings*,  const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
+        WorkerThread(const KURL&, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
 
         // Factory method for creating a new worker context for the thread.
         virtual PassRefPtr<WorkerContext> createWorkerContext(const KURL&, const String& userAgent, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType) = 0;

Modified: trunk/Source/WebKit/chromium/ChangeLog (121416 => 121417)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-06-28 08:34:47 UTC (rev 121417)
@@ -1,3 +1,17 @@
+2012-06-28  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r121395.
+        http://trac.webkit.org/changeset/121395
+        https://bugs.webkit.org/show_bug.cgi?id=90143
+
+        Patch causes crashes in fast/workers/worker-context-gc.html
+        (Requested by zdobersek on #webkit).
+
+        * src/WebSharedWorkerImpl.cpp:
+        (WebKit::WebSharedWorkerImpl::startWorkerContext):
+        * src/WebWorkerClientImpl.cpp:
+        (WebKit::WebWorkerClientImpl::startWorkerContext):
+
 2012-06-28  Yoshifumi Inoue  <[email protected]>
 
         [Platform] Implement functions for localized time format information

Modified: trunk/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp (121416 => 121417)


--- trunk/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp	2012-06-28 08:34:47 UTC (rev 121417)
@@ -34,12 +34,9 @@
 #include "CrossThreadTask.h"
 #include "DatabaseTask.h"
 #include "Document.h"
-#include "GroupSettings.h"
 #include "KURL.h"
 #include "MessageEvent.h"
 #include "MessagePortChannel.h"
-#include "Page.h"
-#include "PageGroup.h"
 #include "PlatformMessagePortChannel.h"
 #include "SecurityOrigin.h"
 #include "ScriptExecutionContext.h"
@@ -369,8 +366,7 @@
 {
     initializeLoader(url);
     WorkerThreadStartMode startMode = m_pauseWorkerContextOnStart ? PauseWorkerContextOnStart : DontPauseWorkerContextOnStart;
-    setWorkerThread(SharedWorkerThread::create(name, url, userAgent, static_cast<Document*>(m_loadingDocument.get())->page()->group().groupSettings(),
-                                               sourceCode, *this, *this, startMode, contentSecurityPolicy,
+    setWorkerThread(SharedWorkerThread::create(name, url, userAgent, sourceCode, *this, *this, startMode, contentSecurityPolicy,
                                                static_cast<WebCore::ContentSecurityPolicy::HeaderType>(policyType)));
 
     workerThread()->start();

Modified: trunk/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp (121416 => 121417)


--- trunk/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp	2012-06-28 07:46:54 UTC (rev 121416)
+++ trunk/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp	2012-06-28 08:34:47 UTC (rev 121417)
@@ -39,13 +39,10 @@
 #include "ErrorEvent.h"
 #include "Frame.h"
 #include "FrameLoaderClient.h"
-#include "GroupSettings.h"
 #include "InspectorInstrumentation.h"
 #include "MessageEvent.h"
 #include "MessagePort.h"
 #include "MessagePortChannel.h"
-#include "Page.h"
-#include "PageGroup.h"
 #include "ScriptCallStack.h"
 #include "ScriptExecutionContext.h"
 #include "Worker.h"
@@ -89,9 +86,7 @@
 
 void WebWorkerClientImpl::startWorkerContext(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode)
 {
-    ASSERT(m_scriptExecutionContext->isDocument());
-    GroupSettings* settings = static_cast<Document*>(m_scriptExecutionContext.get())->page()->group().groupSettings();
-    RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, settings, sourceCode, *this, *this, startMode,
+    RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, sourceCode, *this, *this, startMode,
                                                                          m_scriptExecutionContext->contentSecurityPolicy()->deprecatedHeader(),
                                                                          m_scriptExecutionContext->contentSecurityPolicy()->deprecatedHeaderType());
     m_proxy->workerThreadCreated(thread);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to