Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-23 Thread Cameron McCormack
Mark Pilgrim: > I'm happy to report that WebKit's implementation of IndexedDB now > follows WebIDL and throws TypeError on all functions when called with > missing required arguments. We have grandfathered in all existing IDL > files to use the old, looser code generator, but we are actively > work

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-23 Thread timeless
Cheers! On 6/23/11, Mark Pilgrim wrote: > On Sun, Jun 19, 2011 at 2:35 AM, Adam Barth wrote: >> On Mon, Jun 13, 2011 at 9:40 AM, Adam Barth wrote: >>> On Mon, Jun 13, 2011 at 1:31 AM, Jonas Sicking wrote: On Mon, Jun 13, 2011 at 12:15 AM, Adam Barth wrote: > On Sun, Jun 12, 2011 at 1

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-23 Thread Mark Pilgrim
On Sun, Jun 19, 2011 at 2:35 AM, Adam Barth wrote: > On Mon, Jun 13, 2011 at 9:40 AM, Adam Barth wrote: >> On Mon, Jun 13, 2011 at 1:31 AM, Jonas Sicking wrote: >>> On Mon, Jun 13, 2011 at 12:15 AM, Adam Barth wrote: On Sun, Jun 12, 2011 at 11:19 PM, Jonas Sicking wrote: > On Sun, Jun

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-18 Thread Adam Barth
On Mon, Jun 13, 2011 at 9:40 AM, Adam Barth wrote: > On Mon, Jun 13, 2011 at 1:31 AM, Jonas Sicking wrote: >> On Mon, Jun 13, 2011 at 12:15 AM, Adam Barth wrote: >>> On Sun, Jun 12, 2011 at 11:19 PM, Jonas Sicking wrote: On Sun, Jun 12, 2011 at 8:35 PM, Cameron McCormack wrote: > Adam

