[Webkit-unassigned] [Bug 45110] Implement JSC features required for IndexedDB

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 19 02:56:12 PST 2011


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





--- Comment #7 from Jeremy Orlow <jorlow at chromium.org>  2011-01-19 02:56:11 PST ---
(In reply to comment #6)
> Some questions:
> 
> 1. In many IndexedDB classes, object parameters are passed in ref, but JSC binding code, which are automatically generated, is in point, except changing code like this, is there another way to fix this? :
> 
> Source/WebCore/storage/IDBObjectStore.h: (see OptionsObject)
> -    PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, const OptionsObject&, ExceptionCode&);
> +    PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, OptionsObject*, ExceptionCode&);

The options object is not ref-counted, so I'm pretty sure the const & version is the right one.  There's probably some list in the generator that you need to add it to.  I believe I had to do something similar for v8, but the code bases are pretty different these days.

> 2. OptionsObject is not implemented in JSC, I plan to add OptionObject.idl, OptionObject.cpp/h, and use JSC::JSValue to take place of v8::Local<v8::Value>.
> Is this all right?

I don't think you need an IDL.  I implemented it much like how SerializedScriptValue is implemented, IIRC: i.e. it's a first class citizen in the bindings generator.  Maybe look at my patch that added OO?

Otherwise copying and changing the v8 specific parts probably makes sense (unless you can think of a clean way to share the code...but I can't off the top of my head).

> 3. In JSC, WebCore::SerializedScriptValue is not derived from ThreadSafeShared<> but from RefCounted<>. In IDB classes, it is assumed to be ThreadSafeShared<>, but in other classes, it is assumed to be RefCounted<>. How to deal with this? multi-inheritance?

I'm not sure what you mean by multi-inheritance.

I think V8's SerializedScriptValue should have a |threadSafeCopy()| method.  It would call |m_data.crossThreadString()| and then clone itself.

Not sure what we can do other than a copy for JSC's.  (Do you know why the latter uses a vector?  Would it be possible for it to use a String?)

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