Title: [254880] trunk/Source/WebKit
- Revision
- 254880
- Author
- [email protected]
- Date
- 2020-01-21 14:04:13 -0800 (Tue, 21 Jan 2020)
Log Message
[macOS] Add managed preference to allow synchronous XHR during page dismissal
https://bugs.webkit.org/show_bug.cgi?id=206540
<rdar://problem/58644447>
Reviewed by Alex Christensen.
Add managed preference to allow synchronous XHR during page dismissal. This is temporarily needed by some
enterprise products until they can update their code.
* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultDisallowSyncXHRDuringPageDismissalEnabled):
* Shared/WebPreferencesDefaultValues.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (254879 => 254880)
--- trunk/Source/WebKit/ChangeLog 2020-01-21 22:02:34 UTC (rev 254879)
+++ trunk/Source/WebKit/ChangeLog 2020-01-21 22:04:13 UTC (rev 254880)
@@ -1,3 +1,19 @@
+2020-01-21 Chris Dumez <[email protected]>
+
+ [macOS] Add managed preference to allow synchronous XHR during page dismissal
+ https://bugs.webkit.org/show_bug.cgi?id=206540
+ <rdar://problem/58644447>
+
+ Reviewed by Alex Christensen.
+
+ Add managed preference to allow synchronous XHR during page dismissal. This is temporarily needed by some
+ enterprise products until they can update their code.
+
+ * Shared/WebPreferences.yaml:
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::defaultDisallowSyncXHRDuringPageDismissalEnabled):
+ * Shared/WebPreferencesDefaultValues.h:
+
2020-01-21 Ryan Haddad <[email protected]>
Unreviewed, rolling out r254876.
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (254879 => 254880)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2020-01-21 22:02:34 UTC (rev 254879)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2020-01-21 22:04:13 UTC (rev 254880)
@@ -20,7 +20,7 @@
DisallowSyncXHRDuringPageDismissalEnabled:
type: bool
- defaultValue: true
+ defaultValue: defaultDisallowSyncXHRDuringPageDismissalEnabled()
humanReadableName: "Disallow sync XHR during page dismissal"
humanReadableDescription: "Disallow synchronous XMLHttpRequest during page dismissal"
category: experimental
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (254879 => 254880)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2020-01-21 22:02:34 UTC (rev 254879)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2020-01-21 22:04:13 UTC (rev 254880)
@@ -64,4 +64,15 @@
#endif // ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY)
+bool defaultDisallowSyncXHRDuringPageDismissalEnabled()
+{
+#if PLATFORM(MAC)
+ if (CFPreferencesGetAppBooleanValue(CFSTR("allowDeprecatedSynchronousXMLHttpRequestDuringUnload"), CFSTR("com.apple.WebKit"), nullptr)) {
+ WTFLogAlways("Allowing synchronous XHR during page unload due to managed preference");
+ return false;
+ }
+#endif
+ return true;
+}
+
} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (254879 => 254880)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2020-01-21 22:02:34 UTC (rev 254879)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2020-01-21 22:04:13 UTC (rev 254880)
@@ -310,6 +310,7 @@
bool defaultPassiveTouchListenersAsDefaultOnDocument();
bool defaultCSSOMViewScrollingAPIEnabled();
+bool defaultDisallowSyncXHRDuringPageDismissalEnabled();
#if ENABLE(TEXT_AUTOSIZING)
bool defaultTextAutosizingUsesIdempotentMode();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes