Skip to content
  • mkwst@chromium.org's avatar
    IDBFactory::webkitGetDatabaseNames should raise DOMExceptions. · 4697cbba
    mkwst@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=108154
    
    Reviewed by Jochen Eisinger.
    
    In order to properly support blocking third-party IndexedDB usage,
    open(), getDatabaseNames(), and deleteDatabase() should all throw
    SECURITY_ERR when used in a blocked third-party context. That's possible
    now for open() and deleteDatabase(), but getDatabaseNames() can't
    currently raise exceptions.
    
    This patch adjusts the IDL file and implementation. No exceptions are
    currently thrown, but that will change as soon as wkbug.com/94171 lands.
    
    * Modules/indexeddb/IDBFactory.cpp:
    (WebCore::IDBFactory::getDatabaseNames):
    * Modules/indexeddb/IDBFactory.h:
    (IDBFactory):
    * Modules/indexeddb/IDBFactory.idl:
        Add "raises (DOMException)" to getDatabaseNames, and adjust the
        implementation to match.
    * inspector/InspectorIndexedDBAgent.cpp:
    (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
        Pass in an ExceptionCode when calling getDatabaseNames, and handle
        possible exceptions.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4697cbba