[Webkit-unassigned] [Bug 100292] IndexedDB: Remove IDBAny from WebKitIDL

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 7 13:36:28 PST 2013


Joshua Bell <jsbell at chromium.org> changed:

           What    |Removed                     |Added
                 CC|                            |haraken at chromium.org

--- Comment #1 from Joshua Bell <jsbell at chromium.org>  2013-03-07 13:38:53 PST ---
IDBVersionChangeEvent.idl:    readonly attribute IDBAny oldVersion;
IDBVersionChangeEvent.idl:    readonly attribute IDBAny newVersion;

^^^ Number or String


I've been thinking about doing this in three parts:

(1) Remove IntegerType/StringType/NullType/KeyPathType in favor of just ScriptValueType + the various IDB*Types

(2) Reduce the IDBAny type set down to ScriptValue, and have a binding helper that does (RefPtr<T>) -> ScriptValue via toV8/toJS().

(3) Eliminate IDBAny itself

IMHO #1 is valuable on its own as it removes the need to create scratch SerializedScriptValues which then are deserialized into ScriptValues.

I've started #1 then abandoned this change about 5 times so far. The crux of it is that we need a ScriptExecutionContext at the point where the ScriptValue is created to get an isolate. Right now this easily done in IDBRequest but requires "dirtying" some of the other call sites - adding [CallWith=ScriptExecutionContext] IDL annotations here and there.

I've toyed with several API variations, e.g.:

* Require a ScriptExecutionContext to be passed to IDBAny constructors - callers need to are otherwise unchanged.
* Add IDBBindingUtilities functions for stringToScriptValue(isolate, str), numberToStringValue(isolate, double), etc; IDBAny creators pass in the ScriptValue
* Add constructors to ScriptValue: ScriptValue(isolate, double), ScriptValue(isolate, string), ScriptValue::null(isolate), 


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