Add logging when splashboardd enables WebThread
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jun 2018 14:02:27 +0000 (14:02 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jun 2018 14:02:27 +0000 (14:02 +0000)
<https://webkit.org/b/186793>
<rdar://problem/41213255>

Reviewed by Daniel Bates.

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

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

Source/WebCore/ChangeLog
Source/WebCore/platform/RuntimeApplicationChecks.h
Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm
Source/WebCore/platform/ios/wak/WebCoreThread.mm

index 6738c9f..2b36c20 100644 (file)
@@ -1,3 +1,19 @@
+2018-06-19  David Kilzer  <ddkilzer@apple.com>
+
+        Add logging when splashboardd enables WebThread
+        <https://webkit.org/b/186793>
+        <rdar://problem/41213255>
+
+        Reviewed by Daniel Bates.
+
+        * platform/RuntimeApplicationChecks.h:
+        (WebCore::IOSApplication::isSplashBoardd): Add declaration.
+        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+        (WebCore::IOSApplication::isSplashBoardd): Add implementation.
+        * platform/ios/wak/WebCoreThread.mm:
+        (WebThreadEnable): Call RELEASE_LOG_FAULT() if this is called by
+        splashboardd.
+
 2018-06-19  Miguel Gomez  <magomez@igalia.com>
 
         [GTK][WPE][Nicosia] Add environment variable to enable threaded rendering and set the number of painting threads
index 94e28f8..7fe2116 100644 (file)
@@ -78,6 +78,7 @@ WEBCORE_EXPORT bool isMobileSafari();
 WEBCORE_EXPORT bool isWebBookmarksD();
 bool isDumpRenderTree();
 bool isMobileStore();
+bool isSplashBoardd();
 bool isSpringBoard();
 WEBCORE_EXPORT bool isWebApp();
 WEBCORE_EXPORT bool isWebProcess();
index 2f379a3..6dd9151 100644 (file)
@@ -206,6 +206,12 @@ bool IOSApplication::isMobileStore()
     return isMobileStore;
 }
 
+bool IOSApplication::isSplashBoardd()
+{
+    static bool isSplashBoardd = applicationBundleIsEqualTo(ASCIILiteral("splashboardd"));
+    return isSplashBoardd;
+}
+
 bool IOSApplication::isSpringBoard()
 {
     static bool isSpringBoard = applicationBundleIsEqualTo(ASCIILiteral("com.apple.springboard"));
index 43bb32a..d8ff806 100644 (file)
@@ -866,7 +866,9 @@ WebThreadContext* WebThreadCurrentContext(void)
 void WebThreadEnable(void)
 {
     RELEASE_ASSERT_WITH_MESSAGE(!WebCore::IOSApplication::isWebProcess(), "The WebProcess should never run a Web Thread");
-    if (WebCore::IOSApplication::isSpringBoard())
+    if (WebCore::IOSApplication::isSplashBoardd())
+        RELEASE_LOG_FAULT(Threading, "splashboardd enabled WebThread.");
+    else if (WebCore::IOSApplication::isSpringBoard())
         RELEASE_LOG_FAULT(Threading, "SpringBoard enabled WebThread.");
 
     static std::once_flag flag;