Changeset 123085 in webkit


Ignore:
Timestamp:
Jul 19, 2012 2:59:39 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL][WK2] Using different cache directory for each WTR process
https://bugs.webkit.org/show_bug.cgi?id=91719

Patch by Zoltan Nyul <zoltan.nyul@intel.com> on 2012-07-19
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Make sure we return a valid application cache directory in
WebContextEfl.

  • UIProcess/efl/WebContextEfl.cpp:

(WebKit::WebContext::applicationCacheDirectory):

Tools:

The testrunner script may be running multiple processes in
parallel, and it makes appcache tests fail if they are using the same
directory. I modified the EFL's LayoutTestController to use the
DUMPRENDERTREE_TEMP for application cache directory because it's
different for each process.

  • WebKitTestRunner/CMakeLists.txt:
  • WebKitTestRunner/InjectedBundle/efl/LayoutTestControllerEfl.cpp:

(WTR::LayoutTestController::platformInitialize):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r123019 r123085  
     12012-07-19  Zoltan Nyul  <zoltan.nyul@intel.com>
     2
     3        [EFL][WK2] Using different cache directory for each WTR process
     4        https://bugs.webkit.org/show_bug.cgi?id=91719
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Make sure we return a valid application cache directory in
     9        WebContextEfl.
     10
     11        * UIProcess/efl/WebContextEfl.cpp:
     12        (WebKit::WebContext::applicationCacheDirectory):
     13
    1142012-07-18  Christophe Dumez  <christophe.dumez@intel.com>
    215
  • trunk/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp

    r96969 r123085  
    2828
    2929#include <WebCore/ApplicationCacheStorage.h>
     30#include <WebCore/FileSystem.h>
    3031#include <WebCore/NotImplemented.h>
    3132
     
    3435String WebContext::applicationCacheDirectory()
    3536{
    36     return WebCore::cacheStorage().cacheDirectory();
     37    String cacheDir = WebCore::cacheStorage().cacheDirectory();
     38   
     39    // The WebKitTestRunner sets the cacheDirectory and
     40    // we should not overwrite it.
     41    if (cacheDir.isEmpty())
     42        cacheDir = makeString(WebCore::homeDirectoryPath(), "/.webkit/Applications");
     43
     44    return cacheDir;
    3745}
    3846
  • trunk/Tools/ChangeLog

    r123083 r123085  
     12012-07-19  Zoltan Nyul  <zoltan.nyul@intel.com>
     2
     3        [EFL][WK2] Using different cache directory for each WTR process
     4        https://bugs.webkit.org/show_bug.cgi?id=91719
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        The testrunner script may be running multiple processes in
     9        parallel, and it makes appcache tests fail if they are using the same
     10        directory. I modified the EFL's LayoutTestController to use the
     11        DUMPRENDERTREE_TEMP for application cache directory because it's
     12        different for each process.
     13
     14        * WebKitTestRunner/CMakeLists.txt:
     15        * WebKitTestRunner/InjectedBundle/efl/LayoutTestControllerEfl.cpp:
     16        (WTR::LayoutTestController::platformInitialize):
     17
    1182012-07-19  Mario Sanchez Prada  <msanchez@igalia.com>
    219
  • trunk/Tools/WebKitTestRunner/CMakeLists.txt

    r121893 r123085  
    2525    ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
    2626    ${WEBCORE_DIR}/editing
     27    ${WEBCORE_DIR}/page
    2728    ${WEBCORE_DIR}/platform
    2829    ${WEBCORE_DIR}/platform/graphics
    2930    ${WEBCORE_DIR}/platform/network
     31    ${WEBCORE_DIR}/platform/sql
    3032    ${WEBCORE_DIR}/platform/text
    3133    ${WEBCORE_DIR}/testing/js
  • trunk/Tools/WebKitTestRunner/InjectedBundle/efl/LayoutTestControllerEfl.cpp

    r121893 r123085  
    2323#include "InjectedBundle.h"
    2424#include <Ecore.h>
     25#include <WebCore/ApplicationCacheStorage.h>
    2526
    2627namespace WTR {
     
    3435void LayoutTestController::platformInitialize()
    3536{
     37    // The testrunner script is may be running multiple processes in parallel,
     38    // and it makes appcache tests fail if they are using the same directory.
     39    // DUMPRENDERTREE_TEMP points to a different directory for each process.
     40    String appCacheDirectory = makeString(String::fromUTF8(getenv("DUMPRENDERTREE_TEMP")), "/Applications");
     41    WebCore::cacheStorage().setCacheDirectory(appCacheDirectory);
    3642    m_waitToDumpWatchdogTimer = 0;
    3743}
Note: See TracChangeset for help on using the changeset viewer.