Title: [250119] trunk/Source/WebKit
- Revision
- 250119
- Author
- [email protected]
- Date
- 2019-09-19 20:51:38 -0700 (Thu, 19 Sep 2019)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (250118 => 250119)
--- trunk/Source/WebKit/ChangeLog 2019-09-20 03:36:15 UTC (rev 250118)
+++ trunk/Source/WebKit/ChangeLog 2019-09-20 03:51:38 UTC (rev 250119)
@@ -1,3 +1,32 @@
+2019-09-19 Brent Fulgham <[email protected]>
+
+ [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):
+
2019-09-19 Chris Dumez <[email protected]>
Add better logging for when the view visibility state changes
Modified: trunk/Source/WebKit/PlatformFTW.cmake (250118 => 250119)
--- trunk/Source/WebKit/PlatformFTW.cmake 2019-09-20 03:36:15 UTC (rev 250118)
+++ trunk/Source/WebKit/PlatformFTW.cmake 2019-09-20 03:51:38 UTC (rev 250119)
@@ -262,6 +262,7 @@
UIProcess/API/C/WKGeolocationManager.h
UIProcess/API/C/WKGeolocationPermissionRequest.h
UIProcess/API/C/WKGeolocationPosition.h
+ UIProcess/API/C/WKHTTPCookieStoreRef.h
UIProcess/API/C/WKHitTestResult.h
UIProcess/API/C/WKIconDatabase.h
UIProcess/API/C/WKInspector.h
@@ -293,8 +294,8 @@
UIProcess/API/C/WKPageNavigationClient.h
UIProcess/API/C/WKPagePolicyClient.h
UIProcess/API/C/WKPagePrivate.h
+ UIProcess/API/C/WKPageRenderingProgressEvents.h
UIProcess/API/C/WKPageStateClient.h
- UIProcess/API/C/WKPageRenderingProgressEvents.h
UIProcess/API/C/WKPageUIClient.h
UIProcess/API/C/WKPluginLoadPolicy.h
UIProcess/API/C/WKPreferencesRef.h
@@ -312,6 +313,7 @@
UIProcess/API/C/WKUserMediaPermissionRequest.h
UIProcess/API/C/WKUserScriptRef.h
UIProcess/API/C/WKViewportAttributes.h
+ UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h
UIProcess/API/C/WKWebsiteDataStoreRef.h
UIProcess/API/C/WKWebsitePolicies.h
UIProcess/API/C/WKWindowFeaturesRef.h
Modified: trunk/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp (250118 => 250119)
--- trunk/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp 2019-09-20 03:36:15 UTC (rev 250118)
+++ trunk/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp 2019-09-20 03:51:38 UTC (rev 250119)
@@ -26,6 +26,7 @@
#include "config.h"
#include "AuxiliaryProcessMain.h"
+#include <_javascript_Core/ExecutableAllocator.h>
#include <cstring>
#include <wtf/text/WTFString.h>
@@ -40,7 +41,10 @@
} else if (!strcmp(argv[i], "-processIdentifier") && i + 1 < argc) {
String str(argv[++i]);
m_parameters.processIdentifier = makeObjectIdentifier<WebCore::ProcessIdentifierType>(str.toUInt64());
- }
+ } else if (!strcmp(argv[i], "-configure-jsc-for-testing"))
+ JSC::Config::configureForTesting();
+ else if (!strcmp(argv[i], "-disable-jit"))
+ JSC::ExecutableAllocator::setJITEnabled(false);
}
return true;
}
Modified: trunk/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp (250118 => 250119)
--- trunk/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp 2019-09-20 03:36:15 UTC (rev 250118)
+++ trunk/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp 2019-09-20 03:51:38 UTC (rev 250119)
@@ -82,6 +82,10 @@
commandLineBuilder.append(String::number(m_launchOptions.processIdentifier.toUInt64()));
commandLineBuilder.append(" -clientIdentifier ");
commandLineBuilder.append(String::number(reinterpret_cast<uintptr_t>(clientIdentifier)));
+ if (m_client->shouldConfigureJSCForTesting())
+ commandLineBuilder.append(" -configure-jsc-for-testing");
+ if (!m_client->isJITEnabled())
+ commandLineBuilder.append(" -disable-jit");
commandLineBuilder.append('\0');
auto commandLine = commandLineBuilder.toString().wideCharacters();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes