Title: [255292] branches/safari-610.1.1-branch/Source/WebKit
Revision
255292
Author
[email protected]
Date
2020-01-28 13:49:29 -0800 (Tue, 28 Jan 2020)

Log Message

Cherry-pick r254880. rdar://problem/58644447

    [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:

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

Modified Paths

Diff

Modified: branches/safari-610.1.1-branch/Source/WebKit/ChangeLog (255291 => 255292)


--- branches/safari-610.1.1-branch/Source/WebKit/ChangeLog	2020-01-28 21:49:27 UTC (rev 255291)
+++ branches/safari-610.1.1-branch/Source/WebKit/ChangeLog	2020-01-28 21:49:29 UTC (rev 255292)
@@ -1,5 +1,41 @@
 2020-01-28  Russell Epstein  <[email protected]>
 
+        Cherry-pick r254880. rdar://problem/58644447
+
+    [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:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-28  Russell Epstein  <[email protected]>
+
         Cherry-pick r254723. rdar://problem/58664141
 
     Call AtomString::init in WebKit2Initialize.

Modified: branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferences.yaml (255291 => 255292)


--- branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferences.yaml	2020-01-28 21:49:27 UTC (rev 255291)
+++ branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferences.yaml	2020-01-28 21:49:29 UTC (rev 255292)
@@ -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: branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (255291 => 255292)


--- branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2020-01-28 21:49:27 UTC (rev 255291)
+++ branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2020-01-28 21:49:29 UTC (rev 255292)
@@ -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: branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h (255291 => 255292)


--- branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2020-01-28 21:49:27 UTC (rev 255291)
+++ branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2020-01-28 21:49:29 UTC (rev 255292)
@@ -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

Reply via email to