⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 173016 in webkit


Ignore:
Timestamp:
Aug 27, 2014, 1:31:35 PM (12 years ago)
Author:
timothy@apple.com
Message:

Web Inspector: Crash when you open Web Inspector in a private window (due to IndexedDB)
​https://bugs.webkit.org/show_bug.cgi?id=136293

Reviewed by Joseph Pecoraro.

  • inspector/InspectorIndexedDBAgent.cpp:

(WebCore::InspectorIndexedDBAgent::requestDatabaseNames): Null check idbRequest from
IDBFactory::getDatabaseNames, which can return null now after r172603 in private browsing.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r173014 r173016  
     12014-08-27  Timothy Hatcher  <timothy@apple.com>
     2
     3        Web Inspector: Crash when you open Web Inspector in a private window (due to IndexedDB)
     4        https://bugs.webkit.org/show_bug.cgi?id=136293
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * inspector/InspectorIndexedDBAgent.cpp:
     9        (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): Null check idbRequest from
     10        IDBFactory::getDatabaseNames, which can return null now after r172603 in private browsing.
     11
    1122014-08-27  Beth Dakin  <bdakin@apple.com>
    213
  • trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp

    r172930 r173016  
    584584{
    585585    Document* document = frame ? frame->document() : nullptr;
    586 
    587586    if (!document)
    588587        *errorString = "No document for given frame found";
    589 
    590588    return document;
    591589}
    … …  
    598596        return nullptr;
    599597    }
     598
    600599    IDBFactory* idbFactory = DOMWindowIndexedDatabase::indexedDB(domWindow);
    601 
    602600    if (!idbFactory)
    603601        *errorString = "No IndexedDB factory for given frame found";
    … …  
    612610    if (!document)
    613611        return;
     612
    614613    IDBFactory* idbFactory = assertIDBFactory(errorString, document);
    615614    if (!idbFactory)
    … …  
    618617    ExceptionCode ec = 0;
    619618    RefPtr<IDBRequest> idbRequest = idbFactory->getDatabaseNames(document, ec);
    620     if (ec) {
     619    if (!idbRequest || ec) {
    621620        requestCallback->sendFailure("Could not obtain database names.");
    622621        return;
    623622    }
     623
    624624    idbRequest->addEventListener(eventNames().successEvent, GetDatabaseNamesCallback::create(requestCallback, document->securityOrigin()->toRawString()), false);
    625625}
    … …  
    631631    if (!document)
    632632        return;
     633
    633634    IDBFactory* idbFactory = assertIDBFactory(errorString, document);
    634635    if (!idbFactory)
    … …  
    645646    if (!document)
    646647        return;
     648
    647649    IDBFactory* idbFactory = assertIDBFactory(errorString, document);
    648650    if (!idbFactory)
Note: See TracChangeset for help on using the changeset viewer.