Title: [144788] trunk/Source/WebKit2
- Revision
- 144788
- Author
- a...@apple.com
- Date
- 2013-03-05 11:17:19 -0800 (Tue, 05 Mar 2013)
Log Message
<rdar://problem/13269245> Crashes creating WebKit processes in WKSandboxExtensionConsume
https://bugs.webkit.org/show_bug.cgi?id=111456
Reviewed by Anders Carlsson.
It's too late to be draconian about this condition here, crashing doesn't help
diagnose what went wrong when creating a sandbox extension.
Other SandboxExtension functions already have null checks for WKSandboxExtensionRef,
and so should consumePermanently().
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::createHandle): For now, added logging when extension
creation fails. If that proves insufficiently helpful in practice, we can change
to a CRASH() later.
(WebKit::SandboxExtension::createHandleForTemporaryFile): Ditto.
(WebKit::SandboxExtension::consumePermanently): Gracefully fail if there is no extension
to consume.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (144787 => 144788)
--- trunk/Source/WebKit2/ChangeLog 2013-03-05 19:16:54 UTC (rev 144787)
+++ trunk/Source/WebKit2/ChangeLog 2013-03-05 19:17:19 UTC (rev 144788)
@@ -1,3 +1,24 @@
+2013-03-05 Alexey Proskuryakov <a...@apple.com>
+
+ <rdar://problem/13269245> Crashes creating WebKit processes in WKSandboxExtensionConsume
+ https://bugs.webkit.org/show_bug.cgi?id=111456
+
+ Reviewed by Anders Carlsson.
+
+ It's too late to be draconian about this condition here, crashing doesn't help
+ diagnose what went wrong when creating a sandbox extension.
+
+ Other SandboxExtension functions already have null checks for WKSandboxExtensionRef,
+ and so should consumePermanently().
+
+ * Shared/mac/SandboxExtensionMac.mm:
+ (WebKit::SandboxExtension::createHandle): For now, added logging when extension
+ creation fails. If that proves insufficiently helpful in practice, we can change
+ to a CRASH() later.
+ (WebKit::SandboxExtension::createHandleForTemporaryFile): Ditto.
+ (WebKit::SandboxExtension::consumePermanently): Gracefully fail if there is no extension
+ to consume.
+
2013-03-05 Gwang Yoon Hwang <ryum...@company100.net>
Coordinated Graphics: CoordinatedGraphicsLayer makes CoordinatedGraphicsScene perform via CoordinatedGraphicsState.
Modified: trunk/Source/WebKit2/Shared/mac/SandboxExtensionMac.mm (144787 => 144788)
--- trunk/Source/WebKit2/Shared/mac/SandboxExtensionMac.mm 2013-03-05 19:16:54 UTC (rev 144787)
+++ trunk/Source/WebKit2/Shared/mac/SandboxExtensionMac.mm 2013-03-05 19:17:19 UTC (rev 144788)
@@ -216,6 +216,8 @@
CString standardizedPath = resolveSymlinksInPath([[(NSString *)path stringByStandardizingPath] fileSystemRepresentation]);
handle.m_sandboxExtension = WKSandboxExtensionCreate(standardizedPath.data(), wkSandboxExtensionType(type));
+ if (!handle.m_sandboxExtension)
+ WTFLogAlways("Could not create a sandbox extension for '%s'", path.utf8().data());
}
void SandboxExtension::createHandleForReadWriteDirectory(const String& path, SandboxExtension::Handle& handle)
@@ -250,6 +252,7 @@
handle.m_sandboxExtension = WKSandboxExtensionCreate(fileSystemRepresentation(path.data()).data(), wkSandboxExtensionType(type));
if (!handle.m_sandboxExtension) {
+ WTFLogAlways("Could not create a sandbox extension for temporary file '%s'", path.data());
return String();
}
return String(path.data());
@@ -303,7 +306,8 @@
bool SandboxExtension::consumePermanently(const Handle& handle)
{
- ASSERT(handle.m_sandboxExtension);
+ if (!handle.m_sandboxExtension)
+ return false;
bool result = WKSandboxExtensionConsume(handle.m_sandboxExtension);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes