Title: [231130] trunk/Source
Revision
231130
Author
[email protected]
Date
2018-04-27 22:53:03 -0700 (Fri, 27 Apr 2018)

Log Message

Add logging when SpringBoard enables WebThread
<https://webkit.org/b/185100>
<rdar://problem/39746542>

Reviewed by Daniel Bates.

Source/WebCore:

* platform/RuntimeApplicationChecks.h:
(WebCore::IOSApplication::isSpringBoard): Add declaration.
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::IOSApplication::isSpringBoard): Add implementation.
* platform/ios/wak/WebCoreThread.mm:
(WebThreadEnable): Call RELEASE_LOG_FAULT() if this is called by
SpringBoard.

Source/WTF:

* wtf/Assertions.h:
(RELEASE_LOG_FAULT): Add macro to call os_log_fault().
* wtf/Platform.h: Drive-by fix to enable USE(OS_LOG) on
public iOS SDKs since <rdar://problem/27758343> was
fixed in iOS 11.0.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (231129 => 231130)


--- trunk/Source/WTF/ChangeLog	2018-04-28 03:32:24 UTC (rev 231129)
+++ trunk/Source/WTF/ChangeLog	2018-04-28 05:53:03 UTC (rev 231130)
@@ -1,3 +1,17 @@
+2018-04-27  David Kilzer  <[email protected]>
+
+        Add logging when SpringBoard enables WebThread
+        <https://webkit.org/b/185100>
+        <rdar://problem/39746542>
+
+        Reviewed by Daniel Bates.
+
+        * wtf/Assertions.h:
+        (RELEASE_LOG_FAULT): Add macro to call os_log_fault().
+        * wtf/Platform.h: Drive-by fix to enable USE(OS_LOG) on
+        public iOS SDKs since <rdar://problem/27758343> was
+        fixed in iOS 11.0.
+
 2018-04-26  Mark Lam  <[email protected]>
 
         Gardening: Speculative build fix for Windows.

Modified: trunk/Source/WTF/wtf/Assertions.h (231129 => 231130)


--- trunk/Source/WTF/wtf/Assertions.h	2018-04-28 03:32:24 UTC (rev 231129)
+++ trunk/Source/WTF/wtf/Assertions.h	2018-04-28 05:53:03 UTC (rev 231130)
@@ -445,6 +445,7 @@
 #if RELEASE_LOG_DISABLED
 #define RELEASE_LOG(channel, ...) ((void)0)
 #define RELEASE_LOG_ERROR(channel, ...) LOG_ERROR(__VA_ARGS__)
+#define RELEASE_LOG_FAULT(channel, ...) LOG_ERROR(__VA_ARGS__)
 
 #define RELEASE_LOG_IF(isAllowed, channel, ...) ((void)0)
 #define RELEASE_LOG_ERROR_IF(isAllowed, channel, ...) do { if (isAllowed) RELEASE_LOG_ERROR(channel, __VA_ARGS__); } while (0)
@@ -454,6 +455,7 @@
 #else
 #define RELEASE_LOG(channel, ...) os_log(LOG_CHANNEL(channel).osLogChannel, __VA_ARGS__)
 #define RELEASE_LOG_ERROR(channel, ...) os_log_error(LOG_CHANNEL(channel).osLogChannel, __VA_ARGS__)
+#define RELEASE_LOG_FAULT(channel, ...) os_log_fault(LOG_CHANNEL(channel).osLogChannel, __VA_ARGS__)
 #define RELEASE_LOG_INFO(channel, ...) os_log_info(LOG_CHANNEL(channel).osLogChannel, __VA_ARGS__)
 
 #define RELEASE_LOG_IF(isAllowed, channel, ...) do { if (isAllowed) RELEASE_LOG(      channel, __VA_ARGS__); } while (0)

Modified: trunk/Source/WTF/wtf/Platform.h (231129 => 231130)


--- trunk/Source/WTF/wtf/Platform.h	2018-04-28 03:32:24 UTC (rev 231129)
+++ trunk/Source/WTF/wtf/Platform.h	2018-04-28 05:53:03 UTC (rev 231130)
@@ -1263,8 +1263,7 @@
 #define USE_MEDIATOOLBOX 1
 #endif
 
-/* FIXME: Enable USE_OS_LOG when building with the public iOS 10 SDK once we fix <rdar://problem/27758343>. */
-#if PLATFORM(MAC) || (PLATFORM(IOS) && USE(APPLE_INTERNAL_SDK))
+#if PLATFORM(MAC) || PLATFORM(IOS)
 #define USE_OS_LOG 1
 #if USE(APPLE_INTERNAL_SDK)
 #define USE_OS_STATE 1

Modified: trunk/Source/WebCore/ChangeLog (231129 => 231130)


--- trunk/Source/WebCore/ChangeLog	2018-04-28 03:32:24 UTC (rev 231129)
+++ trunk/Source/WebCore/ChangeLog	2018-04-28 05:53:03 UTC (rev 231130)
@@ -1,3 +1,19 @@
+2018-04-27  David Kilzer  <[email protected]>
+
+        Add logging when SpringBoard enables WebThread
+        <https://webkit.org/b/185100>
+        <rdar://problem/39746542>
+
+        Reviewed by Daniel Bates.
+
+        * platform/RuntimeApplicationChecks.h:
+        (WebCore::IOSApplication::isSpringBoard): Add declaration.
+        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+        (WebCore::IOSApplication::isSpringBoard): Add implementation.
+        * platform/ios/wak/WebCoreThread.mm:
+        (WebThreadEnable): Call RELEASE_LOG_FAULT() if this is called by
+        SpringBoard.
+
 2018-04-27  Keith Rollin  <[email protected]>
 
         Fix crash in DocumentLoader::startLoadingMainResource

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (231129 => 231130)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2018-04-28 03:32:24 UTC (rev 231129)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2018-04-28 05:53:03 UTC (rev 231130)
@@ -78,6 +78,7 @@
 WEBCORE_EXPORT bool isWebBookmarksD();
 bool isDumpRenderTree();
 bool isMobileStore();
+bool isSpringBoard();
 WEBCORE_EXPORT bool isWebApp();
 WEBCORE_EXPORT bool isWebProcess();
 bool isIBooks();

Modified: trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (231129 => 231130)


--- trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm	2018-04-28 03:32:24 UTC (rev 231129)
+++ trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm	2018-04-28 05:53:03 UTC (rev 231130)
@@ -206,6 +206,12 @@
     return isMobileStore;
 }
 
+bool IOSApplication::isSpringBoard()
+{
+    static bool isSpringBoard = applicationBundleIsEqualTo("com.apple.springboard");
+    return isSpringBoard;
+}
+
 bool IOSApplication::isWebApp()
 {
     static bool isWebApp = applicationBundleIsEqualTo("com.apple.webapp");

Modified: trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm (231129 => 231130)


--- trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm	2018-04-28 03:32:24 UTC (rev 231129)
+++ trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm	2018-04-28 05:53:03 UTC (rev 231130)
@@ -30,6 +30,7 @@
 
 #import "CommonVM.h"
 #import "FloatingPointEnvironment.h"
+#import "Logging.h"
 #import "RuntimeApplicationChecks.h"
 #import "ThreadGlobalData.h"
 #import "WAKWindow.h"
@@ -876,6 +877,8 @@
 void WebThreadEnable(void)
 {
     RELEASE_ASSERT_WITH_MESSAGE(!WebCore::IOSApplication::isWebProcess(), "The WebProcess should never run a Web Thread");
+    if (WebCore::IOSApplication::isSpringBoard())
+        RELEASE_LOG_FAULT(Threading, "SpringBoard enabled WebThread.");
 
     static std::once_flag flag;
     std::call_once(flag, StartWebThread);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to