Changeset 95871 in webkit


Ignore:
Timestamp:
Sep 23, 2011 3:34:17 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[Chromium] Crash in WebCore::DatabaseObserver
https://bugs.webkit.org/show_bug.cgi?id=67805

Patch by Stephen Chenney <schenney@chromium.org> on 2011-09-23
Reviewed by David Levin.

  • src/DatabaseObserver.cpp:

(WebCore::DatabaseObserver::canEstablishDatabase): Added a check for a
null frame or page, and return false if null. Investigated
changing the fall-through return value to false but decided against
it given the way the code is used and existing default values for
related code. Reproduction and testing depends on having a document
with no frame or no page, which sometimes happens in practice but is
hard to construct explicitly.

Location:
trunk/Source/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r95861 r95871  
     12011-09-23  Stephen Chenney  <schenney@chromium.org>
     2
     3        [Chromium] Crash in WebCore::DatabaseObserver
     4        https://bugs.webkit.org/show_bug.cgi?id=67805
     5
     6        Reviewed by David Levin.
     7
     8        * src/DatabaseObserver.cpp:
     9        (WebCore::DatabaseObserver::canEstablishDatabase): Added a check for a
     10        null frame or page, and return false if null. Investigated
     11        changing the fall-through return value to false but decided against
     12        it given the way the code is used and existing default values for
     13        related code. Reproduction and testing depends on having a document
     14        with no frame or no page, which sometimes happens in practice but is
     15        hard to construct explicitly.
     16
    1172011-09-23  Scott Graham  <scottmg@chromium.org>
    218
  • trunk/Source/WebKit/chromium/src/DatabaseObserver.cpp

    r95271 r95871  
    159159        Document* document = static_cast<Document*>(scriptExecutionContext);
    160160        WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
     161        if (!webFrame)
     162            return false;
    161163        WebViewImpl* webView = webFrame->viewImpl();
     164        if (!webView)
     165            return false;
    162166        if (webView->permissionClient())
    163167            return webView->permissionClient()->allowDatabase(webFrame, name, displayName, estimatedSize);
Note: See TracChangeset for help on using the changeset viewer.