Changeset 250119 in webkit


Ignore:
Timestamp:
Sep 19, 2019 8:51:38 PM (5 years ago)
Author:
Brent Fulgham
Message:

[FTW, WinCairo] Support running tests in Release mode
https://bugs.webkit.org/show_bug.cgi?id=202021

Reviewed by Don Olmstead.

In Bug 201597, we added new features to better lock down JSC features in the
potentially untrusted WebContent process.

Unfortunately, this change included XPC Dictionary items used at startup to
lock down JSC features before entering the main execution of the process. These
changes were not done for the WinCairo or FTW ports.

We need to pass the state of the JIT and whether to enable certain JSC features
at process launch. Since the XPC mechanisms we use on macOS and iOS do not exist
on Windows, I am implementing them as command-line flags.

-configure-jsc-for-testing: Sets the JSC in testing mode.
-disable-jit: Disables the JIT.

See r249808 for the equivalent changes on macOS and iOS.

  • PlatformFTW.cmake: Add some missing header files needed when building tests.
  • Shared/win/AuxiliaryProcessMainWin.cpp:

(WebKit::AuxiliaryProcessMainBase::parseCommandLine):

  • UIProcess/Launcher/win/ProcessLauncherWin.cpp:

(WebKit::ProcessLauncher::launchProcess):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r250111 r250119  
     12019-09-19  Brent Fulgham  <bfulgham@apple.com>
     2
     3        [FTW, WinCairo] Support running tests in Release mode
     4        https://bugs.webkit.org/show_bug.cgi?id=202021
     5
     6        Reviewed by Don Olmstead.
     7
     8        In Bug 201597, we added new features to better lock down JSC features in the
     9        potentially untrusted WebContent process.
     10
     11        Unfortunately, this change included XPC Dictionary items used at startup to
     12        lock down JSC features before entering the main execution of the process. These
     13        changes were not done for the WinCairo or FTW ports.
     14
     15        We need to pass the state of the JIT and whether to enable certain JSC features
     16        at process launch. Since the XPC mechanisms we use on macOS and iOS do not exist
     17        on Windows, I am implementing them as command-line flags.
     18
     19            -configure-jsc-for-testing: Sets the JSC in testing mode.
     20            -disable-jit: Disables the JIT.
     21
     22        See r249808 for the equivalent changes on macOS and iOS.
     23
     24        * PlatformFTW.cmake: Add some missing header files needed when building tests.
     25        * Shared/win/AuxiliaryProcessMainWin.cpp:
     26        (WebKit::AuxiliaryProcessMainBase::parseCommandLine):
     27        * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
     28        (WebKit::ProcessLauncher::launchProcess):
     29
    1302019-09-19  Chris Dumez  <cdumez@apple.com>
    231
  • trunk/Source/WebKit/PlatformFTW.cmake

    r249778 r250119  
    263263    UIProcess/API/C/WKGeolocationPermissionRequest.h
    264264    UIProcess/API/C/WKGeolocationPosition.h
     265    UIProcess/API/C/WKHTTPCookieStoreRef.h
    265266    UIProcess/API/C/WKHitTestResult.h
    266267    UIProcess/API/C/WKIconDatabase.h
     
    294295    UIProcess/API/C/WKPagePolicyClient.h
    295296    UIProcess/API/C/WKPagePrivate.h
     297    UIProcess/API/C/WKPageRenderingProgressEvents.h
    296298    UIProcess/API/C/WKPageStateClient.h
    297     UIProcess/API/C/WKPageRenderingProgressEvents.h
    298299    UIProcess/API/C/WKPageUIClient.h
    299300    UIProcess/API/C/WKPluginLoadPolicy.h
     
    313314    UIProcess/API/C/WKUserScriptRef.h
    314315    UIProcess/API/C/WKViewportAttributes.h
     316    UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h
    315317    UIProcess/API/C/WKWebsiteDataStoreRef.h
    316318    UIProcess/API/C/WKWebsitePolicies.h
  • trunk/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp

    r240683 r250119  
    2727#include "AuxiliaryProcessMain.h"
    2828
     29#include <JavaScriptCore/ExecutableAllocator.h>
    2930#include <cstring>
    3031#include <wtf/text/WTFString.h>
     
    4142            String str(argv[++i]);
    4243            m_parameters.processIdentifier = makeObjectIdentifier<WebCore::ProcessIdentifierType>(str.toUInt64());
    43         }
     44        } else if (!strcmp(argv[i], "-configure-jsc-for-testing"))
     45            JSC::Config::configureForTesting();
     46        else if (!strcmp(argv[i], "-disable-jit"))
     47            JSC::ExecutableAllocator::setJITEnabled(false);
    4448    }
    4549    return true;
  • trunk/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp

    r242842 r250119  
    8383    commandLineBuilder.append(" -clientIdentifier ");
    8484    commandLineBuilder.append(String::number(reinterpret_cast<uintptr_t>(clientIdentifier)));
     85    if (m_client->shouldConfigureJSCForTesting())
     86        commandLineBuilder.append(" -configure-jsc-for-testing");
     87    if (!m_client->isJITEnabled())
     88        commandLineBuilder.append(" -disable-jit");
    8589    commandLineBuilder.append('\0');
    8690
Note: See TracChangeset for help on using the changeset viewer.