[Webkit-unassigned] [Bug 101189] New: can't create object store with null keyPath

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 5 00:34:30 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=101189

           Summary: can't create object store with null keyPath
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: xiang.long at intel.com


running below JavaScript code in set version onsuccess callback:
    db.createObjectStore(objectStoreName, {keyPath: null});
will trigger IDB_SYNTAX_ERR exception other than successfully create an object store with out-of-line keys.
Refer to http://www.w3.org/TR/2011/WD-IndexedDB-20111206/#widl-IDBDatabase-createObjectStore-IDBObjectStore-DOMString-name-IDBObjectStoreParameters-optionalParameters 

in WebCore::IDBDatabase::createObjectStore function:
...
Vector<String> keyPathArray;
if (options.get("keyPath", keyPathArray))
    keyPath = IDBKeyPath(keyPathArray);
...
The options.get() will successfully return true with an empty vector other than return false.

in WebCore::JSDictionary::tryGetPropertyAndResult function:

    case PropertyFound: {
        Result result;
        convertValue(m_exec, value, result);
...
convertValue will return normally when the value is undefined or null, and improperly set the empty result to context.
Chromium with V8 binding doesn't have this issue.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list