[Webkit-unassigned] [Bug 62414] IndexedDB: createObjectStore() name argument is required

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 23 18:15:49 PDT 2011


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





--- Comment #14 from Kentaro Hara <haraken at google.com>  2011-06-23 18:15:49 PST ---
> I'm going to make a consolidated patch that fixes everything in IDBDatabase.idl once and for all.

OK. I will stop to upload a patch for this bug. 

>> Is it correct to throw NON_TRANSIENT_ERR instead of TypeError when the argument is null?
>
> Aargh, no. 

[1] Do you have any idea about how to throw TypeError when 'Nullable' name is passed to createObjectStore()? As far as I know, there seems to be no convenient IDL option (like [ConvertUndefinedOrNullToNullString] or [StrictTypeChecking]...) that helps us throw TypeError for a 'Nullable' argument. Another possible way is to throw TypeError at the head of IDBDatabase::createObjectStore(), like this:

PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(String& name, ...) {
    ...;
    if (name.isNull()) {
        ec = TypeErrorExceptionCode;
        return 0;
    }
}

However, I could not find the exception code for TypeError anywhere in xxxxxxException.h. Maybe do we have to write a code for throwing TypeError for each JavaScript engine???

[2] According to the spec (http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBDatabase-createObjectStore-IDBObjectStore-DOMString-name-Object-optionalParameters), it just says name must not be 'Nullable', and seems not to say which exception should be thrown. Why did you think we should throw TypeError in this case? (TypeError makes sense to me, but I would like to confirm the spec that supports our implementation.)

I am asking this since I am encountering the same problem at the patch for bug 62288.

-- 
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