Bug 47511 - [Chromium] Add plumbing for synchronous indexedDB exceptions
Summary: [Chromium] Add plumbing for synchronous indexedDB exceptions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Jeremy Orlow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-11 15:59 PDT by Jeremy Orlow
Modified: 2010-10-11 17:19 PDT (History)
3 users (show)

See Also:


Attachments
Patch (20.58 KB, patch)
2010-10-11 16:02 PDT, Jeremy Orlow
japhet: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Orlow 2010-10-11 15:59:42 PDT
[Chromium] Add plumbing for synchronous indexedDB exceptions
Comment 1 Jeremy Orlow 2010-10-11 16:02:07 PDT
Nate/Darin can one of you guys review today?  Thanks!
Comment 2 Jeremy Orlow 2010-10-11 16:02:18 PDT
Created attachment 70487 [details]
Patch
Comment 3 Nate Chapin 2010-10-11 16:19:00 PDT
Comment on attachment 70487 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=70487&action=review

r+ provided my comments/guesses are correct :)

> WebKit/chromium/public/WebExceptionCode.h:36
> +// This should match how exception code is defined in WebCore.

Nit: replace 'exception code' with 'ExceptionCode' so it's clear what this is referring to?

> WebKit/chromium/public/WebIDBCursor.h:65
> +    virtual void update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks, WebExceptionCode&)
> +    {
> +        update(value, callbacks);
> +    }
> +    virtual void update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks)
> +    {
> +        WebExceptionCode ec = 0;
> +        update(value, callbacks, ec);
> +    }

It appears that a bunch of these implementations are circular.  I'm assuming that this code is unused and these are just to ensure the compiler doesn't give unused variable warnings?

> WebKit/chromium/public/WebIDBCursor.h:89
> +    /*
> +    virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
> +    virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
> +    virtual void remove(WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
> +    */

Here and below:  Why are these commented out?  Are they going to replace the implementations above when the FIXMEs are resolved?
Comment 4 Jeremy Orlow 2010-10-11 16:57:06 PDT
(In reply to comment #3)
> (From update of attachment 70487 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=70487&action=review
> 
> r+ provided my comments/guesses are correct :)
> 
> > WebKit/chromium/public/WebExceptionCode.h:36
> > +// This should match how exception code is defined in WebCore.
> 
> Nit: replace 'exception code' with 'ExceptionCode' so it's clear what this is referring to?

done
 
> > WebKit/chromium/public/WebIDBCursor.h:65
> > +    virtual void update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks, WebExceptionCode&)
> > +    {
> > +        update(value, callbacks);
> > +    }
> > +    virtual void update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks)
> > +    {
> > +        WebExceptionCode ec = 0;
> > +        update(value, callbacks, ec);
> > +    }
> 
> It appears that a bunch of these implementations are circular.  I'm assuming that this code is unused and these are just to ensure the compiler doesn't give unused variable warnings?

They're circular because the old implementation needs to point to the new _and_ the new needs to point to the old since Chrome and WebKit both implement and consume the API.

> > WebKit/chromium/public/WebIDBCursor.h:89
> > +    /*
> > +    virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
> > +    virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
> > +    virtual void remove(WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
> > +    */
> 
> Here and below:  Why are these commented out?  Are they going to replace the implementations above when the FIXMEs are resolved?

Yup....just wanted to save myself some effort.  They'll be uncommented once WebKit rolls.
Comment 5 Nate Chapin 2010-10-11 17:06:20 PDT
Ok, thanks.

(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 70487 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=70487&action=review
> > 
> > r+ provided my comments/guesses are correct :)
> > 
> > > WebKit/chromium/public/WebExceptionCode.h:36
> > > +// This should match how exception code is defined in WebCore.
> > 
> > Nit: replace 'exception code' with 'ExceptionCode' so it's clear what this is referring to?
> 
> done
> 
> > > WebKit/chromium/public/WebIDBCursor.h:65
> > > +    virtual void update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks, WebExceptionCode&)
> > > +    {
> > > +        update(value, callbacks);
> > > +    }
> > > +    virtual void update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks)
> > > +    {
> > > +        WebExceptionCode ec = 0;
> > > +        update(value, callbacks, ec);
> > > +    }
> > 
> > It appears that a bunch of these implementations are circular.  I'm assuming that this code is unused and these are just to ensure the compiler doesn't give unused variable warnings?
> 
> They're circular because the old implementation needs to point to the new _and_ the new needs to point to the old since Chrome and WebKit both implement and consume the API.
> 
> > > WebKit/chromium/public/WebIDBCursor.h:89
> > > +    /*
> > > +    virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
> > > +    virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
> > > +    virtual void remove(WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
> > > +    */
> > 
> > Here and below:  Why are these commented out?  Are they going to replace the implementations above when the FIXMEs are resolved?
> 
> Yup....just wanted to save myself some effort.  They'll be uncommented once WebKit rolls.
Comment 6 Jeremy Orlow 2010-10-11 17:19:38 PDT
Committed r69541: <http://trac.webkit.org/changeset/69541>