Commit 866b5d48 authored by andersca@apple.com's avatar andersca@apple.com
Browse files

2011-01-18 Anders Carlsson <andersca@apple.com>

        Reviewed by Darin Adler.

        Assertion when loading two URLs in quick succession
        https://bugs.webkit.org/show_bug.cgi?id=52649
        <rdar://problem/8764645>

        If beginLoad is called twice without didStartProvisionalLoad being called in between,
        m_pendingProvisionalSandboxExtension would be non-null and an assert would fire.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
        Instead of asserting that m_pendingProvisionalSandboxExtension is null, invalidate it
        if it is not null, since that's valid.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent aa663460
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Assertion when loading two URLs in quick succession
https://bugs.webkit.org/show_bug.cgi?id=52649
<rdar://problem/8764645>
If beginLoad is called twice without didStartProvisionalLoad being called in between,
m_pendingProvisionalSandboxExtension would be non-null and an assert would fire.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::SandboxExtensionTracker::beginLoad):
Instead of asserting that m_pendingProvisionalSandboxExtension is null, invalidate it
if it is not null, since that's valid.
2011-01-18 Anders Carlsson <andersca@apple.com>
 
Reviewed by Sam Weinig.
......@@ -1590,7 +1590,13 @@ void WebPage::SandboxExtensionTracker::beginLoad(WebFrame* frame, const SandboxE
{
ASSERT(frame->isMainFrame());
ASSERT(!m_pendingProvisionalSandboxExtension);
// If we get two beginLoad calls in succession, without a provisional load starting, then
// m_pendingProvisionalSandboxExtension will be non-null. Invalidate and null out the extension if that is the case.
if (m_pendingProvisionalSandboxExtension) {
m_pendingProvisionalSandboxExtension->invalidate();
m_pendingProvisionalSandboxExtension = nullptr;
}
m_pendingProvisionalSandboxExtension = SandboxExtension::create(handle);
}
......@@ -1633,7 +1639,7 @@ void WebPage::SandboxExtensionTracker::didFailProvisionalLoad(WebFrame* frame)
return;
m_provisionalSandboxExtension->invalidate();
m_provisionalSandboxExtension = 0;
m_provisionalSandboxExtension = nullptr;
}
bool WebPage::hasLocalDataForURL(const KURL& url)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment