Changeset 85770 in webkit


Ignore:
Timestamp:
May 4, 2011 11:55:18 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-04 Mark Pilgrim <pilgrim@chromium.org>

Reviewed by Tony Chang.

IndexedDB open (database) should fail if name is null
https://bugs.webkit.org/show_bug.cgi?id=60022

  • storage/indexeddb/mozilla/open-database-null-name-expected.txt: Added.
  • storage/indexeddb/mozilla/open-database-null-name.html: Added.

2011-05-04 Mark Pilgrim <pilgrim@chromium.org>

Reviewed by Tony Chang.

IndexedDB open (database) should fail if name is null
https://bugs.webkit.org/show_bug.cgi?id=60022

Test: storage/indexeddb/mozilla/open-database-null-name.html

Combination problem: Bug in IDL didn't pass null values to .cpp layer,
then .cpp layer didn't check for null value anyway.

  • storage/IDBFactory.cpp: (WebCore::IDBFactory::open): check for null name
  • storage/IDBFactory.idl: pass null name as null
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r85769 r85770  
     12011-05-04  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        Reviewed by Tony Chang.
     4
     5        IndexedDB open (database) should fail if name is null
     6        https://bugs.webkit.org/show_bug.cgi?id=60022
     7
     8        * storage/indexeddb/mozilla/open-database-null-name-expected.txt: Added.
     9        * storage/indexeddb/mozilla/open-database-null-name.html: Added.
     10
    1112011-05-04  Ojan Vafai  <ojan@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r85767 r85770  
     12011-05-04  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        Reviewed by Tony Chang.
     4
     5        IndexedDB open (database) should fail if name is null
     6        https://bugs.webkit.org/show_bug.cgi?id=60022
     7
     8        Test: storage/indexeddb/mozilla/open-database-null-name.html
     9
     10        Combination problem: Bug in IDL didn't pass null values to .cpp layer,
     11        then .cpp layer didn't check for null value anyway.
     12
     13        * storage/IDBFactory.cpp:
     14        (WebCore::IDBFactory::open): check for null name
     15        * storage/IDBFactory.idl: pass null name as null
     16
    1172011-05-04  Jer Noble  <jer.noble@apple.com>
    218
  • trunk/Source/WebCore/storage/IDBFactory.cpp

    r85395 r85770  
    7070        return 0;
    7171
    72 
    73     // FIXME: Raise a NON_TRANSIENT_ERR if the name is invalid.
    74 
     72    if (name.isNull()) {
     73        ec = IDBDatabaseException::NON_TRANSIENT_ERR;
     74        return 0;
     75    }
    7576
    7677    RefPtr<IDBRequest> request = IDBRequest::create(document, IDBAny::create(this), 0);
  • trunk/Source/WebCore/storage/IDBFactory.idl

    r72753 r85770  
    2929        Conditional=INDEXED_DATABASE
    3030    ] IDBFactory {
    31         [CallWith=ScriptExecutionContext] IDBRequest open(in DOMString name)
     31        [CallWith=ScriptExecutionContext] IDBRequest open(in [ConvertNullToNullString] DOMString name)
    3232            raises (IDBDatabaseException);
    3333    };
Note: See TracChangeset for help on using the changeset viewer.