RE: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-13 Thread Israel Hilerio
In IE9 we throw an "Argument not optional" TypeError when calling document.getElementById() without parameters. We're planning to follow this model for IndexedDB and continue to throw a TypeError [1]. This seems in line with the results of this thread. Israel [1] http://lists.w3.org/Archives/P

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-13 Thread Adam Barth
On Mon, Jun 13, 2011 at 1:31 AM, Jonas Sicking wrote: > On Mon, Jun 13, 2011 at 12:15 AM, Adam Barth wrote: >> On Sun, Jun 12, 2011 at 11:19 PM, Jonas Sicking wrote: >>> On Sun, Jun 12, 2011 at 8:35 PM, Cameron McCormack wrote: Adam Barth: > > WebKit is looser in this regard.  We proba

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-13 Thread Robert O'Callahan
On Mon, Jun 13, 2011 at 6:19 PM, Jonas Sicking wrote: > I can't remember getting a single bug filed on Geckos current > behavior. There probably have been some which I've missed, but it's > not a big enough problem that it's ever been discussed at mozilla as > far as I can remember. > Actually t

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-13 Thread Jonas Sicking
On Mon, Jun 13, 2011 at 12:15 AM, Adam Barth wrote: > On Sun, Jun 12, 2011 at 11:19 PM, Jonas Sicking wrote: >> On Sun, Jun 12, 2011 at 8:35 PM, Cameron McCormack wrote: >>> Adam Barth: > WebKit is looser in this regard.  We probably should change the > default for new IDL, but it's a

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-13 Thread Adam Barth
On Mon, Jun 13, 2011 at 12:15 AM, Adam Barth wrote: > On Sun, Jun 12, 2011 at 11:19 PM, Jonas Sicking wrote: >> On Sun, Jun 12, 2011 at 8:35 PM, Cameron McCormack wrote: >>> Adam Barth: > WebKit is looser in this regard.  We probably should change the > default for new IDL, but it's a

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-13 Thread Adam Barth
On Sun, Jun 12, 2011 at 11:19 PM, Jonas Sicking wrote: > On Sun, Jun 12, 2011 at 8:35 PM, Cameron McCormack wrote: >> Adam Barth: >>> > WebKit is looser in this regard.  We probably should change the >>> > default for new IDL, but it's a delicate task and I've been busy.  :( >> >> What about for

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-12 Thread Jonas Sicking
On Sun, Jun 12, 2011 at 8:35 PM, Cameron McCormack wrote: > Adam Barth: >> > WebKit is looser in this regard.  We probably should change the >> > default for new IDL, but it's a delicate task and I've been busy.  :( > > What about for old IDL?  Do you feel that you can make this change > without b

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-12 Thread Cameron McCormack
Mark Pilgrim: > That is highly unintuitive. What's the point of listing the argument as "not > optional" if it is, in fact, completely optional? It’s not optional in that if there were another method of the same name which doesn’t have that argument, you can distinguish between the two calls. For

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-12 Thread Jonas Sicking
On Sun, Jun 12, 2011 at 1:05 AM, Adam Barth wrote: > On Sat, Jun 11, 2011 at 7:31 PM, Jonas Sicking wrote: >> On Fri, Jun 10, 2011 at 5:13 PM, Cameron McCormack wrote: >>> Mark Pilgrim: What about setVersion() with no arguments? I ask because WebKit currently treats it like setVersion(

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-12 Thread Adam Barth
On Sat, Jun 11, 2011 at 7:31 PM, Jonas Sicking wrote: > On Fri, Jun 10, 2011 at 5:13 PM, Cameron McCormack wrote: >> Mark Pilgrim: >>> What about setVersion() with no arguments? I ask because WebKit >>> currently treats it like setVersion("undefined") and I'm in the >>> process of fixing it in ab

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-11 Thread Jonas Sicking
On Fri, Jun 10, 2011 at 5:13 PM, Cameron McCormack wrote: > Mark Pilgrim: >> What about setVersion() with no arguments? I ask because WebKit >> currently treats it like setVersion("undefined") and I'm in the >> process of fixing it in about 19 places. > > That’s the right behaviour. Huh?? At leas

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-10 Thread Mark Pilgrim
On Jun 10, 2011 8:13 PM, "Cameron McCormack" wrote: > > Mark Pilgrim: > > What about setVersion() with no arguments? I ask because WebKit > > currently treats it like setVersion("undefined") and I'm in the > > process of fixing it in about 19 places. > > That’s the right behaviour. > That is high

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-10 Thread Cameron McCormack
Mark Pilgrim: > What about setVersion() with no arguments? I ask because WebKit > currently treats it like setVersion("undefined") and I'm in the > process of fixing it in about 19 places. That’s the right behaviour. -- Cameron McCormack ≝ http://mcc.id.au/

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-10 Thread Mark Pilgrim
On Fri, Jun 10, 2011 at 7:43 PM, Cameron McCormack wrote: > Mark Pilgrim: >> Wait, does this mean that setVersion(null) is the same as >> setVersion("null")? > > It means it’s the same as setVersion(""), per the recent changes to Web > IDL which make that the default stringification of null. What

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-10 Thread Cameron McCormack
Mark Pilgrim: > Wait, does this mean that setVersion(null) is the same as > setVersion("null")? It means it’s the same as setVersion(""), per the recent changes to Web IDL which make that the default stringification of null. (To get the opposite behaviour, you now need to specify [TreatNullAs=Str

RE: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-10 Thread Mark Pilgrim
On Jun 10, 2011 6:56 PM, "Eliot Graff" wrote: > > ... > > > Are we saying that we should remove the "TreatNullAs=EmptyString" and > > keep the parameter restriction that "version" cannot be nullable? > > > > I think we should remove any extended attributes from the IDL and just use > > the default

RE: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-10 Thread Eliot Graff
... > > Are we saying that we should remove the "TreatNullAs=EmptyString" and > keep the parameter restriction that "version" cannot be nullable? > > I think we should remove any extended attributes from the IDL and just use > the default behavior. It is much less important to me what the actual d

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-07 Thread Jonas Sicking
On Tue, Jun 7, 2011 at 11:30 AM, Israel Hilerio wrote: > On Tuesday, June 07, 2011 1:13 AM, Jonas Sicking wrote: >> Actually, WebIDL just changed from turning null into "null" to turning null >> into "". Turns out that a bunch of functions depended on that behavior and >> so it seems like that's w

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-07 Thread Cameron McCormack
Israel Hilerio: > What I meant was that on the method description of > IDBDatabase.setVersion, there is a table that has a nullable column. > In it the "version" parameter there is an "x" in the Nullable column, > which implies that the "version" parameter cannot be nullable. I'm > guessing we want

RE: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-07 Thread Israel Hilerio
On Tuesday, June 07, 2011 2:44 PM, Cameron McCormack wrote: > Israel Hilerio: > > Are we saying that we should remove the "TreatNullAs=EmptyString" and > > keep the parameter restriction that "version" cannot be nullable? > > The [TreatNullAs=EmptyString] behaviour is now the default, so you > def

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-07 Thread Cameron McCormack
Israel Hilerio: > Are we saying that we should remove the "TreatNullAs=EmptyString" and > keep the parameter restriction that "version" cannot be nullable? The [TreatNullAs=EmptyString] behaviour is now the default, so you definitely want to remove it. When you say “keep the parameter restriction

RE: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-07 Thread Israel Hilerio
On Tuesday, June 07, 2011 1:13 AM, Jonas Sicking wrote: > Actually, WebIDL just changed from turning null into "null" to turning null > into "". Turns out that a bunch of functions depended on that behavior and > so it seems like that's what we'll be stuck with. > > In any case, I think IndexedDB

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-07 Thread Jonas Sicking
Actually, WebIDL just changed from turning null into "null" to turning null into "". Turns out that a bunch of functions depended on that behavior and so it seems like that's what we'll be stuck with. In any case, I think IndexedDB should be silent on the issue and simply rely on WebIDL defaults.

Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-06 Thread Jeremy Orlow
We should probably just remove the special case. I believe WebIDL specifies that a null would then turn into the string "null". This is what we've done pretty much everywhere else I believe. J On Mon, Jun 6, 2011 at 7:23 PM, Israel Hilerio wrote: > The parameter of IDBDatabase.setVersion is de

[indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

2011-06-06 Thread Israel Hilerio
The parameter of IDBDatabase.setVersion is defined in the WebIDL as [TreatNullAs=EmptyString] but in the method definition it says that the parameter cannot be nullable. Do we want to enable null values? Israel