Changeset 57492 in webkit


Ignore:
Timestamp:
Apr 12, 2010 6:04:16 PM (14 years ago)
Author:
dumi@chromium.org
Message:

Throwing a SECURITY_ERR when openDatabase() cannot open a database
for whatever reason, as required by the spec.
https://bugs.webkit.org/show_bug.cgi?id=33916

Reviewed by Dimitri Glazkov.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::openDatabase):

  • bindings/v8/custom/V8DOMWindowCustom.cpp:

(WebCore::V8DOMWindow::openDatabaseCallback):

Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r57490 r57492  
     12010-04-12  Dumitru Daniliuc  <dumi@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Throwing a SECURITY_ERR when openDatabase() cannot open a database
     6        for whatever reason, as required by the spec.
     7        https://bugs.webkit.org/show_bug.cgi?id=33916
     8
     9        * bindings/js/JSDOMWindowCustom.cpp:
     10        (WebCore::JSDOMWindow::openDatabase):
     11        * bindings/v8/custom/V8DOMWindowCustom.cpp:
     12        (WebCore::V8DOMWindow::openDatabaseCallback):
     13
    1142010-04-12  Steve Falkenburg  <sfalken@apple.com>
    215
  • trunk/WebCore/bindings/js/JSDOMWindowCustom.cpp

    r56591 r57492  
    978978
    979979    JSValue result = toJS(exec, globalObject(), WTF::getPtr(impl()->openDatabase(name, version, displayName, estimatedSize, creationCallback.release(), ec)));
     980    if (!ec && result.isNull())
     981        ec = SECURITY_ERR;
     982
    980983    setDOMException(exec, ec);
    981984    return result;
  • trunk/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp

    r57207 r57492  
    736736
    737737    v8::Handle<v8::Value> result = toV8(imp->openDatabase(name, version, displayName, estimatedSize, creationCallback.release(), ec));
     738    if (!ec && result.IsEmpty())
     739        ec = SECURITY_ERR;
     740
    738741    V8Proxy::setDOMException(ec);
    739742    return result;
Note: See TracChangeset for help on using the changeset viewer.