This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14199 - IDBVersionChangeEvent still uses DOMString for version
Summary: IDBVersionChangeEvent still uses DOMString for version
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Eliot Graff
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-18 18:24 UTC by Kyle Huey
Modified: 2012-01-24 04:57 UTC (History)
5 users (show)

See Also:


Attachments

Description Kyle Huey 2011-09-18 18:24:14 UTC
After the recent setVersion changes it should be using long long.
Comment 1 Kyle Huey 2011-09-27 16:43:38 UTC
Actually, it should use 'any' for newVersion, since in a deleteDatabase call it is null.
Comment 2 Eliot Graff 2011-11-02 00:41:05 UTC
Will make long long.
Comment 3 Eliot Graff 2011-11-02 15:01:09 UTC
Fixed in the 1 November Editor's Draft:

interface IDBVersionChangeEvent : Event {
    readonly attribute unsigned long long oldVersion;
    readonly attribute unsigned long long newVersion;
    void initIDBVersionChangeEvent (DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, long long oldVersion, long long newVersion);
};

I think newVersion should be long long rather than any. The only time it is null is when it is deleted.

Thanks,

Eliot
Comment 4 Kyle Huey 2011-11-02 15:21:50 UTC
(In reply to comment #3)
> Fixed in the 1 November Editor's Draft:
> 
> interface IDBVersionChangeEvent : Event {
>     readonly attribute unsigned long long oldVersion;
>     readonly attribute unsigned long long newVersion;
>     void initIDBVersionChangeEvent (DOMString typeArg, boolean canBubbleArg,
> boolean cancelableArg, long long oldVersion, long long newVersion);
> };
> 
> I think newVersion should be long long rather than any. The only time it is
> null is when it is deleted.

It should be nullable ("unsigned long long?") then, right?

/me admits to not knowing much about this whole WebIDL thing.
Comment 5 Ms2ger 2011-11-02 15:48:39 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Fixed in the 1 November Editor's Draft:
> > 
> > interface IDBVersionChangeEvent : Event {
> >     readonly attribute unsigned long long oldVersion;
> >     readonly attribute unsigned long long newVersion;
> >     void initIDBVersionChangeEvent (DOMString typeArg, boolean canBubbleArg,
> > boolean cancelableArg, long long oldVersion, long long newVersion);
> > };
> > 
> > I think newVersion should be long long rather than any. The only time it is
> > null is when it is deleted.
> 
> It should be nullable ("unsigned long long?") then, right?

Yes.
Comment 6 Eliot Graff 2011-12-27 22:03:28 UTC
made all appropriate elements nullable, in the following:
IDBVersionChangeEvent.oldversion
IDBVersionChangeEvent.newversion
IDBVersionChangeEvent.initIDBVersionChangeEvent()

IDBFactory.open()

IDBDatabase.version

IDBFactorySync.open()

IDBDatabaseSync.version

IDBVersionChangeCallback.transactionStarted()

Changes are published in the Editor's Draft of Dec 27.

Thanks,

Eliot
Comment 7 Jonas Sicking (Not reading bugmail) 2012-01-24 04:57:30 UTC
Actually, only the newVersion property on the IDBVersionChangeEvent can be null. All other version properties/arguments are always non-null. Changed things to reflect this.

I also removed the initIDBVersionChangeEvent function in favor of a constructor since that's how DOM-Events are initialized these days.