[Chromium] Move didStartWorkerRunLoop to Platform.h
authorpilgrim@chromium.org <pilgrim@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2012 00:48:40 +0000 (00:48 +0000)
committerpilgrim@chromium.org <pilgrim@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2012 00:48:40 +0000 (00:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=88562

Reviewed by Adam Barth.

Part of a refactoring series. See tracking bug 82948.

Source/WebCore:

* WebCore.gyp/WebCore.gyp:
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::~WorkerScriptController):
* platform/chromium/PlatformSupport.h:
(WebCore):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):

Source/WebKit/chromium:

* src/PlatformSupport.cpp:
(WebCore):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119777 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/bindings/v8/WorkerScriptController.cpp
Source/WebCore/platform/chromium/PlatformSupport.h
Source/WebCore/workers/WorkerThread.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/PlatformSupport.cpp

index 7f0cfd3..ad216a5 100644 (file)
@@ -1,3 +1,20 @@
+2012-06-07  Mark Pilgrim  <pilgrim@chromium.org>
+
+        [Chromium] Move didStartWorkerRunLoop to Platform.h
+        https://bugs.webkit.org/show_bug.cgi?id=88562
+
+        Reviewed by Adam Barth.
+
+        Part of a refactoring series. See tracking bug 82948.
+
+        * WebCore.gyp/WebCore.gyp:
+        * bindings/v8/WorkerScriptController.cpp:
+        (WebCore::WorkerScriptController::~WorkerScriptController):
+        * platform/chromium/PlatformSupport.h:
+        (WebCore):
+        * workers/WorkerThread.cpp:
+        (WebCore::WorkerThread::workerThread):
+
 2012-06-07  Mike West  <mkwst@chromium.org>
 
         Dropping m_startingLineNumber property from StyledElement.
index a256248..61745b2 100644 (file)
     {
       'target_name': 'webcore_remaining',
       'type': 'static_library',
+      'defines': [
+        'WEBKIT_IMPLEMENTATION=1',
+      ],
       'dependencies': [
         'webcore_prerequisites',
         '<(chromium_src_dir)/third_party/v8-i18n/build/all.gyp:v8-i18n',
index a692c86..74562a2 100644 (file)
 #include "WorkerThread.h"
 #include <v8.h>
 
+#if PLATFORM(CHROMIUM)
+#include <public/Platform.h>
+#include <public/WebWorkerRunLoop.h>
+#endif
+
 namespace WebCore {
 
 WorkerScriptController::WorkerScriptController(WorkerContext* workerContext)
@@ -69,7 +74,7 @@ WorkerScriptController::~WorkerScriptController()
     // The corresponding call to didStartWorkerRunLoop is in
     // WorkerThread::workerThread().
     // See http://webkit.org/b/83104#c14 for why this is here.
-    PlatformSupport::didStopWorkerRunLoop(&m_workerContext->thread()->runLoop());
+    WebKit::Platform::current()->didStopWorkerRunLoop(WebKit::WebWorkerRunLoop(&m_workerContext->thread()->runLoop()));
 #endif
     m_proxy.clear();
     m_isolate->Exit();
index 1cede0a..1598939 100644 (file)
@@ -81,7 +81,6 @@ class IntRect;
 class KURL;
 class SerializedScriptValue;
 class Widget;
-class WorkerRunLoop;
 
 struct Cookie;
 struct FontRenderStyle;
@@ -331,9 +330,6 @@ public:
     // Visited links ------------------------------------------------------
     static LinkHash visitedLinkHash(const UChar* url, unsigned length);
     static LinkHash visitedLinkHash(const KURL& base, const AtomicString& attributeURL);
-
-    static void didStartWorkerRunLoop(WorkerRunLoop*);
-    static void didStopWorkerRunLoop(WorkerRunLoop*);
 };
 
 } // namespace WebCore
index 1da6058..26ebd7e 100644 (file)
@@ -20,7 +20,7 @@
  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
 #include "DatabaseTracker.h"
 #endif
 
+#if PLATFORM(CHROMIUM)
+#include <public/Platform.h>
+#include <public/WebWorkerRunLoop.h>
+#endif
+
 namespace WebCore {
 
 static Mutex& threadCountMutex()
@@ -144,7 +149,7 @@ void WorkerThread::workerThread()
 #if PLATFORM(CHROMIUM)
     // The corresponding call to didStopWorkerRunLoop is in
     // ~WorkerScriptController.
-    PlatformSupport::didStartWorkerRunLoop(&m_runLoop);
+    WebKit::Platform::current()->didStartWorkerRunLoop(WebKit::WebWorkerRunLoop(&m_runLoop));
 #endif
 
     WorkerScriptController* script = m_workerContext->script();
index c2cacc1..b2e37e9 100644 (file)
@@ -1,3 +1,15 @@
+2012-06-07  Mark Pilgrim  <pilgrim@chromium.org>
+
+        [Chromium] Move didStartWorkerRunLoop to Platform.h
+        https://bugs.webkit.org/show_bug.cgi?id=88562
+
+        Reviewed by Adam Barth.
+
+        Part of a refactoring series. See tracking bug 82948.
+
+        * src/PlatformSupport.cpp:
+        (WebCore):
+
 2012-06-05  James Robinson  <jamesr@chromium.org>
 
         [chromium] Move deferral-related logic out of Canvas2DLayerChromium
index cfaf097..4a29554 100644 (file)
@@ -96,7 +96,6 @@
 #include <public/WebCookie.h>
 #include <public/WebCookieJar.h>
 #include <public/WebMimeRegistry.h>
-#include <public/WebWorkerRunLoop.h>
 #include <wtf/Assertions.h>
 
 // We are part of the WebKit implementation.
@@ -721,16 +720,6 @@ bool PlatformSupport::popupsAllowed(NPP npp)
 }
 
 #if ENABLE(WORKERS)
-void PlatformSupport::didStartWorkerRunLoop(WorkerRunLoop* loop)
-{
-    WebKit::Platform::current()->didStartWorkerRunLoop(WebWorkerRunLoop(loop));
-}
-
-void PlatformSupport::didStopWorkerRunLoop(WorkerRunLoop* loop)
-{
-    WebKit::Platform::current()->didStopWorkerRunLoop(WebWorkerRunLoop(loop));
-}
-
 WorkerContextProxy* WorkerContextProxy::create(Worker* worker)
 {
     return WebWorkerClientImpl::createWorkerContextProxy(worker);