Title: [152805] trunk/Source/WebKit2
- Revision
- 152805
- Author
- [email protected]
- Date
- 2013-07-17 15:05:45 -0700 (Wed, 17 Jul 2013)
Log Message
[Mac] Crashes in CFURLGetBytes under WebProcess::updateActivePages()
https://bugs.webkit.org/show_bug.cgi?id=118814
<rdar://problem/14173389>
Reviewed by Brady Eidson.
Speculative fix. It's unclear how we end up with an invalid URL when committing
a load.
* WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
Added a null check.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (152804 => 152805)
--- trunk/Source/WebKit2/ChangeLog 2013-07-17 21:48:40 UTC (rev 152804)
+++ trunk/Source/WebKit2/ChangeLog 2013-07-17 22:05:45 UTC (rev 152805)
@@ -1,3 +1,17 @@
+2013-07-17 Alexey Proskuryakov <[email protected]>
+
+ [Mac] Crashes in CFURLGetBytes under WebProcess::updateActivePages()
+ https://bugs.webkit.org/show_bug.cgi?id=118814
+ <rdar://problem/14173389>
+
+ Reviewed by Brady Eidson.
+
+ Speculative fix. It's unclear how we end up with an invalid URL when committing
+ a load.
+
+ * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
+ Added a null check.
+
2013-07-17 Commit Queue <[email protected]>
Unreviewed, rolling out r152786 and r152789.
Modified: trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm (152804 => 152805)
--- trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm 2013-07-17 21:48:40 UTC (rev 152804)
+++ trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm 2013-07-17 22:05:45 UTC (rev 152805)
@@ -238,7 +238,14 @@
mainFrameOriginString = mainFrameOrigin->toRawString();
else
mainFrameOriginString = KURL(KURL(), mainFrame->url()).protocol() + ':'; // toRawString() is not supposed to work with unique origins, and would just return "://".
- CFArrayAppendValue(activePageURLs.get(), userVisibleString([NSURL URLWithString:mainFrameOriginString]));
+
+ NSURL *originAsNSURL = [NSURL URLWithString:mainFrameOriginString];
+ // +[NSURL URLWithString:] returns nil when its argument is malformed. It's unclear how we can possibly have a malformed URL here,
+ // but it happens in practice according to <rdar://problem/14173389>. Leaving an assertion in to catch a reproducible case.
+ ASSERT(originAsNSURL);
+ NSString *userVisibleOriginString = originAsNSURL ? userVisibleString(originAsNSURL) : @"(null)";
+
+ CFArrayAppendValue(activePageURLs.get(), userVisibleOriginString);
}
WKSetApplicationInformationItem(kLSActivePageUserVisibleOriginsKey, activePageURLs.get());
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes