Title: [199504] trunk/Source/WebKit2
- Revision
- 199504
- Author
- [email protected]
- Date
- 2016-04-13 10:51:37 -0700 (Wed, 13 Apr 2016)
Log Message
REGRESSION (r199401): Internal builds of Safari hang on launch
https://bugs.webkit.org/show_bug.cgi?id=156545
<rdar://problem/25697779>
Reviewed by Anders Carlsson.
For some reason SecCodeCopyGuestWithAttributes() is failing with an error in Apple Internal
Safari builds. For now, temporarily allow the failure while I investigate the cause in
<rdar://problem/25706517>.
* Shared/mac/CodeSigning.mm:
(WebKit::secCodeForProcess): Log the failure with OSStatus code and return nullptr;
(WebKit::codeSigningIdentifierForProcess): Return a null string if secCodeForProcess() returns a nullptr.
This will cause us to treat affected Apple Internal Safari builds the same as we would treat
an unsigned or third-party signed app.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (199503 => 199504)
--- trunk/Source/WebKit2/ChangeLog 2016-04-13 17:50:28 UTC (rev 199503)
+++ trunk/Source/WebKit2/ChangeLog 2016-04-13 17:51:37 UTC (rev 199504)
@@ -1,3 +1,21 @@
+2016-04-13 Daniel Bates <[email protected]>
+
+ REGRESSION (r199401): Internal builds of Safari hang on launch
+ https://bugs.webkit.org/show_bug.cgi?id=156545
+ <rdar://problem/25697779>
+
+ Reviewed by Anders Carlsson.
+
+ For some reason SecCodeCopyGuestWithAttributes() is failing with an error in Apple Internal
+ Safari builds. For now, temporarily allow the failure while I investigate the cause in
+ <rdar://problem/25706517>.
+
+ * Shared/mac/CodeSigning.mm:
+ (WebKit::secCodeForProcess): Log the failure with OSStatus code and return nullptr;
+ (WebKit::codeSigningIdentifierForProcess): Return a null string if secCodeForProcess() returns a nullptr.
+ This will cause us to treat affected Apple Internal Safari builds the same as we would treat
+ an unsigned or third-party signed app.
+
2016-04-13 Alex Christensen <[email protected]>
Fix client certificate authentication with NetworkSession
Modified: trunk/Source/WebKit2/Shared/mac/CodeSigning.mm (199503 => 199504)
--- trunk/Source/WebKit2/Shared/mac/CodeSigning.mm 2016-04-13 17:50:28 UTC (rev 199503)
+++ trunk/Source/WebKit2/Shared/mac/CodeSigning.mm 2016-04-13 17:51:37 UTC (rev 199504)
@@ -49,6 +49,12 @@
const void* values[] = { pidCFNumber.get() };
RetainPtr<CFDictionaryRef> attributes = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, keys, values, WTF_ARRAY_LENGTH(keys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
SecCodeRef code = nullptr;
+ OSStatus errorCode = noErr;
+ // FIXME: We should RELEASE_ASSERT() that SecCodeCopyGuestWithAttributes() returns without error. See <rdar://problem/25706517>.
+ if ((errorCode = SecCodeCopyGuestWithAttributes(nullptr, attributes.get(), kSecCSDefaultFlags, &code))) {
+ WTFLogAlways("SecCodeCopyGuestWithAttributes() failed with error: %ld\n", static_cast<long>(errorCode));
+ return nullptr;
+ }
RELEASE_ASSERT(!SecCodeCopyGuestWithAttributes(nullptr, attributes.get(), kSecCSDefaultFlags, &code));
return adoptCF(code);
}
@@ -92,7 +98,10 @@
String codeSigningIdentifierForProcess(pid_t pid)
{
- return secCodeSigningIdentifier(secCodeForProcess(pid).get());
+ auto code = secCodeForProcess(pid);
+ if (!code)
+ return String();
+ return secCodeSigningIdentifier(code.get());
}
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes