WebKit Bugzilla
Attachment 339043 Details for
Bug 185100
: Add logging when SpringBoard enables WebThread
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v1
bug-185100-20180427171907.patch (text/plain), 5.57 KB, created by
David Kilzer (:ddkilzer)
on 2018-04-27 17:19:08 PDT
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2018-04-27 17:19:08 PDT
Size:
5.57 KB
patch
obsolete
>Subversion Revision: 231115 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 6cb0c0e3c20f8b5424e7e2ca2511b80676152ea4..5c2931a678ad3c69770abcdae9373eb4cf40f1f0 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,16 @@ >+2018-04-27 David Kilzer <ddkilzer@apple.com> >+ >+ Add logging when SpringBoard enables WebThread >+ <https://webkit.org/b/185100> >+ <rdar://problem/39746542> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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. >+ > 2018-04-26 Mark Lam <mark.lam@apple.com> > > Gardening: Speculative build fix for Windows. >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 655d0a1e662ed86a3f1f7f41ed5b64a6c62b7ff5..db8e70abbf63856f5a4b3b0943d6b817c3f19e9b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-04-27 David Kilzer <ddkilzer@apple.com> >+ >+ Add logging when SpringBoard enables WebThread >+ <https://webkit.org/b/185100> >+ <rdar://problem/39746542> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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 Chris Dumez <cdumez@apple.com> > > Use WindowProxy instead of DOMWindow in our IDL >diff --git a/Source/WTF/wtf/Assertions.h b/Source/WTF/wtf/Assertions.h >index ea0024b1f14f654c1a6d1c4bb99ee16db123f155..d823f7c5fe3c82d7e30311d7288a3dcd332cabaa 100644 >--- a/Source/WTF/wtf/Assertions.h >+++ b/Source/WTF/wtf/Assertions.h >@@ -445,6 +445,7 @@ WTF_EXPORT_PRIVATE NO_RETURN_DUE_TO_CRASH void WTFCrashWithSecurityImplication(v > #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 @@ WTF_EXPORT_PRIVATE NO_RETURN_DUE_TO_CRASH void WTFCrashWithSecurityImplication(v > #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) >diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h >index d9ba17666cff89c344e5ae967c340e0bf1aab2ee..5ea719b16a0012dd6e9308bcb95c1caed7104c54 100644 >--- a/Source/WTF/wtf/Platform.h >+++ b/Source/WTF/wtf/Platform.h >@@ -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 >diff --git a/Source/WebCore/platform/RuntimeApplicationChecks.h b/Source/WebCore/platform/RuntimeApplicationChecks.h >index af4890d5584160dc086f453dbf0a302658f453a1..94e28f8592e1548338f28116009edc5444e9ec94 100644 >--- a/Source/WebCore/platform/RuntimeApplicationChecks.h >+++ b/Source/WebCore/platform/RuntimeApplicationChecks.h >@@ -78,6 +78,7 @@ WEBCORE_EXPORT bool isMobileSafari(); > WEBCORE_EXPORT bool isWebBookmarksD(); > bool isDumpRenderTree(); > bool isMobileStore(); >+bool isSpringBoard(); > WEBCORE_EXPORT bool isWebApp(); > WEBCORE_EXPORT bool isWebProcess(); > bool isIBooks(); >diff --git a/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm b/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm >index 58626eecc3382412cb5cc508d185ad3720582baf..377dcaa1e0d48dd80a1f5ce5255e911c157e37ae 100644 >--- a/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm >+++ b/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm >@@ -206,6 +206,12 @@ bool IOSApplication::isMobileStore() > return isMobileStore; > } > >+bool IOSApplication::isSpringBoard() >+{ >+ static bool isSpringBoard = applicationBundleIsEqualTo("com.apple.springboard"); >+ return isSpringBoard; >+} >+ > bool IOSApplication::isWebApp() > { > static bool isWebApp = applicationBundleIsEqualTo("com.apple.webapp"); >diff --git a/Source/WebCore/platform/ios/wak/WebCoreThread.mm b/Source/WebCore/platform/ios/wak/WebCoreThread.mm >index b281ecda7996a109603c054edd725883a683d595..a9610a066bceba88a9550b9fc38bc5e8a866d19a 100644 >--- a/Source/WebCore/platform/ios/wak/WebCoreThread.mm >+++ b/Source/WebCore/platform/ios/wak/WebCoreThread.mm >@@ -876,6 +876,8 @@ 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()) >+ RELEASE_LOG_FAULT(Threading, "SpringBoard enabled WebThread."); > > static std::once_flag flag; > std::call_once(flag, StartWebThread);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185100
:
339043
|
339053