Title: [266355] trunk/Source/WebCore
Revision
266355
Author
wei...@apple.com
Date
2020-08-31 09:13:55 -0700 (Mon, 31 Aug 2020)

Log Message

DeprecatedGlobalSettings::globalConstRedeclarationShouldThrow() is not actually a setting, so should not be in DeprecatedGlobalSettings
https://bugs.webkit.org/show_bug.cgi?id=215978

Reviewed by Darin Adler.

Move behavior quirk defined by DeprecatedGlobalSettings::globalConstRedeclarationShouldThrow() to its
only call site in CommonVM.cpp

* bindings/js/CommonVM.cpp:
(WebCore::globalConstRedeclarationShouldThrow):
(WebCore::commonVMSlow):
* page/DeprecatedGlobalSettings.cpp:
(WebCore::DeprecatedGlobalSettings::globalConstRedeclarationShouldThrow): Deleted.
* page/DeprecatedGlobalSettings.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (266354 => 266355)


--- trunk/Source/WebCore/ChangeLog	2020-08-31 15:51:14 UTC (rev 266354)
+++ trunk/Source/WebCore/ChangeLog	2020-08-31 16:13:55 UTC (rev 266355)
@@ -1,3 +1,20 @@
+2020-08-31  Sam Weinig  <wei...@apple.com>
+
+        DeprecatedGlobalSettings::globalConstRedeclarationShouldThrow() is not actually a setting, so should not be in DeprecatedGlobalSettings
+        https://bugs.webkit.org/show_bug.cgi?id=215978
+
+        Reviewed by Darin Adler.
+
+        Move behavior quirk defined by DeprecatedGlobalSettings::globalConstRedeclarationShouldThrow() to its 
+        only call site in CommonVM.cpp
+
+        * bindings/js/CommonVM.cpp:
+        (WebCore::globalConstRedeclarationShouldThrow):
+        (WebCore::commonVMSlow):
+        * page/DeprecatedGlobalSettings.cpp:
+        (WebCore::DeprecatedGlobalSettings::globalConstRedeclarationShouldThrow): Deleted.
+        * page/DeprecatedGlobalSettings.h:
+
 2020-08-31  Alex Christensen  <achristen...@webkit.org>
 
         Make Big5 encoder conform to the specification and behavior of Chrome and Firefox

Modified: trunk/Source/WebCore/bindings/js/CommonVM.cpp (266354 => 266355)


--- trunk/Source/WebCore/bindings/js/CommonVM.cpp	2020-08-31 15:51:14 UTC (rev 266354)
+++ trunk/Source/WebCore/bindings/js/CommonVM.cpp	2020-08-31 16:13:55 UTC (rev 266355)
@@ -27,8 +27,8 @@
 #include "CommonVM.h"
 
 #include "DOMWindow.h"
-#include "DeprecatedGlobalSettings.h"
 #include "Frame.h"
+#include "RuntimeApplicationChecks.h"
 #include "ScriptController.h"
 #include "WebCoreJSClientData.h"
 #include <_javascript_Core/HeapInlines.h>
@@ -44,6 +44,18 @@
 
 namespace WebCore {
 
+// FIXME: <rdar://problem/25965028> This should be removed or replaced with a Setting that iBooks can use if it is still needed.
+static bool globalConstRedeclarationShouldThrow()
+{
+#if PLATFORM(MAC)
+    return !MacApplication::isIBooks();
+#elif PLATFORM(IOS_FAMILY)
+    return !IOSApplication::isIBooks();
+#else
+    return true;
+#endif
+}
+
 JSC::VM* g_commonVMOrNull;
 
 JSC::VM& commonVMSlow()
@@ -74,7 +86,7 @@
     vm.heap.machineThreads().addCurrentThread();
 #endif
 
-    vm.setGlobalConstRedeclarationShouldThrow(DeprecatedGlobalSettings::globalConstRedeclarationShouldThrow());
+    vm.setGlobalConstRedeclarationShouldThrow(globalConstRedeclarationShouldThrow());
 
     JSVMClientData::initNormalWorld(&vm);
 

Modified: trunk/Source/WebCore/page/DeprecatedGlobalSettings.cpp (266354 => 266355)


--- trunk/Source/WebCore/page/DeprecatedGlobalSettings.cpp	2020-08-31 15:51:14 UTC (rev 266354)
+++ trunk/Source/WebCore/page/DeprecatedGlobalSettings.cpp	2020-08-31 16:13:55 UTC (rev 266355)
@@ -28,7 +28,6 @@
 
 #include "AudioSession.h"
 #include "HTMLMediaElement.h"
-#include "RuntimeApplicationChecks.h"
 #include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
@@ -197,17 +196,6 @@
 }
 #endif
 
-bool DeprecatedGlobalSettings::globalConstRedeclarationShouldThrow()
-{
-#if PLATFORM(MAC)
-    return !MacApplication::isIBooks();
-#elif PLATFORM(IOS_FAMILY)
-    return !IOSApplication::isIBooks();
-#else
-    return true;
-#endif
-}
-
 void DeprecatedGlobalSettings::setAllowsAnySSLCertificate(bool allowAnySSLCertificate)
 {
     gAllowsAnySSLCertificate = allowAnySSLCertificate;

Modified: trunk/Source/WebCore/page/DeprecatedGlobalSettings.h (266354 => 266355)


--- trunk/Source/WebCore/page/DeprecatedGlobalSettings.h	2020-08-31 15:51:14 UTC (rev 266354)
+++ trunk/Source/WebCore/page/DeprecatedGlobalSettings.h	2020-08-31 16:13:55 UTC (rev 266355)
@@ -39,8 +39,6 @@
     static bool shouldUseHighResolutionTimers() { return gShouldUseHighResolutionTimers; }
 #endif
 
-    static bool globalConstRedeclarationShouldThrow();
-
 #if USE(AVFOUNDATION)
     WEBCORE_EXPORT static void setAVFoundationEnabled(bool flag);
     static bool isAVFoundationEnabled() { return gAVFoundationEnabled; }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to