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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 1 20:49:42 PST 2012


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





--- Comment #21 from Donggwan Kim <donggwan.kim at samsung.com>  2012-01-01 20:49:40 PST ---
(In reply to comment #17)
> (From update of attachment 120549 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=120549&action=review
> 
> This of course needs a changelog.

I appended it.

> 
> > Source/WebCore/bindings/js/OptionsObject.h:58
> > +class OptionsObject {
> > +public:
> > +    OptionsObject();
> > +    OptionsObject(JSC::ExecState*, const JSC::JSValue& options);
> > +
> > +    OptionsObject& operator=(const OptionsObject&);
> > +
> > +    bool get(const String&, bool&) const;
> > +    bool get(const String&, int32_t&) const;
> > +    bool get(const String&, double&) const;
> > +    bool get(const String&, String&) const;
> > +    bool get(const String&, unsigned short&) const;
> > +    bool get(const String&, unsigned&) const;
> > +    bool get(const String&, unsigned long long&) const;
> > +
> > +    bool getWithUndefinedOrNullCheck(const String&, String&) const;
> > +
> > +    ~OptionsObject();
> > +
> > +private:
> > +    bool getKey(const String& key, JSC::JSValue&) const;
> > +
> > +    JSC::ExecState* m_exec;
> > +    JSC::JSValue m_options;
> > +};
> 
> The JSC bindings have a class called JSDictionary which has much of the same functionality has this, I would rather we didn't duplicate this code.

OptionsObject is exposed to WebCore. so I think we should keep this interface like V8.

> 
> > Source/WebCore/bindings/js/SerializedScriptValue.h:77
> >      String toString();
> > +    String toWireString();
> 
> It would probably make sense to add a comment explaining what the differences between toString and toWireString are.

I appended comment to it.

> 
> >> Source/WebCore/storage/IDBKeyPathBackendImpl.cpp:51
> >> +#if USE(JSC)
> > 
> > WebCore proper shouldn't have any JSC specific code.  All the JSC specific code should be in the bindings.
> 
> Indeed, why does JSC need special cased code here?

Two methods createIDBKeyFromSerializedValueAndKeyPath and injectIDBKeyIntoSerializedValue in IDBKeyPathBackendImpl have functionality that create and inject key from and into SerializedScriptValue. To do so, they should use bindings method of SerializedScriptValue. In JSC bindings, they require ExecState as parameter unlike V8.
> 
> > Source/WebCore/storage/IDBTransactionBackendImpl.h:98
> > +    ScriptExecutionContext* m_scriptExecutionContext;
> 
> What ensures the lifetime of the ScriptExecutionContext here?
The lifetime of the ScriptExecutionContext is same as document.

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