2009-04-07 Jian Li <jianli@chromium.org>
authorlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Apr 2009 21:15:24 +0000 (21:15 +0000)
committerlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Apr 2009 21:15:24 +0000 (21:15 +0000)
        Reviewed by Darin Fisher.

        Upstream changes to WorkerContextExecutionProxy for enabling V8 preemption.
        https://bugs.webkit.org/show_bug.cgi?id=25034

        * bindings/v8/WorkerContextExecutionProxy.cpp:
        (WebCore::WorkerContextExecutionProxy::evaluate):

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

WebCore/ChangeLog
WebCore/bindings/v8/WorkerContextExecutionProxy.cpp

index e2f2c6d..b5628dd 100644 (file)
@@ -1,3 +1,13 @@
+2009-04-07  Jian Li  <jianli@chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        Upstream changes to WorkerContextExecutionProxy for enabling V8 preemption.
+        https://bugs.webkit.org/show_bug.cgi?id=25034
+
+        * bindings/v8/WorkerContextExecutionProxy.cpp:
+        (WebCore::WorkerContextExecutionProxy::evaluate):
+
 2009-04-07  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Darin Adler.
index ab2e00c..d061ea2 100644 (file)
@@ -286,6 +286,10 @@ v8::Local<v8::Value> WorkerContextExecutionProxy::evaluate(const String& script,
     v8::Locker locker;
     v8::HandleScope hs;
 
+    // Enable preemption so that one worker will not be blocked by another long-running worker.
+    const int workerThreadPreemptionIntervalMs = 100;
+    v8::Locker::StartPreemption(workerThreadPreemptionIntervalMs);
+
     initContextIfNeeded();
     v8::Context::Scope scope(m_context);