Title: [111434] trunk/Source
- Revision
- 111434
- Author
- [email protected]
- Date
- 2012-03-20 13:56:39 -0700 (Tue, 20 Mar 2012)
Log Message
[BlackBerry] Dijit crash WebCore::CookieManager::getRawCookies
https://bugs.webkit.org/show_bug.cgi?id=81686
Patch by Jacky Jiang <[email protected]> on 2012-03-20
Reviewed by Rob Buis.
Source/WebCore:
HTML plugin element with an empty src caused an ASSERT failure on debug
build and a crash on release build.
When getting cookie, url can be null, so we need to check for it to
avoid the crash.
No new tests as this is covered by
LayoutTests/fast/loader/empty-embed-src-attribute.html.
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::initializePlatformRequest):
Source/WebKit/blackberry:
When deciding the policy for navigation action, if the url of the
request is null, ignore it to avoid the ASSERT failure in
MainResourceLoader::willSendRequest.
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (111433 => 111434)
--- trunk/Source/WebCore/ChangeLog 2012-03-20 20:22:57 UTC (rev 111433)
+++ trunk/Source/WebCore/ChangeLog 2012-03-20 20:56:39 UTC (rev 111434)
@@ -1,3 +1,21 @@
+2012-03-20 Jacky Jiang <[email protected]>
+
+ [BlackBerry] Dijit crash WebCore::CookieManager::getRawCookies
+ https://bugs.webkit.org/show_bug.cgi?id=81686
+
+ Reviewed by Rob Buis.
+
+ HTML plugin element with an empty src caused an ASSERT failure on debug
+ build and a crash on release build.
+ When getting cookie, url can be null, so we need to check for it to
+ avoid the crash.
+
+ No new tests as this is covered by
+ LayoutTests/fast/loader/empty-embed-src-attribute.html.
+
+ * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
+ (WebCore::ResourceRequest::initializePlatformRequest):
+
2012-03-20 Vsevolod Vlasov <[email protected]>
Web Inspector: Tabbed pane drop down should be sorted.
Modified: trunk/Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp (111433 => 111434)
--- trunk/Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp 2012-03-20 20:22:57 UTC (rev 111433)
+++ trunk/Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp 2012-03-20 20:56:39 UTC (rev 111434)
@@ -189,7 +189,7 @@
// Redirection's response may contain new cookies, so add cookies again.
// If there aren't cookies in the header list, we need trying to add cookies.
- if (cookiesEnabled && (isRedirect || !httpHeaderFields().contains("Cookie"))) {
+ if (cookiesEnabled && (isRedirect || !httpHeaderFields().contains("Cookie")) && !url().isNull()) {
// Prepare a cookie header if there are cookies related to this url.
String cookiePairs = cookieManager().getCookie(url(), WithHttpOnlyCookies);
if (!cookiePairs.isEmpty())
Modified: trunk/Source/WebKit/blackberry/ChangeLog (111433 => 111434)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-03-20 20:22:57 UTC (rev 111433)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-03-20 20:56:39 UTC (rev 111434)
@@ -1,3 +1,17 @@
+2012-03-20 Jacky Jiang <[email protected]>
+
+ [BlackBerry] Dijit crash WebCore::CookieManager::getRawCookies
+ https://bugs.webkit.org/show_bug.cgi?id=81686
+
+ Reviewed by Rob Buis.
+
+ When deciding the policy for navigation action, if the url of the
+ request is null, ignore it to avoid the ASSERT failure in
+ MainResourceLoader::willSendRequest.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
+
2012-03-20 Konrad Piascik <[email protected]>
[BlackBerry] BlackBerry can clear cookies and cache from the Web Inspector
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp (111433 => 111434)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp 2012-03-20 20:22:57 UTC (rev 111433)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp 2012-03-20 20:56:39 UTC (rev 111434)
@@ -192,33 +192,33 @@
void FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& request, PassRefPtr<FormState>)
{
- PolicyAction decision = PolicyUse;
+ PolicyAction decision = PolicyIgnore;
const KURL& url = ""
-
- // Fragment scrolls on the same page should always be handled internally.
- // (Only count as a fragment scroll if we are scrolling to a #fragment url, not back to the top, and reloading
- // the same url is not a fragment scroll even if it has a #fragment.)
- const KURL& currentUrl = m_frame->document()->url();
- bool isFragmentScroll = url.hasFragmentIdentifier() && url != currentUrl && equalIgnoringFragmentIdentifier(currentUrl, url);
- if (decision == PolicyUse)
+ if (!url.isNull()) {
+ // Fragment scrolls on the same page should always be handled internally.
+ // (Only count as a fragment scroll if we are scrolling to a #fragment url, not back to the top, and reloading
+ // the same url is not a fragment scroll even if it has a #fragment.)
+ const KURL& currentUrl = m_frame->document()->url();
+ bool isFragmentScroll = url.hasFragmentIdentifier() && url != currentUrl && equalIgnoringFragmentIdentifier(currentUrl, url);
decision = decidePolicyForExternalLoad(request, isFragmentScroll);
- // Let the client have a chance to say whether this navigation should
- // be ignored or not.
- BlackBerry::Platform::NetworkRequest platformRequest;
- request.initializePlatformRequest(platformRequest, cookiesEnabled());
- if (isMainFrame() && !m_webPagePrivate->m_client->acceptNavigationRequest(
- platformRequest, BlackBerry::Platform::NavigationType(action.type()))) {
- if (action.type() == NavigationTypeFormSubmitted
- || action.type() == NavigationTypeFormResubmitted)
- m_frame->loader()->resetMultipleFormSubmissionProtection();
+ // Let the client have a chance to say whether this navigation should
+ // be ignored or not.
+ BlackBerry::Platform::NetworkRequest platformRequest;
+ request.initializePlatformRequest(platformRequest, cookiesEnabled());
+ if (isMainFrame() && !m_webPagePrivate->m_client->acceptNavigationRequest(
+ platformRequest, BlackBerry::Platform::NavigationType(action.type()))) {
+ if (action.type() == NavigationTypeFormSubmitted
+ || action.type() == NavigationTypeFormResubmitted)
+ m_frame->loader()->resetMultipleFormSubmissionProtection();
- if (action.type() == NavigationTypeLinkClicked && url.hasFragmentIdentifier()) {
- ResourceRequest emptyRequest;
- m_frame->loader()->activeDocumentLoader()->setLastCheckedRequest(emptyRequest);
+ if (action.type() == NavigationTypeLinkClicked && url.hasFragmentIdentifier()) {
+ ResourceRequest emptyRequest;
+ m_frame->loader()->activeDocumentLoader()->setLastCheckedRequest(emptyRequest);
+ }
+ decision = PolicyIgnore;
}
- decision = PolicyIgnore;
}
// If we abort here, dispatchDidCancelClientRedirect will not be called.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes