Title: [232031] trunk/Source/WebKit
- Revision
- 232031
- Author
- [email protected]
- Date
- 2018-05-21 15:10:35 -0700 (Mon, 21 May 2018)
Log Message
Web Automation: always return an empty cookie list if document.cookieURL() is empty
https://bugs.webkit.org/show_bug.cgi?id=185838
<rdar://problem/37737526>
Reviewed by Tim Horton.
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
This crashes in CFNetwork code because an empty cookie URL is not a valid input.
Just return an empty list since there couldn't be any cookies returned.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (232030 => 232031)
--- trunk/Source/WebKit/ChangeLog 2018-05-21 21:53:46 UTC (rev 232030)
+++ trunk/Source/WebKit/ChangeLog 2018-05-21 22:10:35 UTC (rev 232031)
@@ -1,5 +1,18 @@
2018-05-21 Brian Burg <[email protected]>
+ Web Automation: always return an empty cookie list if document.cookieURL() is empty
+ https://bugs.webkit.org/show_bug.cgi?id=185838
+ <rdar://problem/37737526>
+
+ Reviewed by Tim Horton.
+
+ * WebProcess/Automation/WebAutomationSessionProxy.cpp:
+ (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
+ This crashes in CFNetwork code because an empty cookie URL is not a valid input.
+ Just return an empty list since there couldn't be any cookies returned.
+
+2018-05-21 Brian Burg <[email protected]>
+
Web Automation: terminate the automation session if the network or storage process crashes
https://bugs.webkit.org/show_bug.cgi?id=185827
<rdar://problem/40424020>
Modified: trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp (232030 => 232031)
--- trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp 2018-05-21 21:53:46 UTC (rev 232030)
+++ trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp 2018-05-21 22:10:35 UTC (rev 232031)
@@ -751,7 +751,8 @@
// This returns the same list of cookies as when evaluating `document.cookies` in _javascript_.
auto& document = *frame->coreFrame()->document();
Vector<WebCore::Cookie> foundCookies;
- WebCore::getRawCookies(document, document.cookieURL(), foundCookies);
+ if (!document.cookieURL().isEmpty())
+ WebCore::getRawCookies(document, document.cookieURL(), foundCookies);
WebProcess::singleton().parentProcessConnection()->send(Messages::WebAutomationSession::DidGetCookiesForFrame(callbackID, foundCookies, String()), 0);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes