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 23564 - IDL for open() doesn't match implementation reality
Summary: IDL for open() doesn't match implementation reality
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: XHR (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-18 18:22 UTC by Boris Zbarsky
Modified: 2013-11-01 15:27 UTC (History)
3 users (show)

See Also:


Attachments

Description Boris Zbarsky 2013-10-18 18:22:58 UTC
WebIDL redefined what happens when "undefined" is passed to an "optional boolean whatever = true" argument, but for open() I believe we want to keep the old behavior of treating undefined as false.  See http://lists.w3.org/Archives/Public/public-script-coord/2013OctDec/0041.html for details, including the IDL Gecko is using for open() now.
Comment 1 Anne 2013-10-21 11:19:30 UTC
So in particular, omitted would be true and undefined would be false.

It seems odd to define that via an overload. I guess TreatUndefinedAs might be going away given that we do not need it elsewhere so maybe an overload is the way to go, but then we do not want to spread overload usage either...
Comment 2 Boris Zbarsky 2013-10-21 13:20:44 UTC
> So in particular, omitted would be true and undefined would be false.

Yes.

> It seems odd to define that via an overload. I guess TreatUndefinedAs might be
> going away given that we do not need it elsewhere so maybe an overload is the
> way to go, but then we do not want to spread overload usage either...

Sure, but I think it's safe to say that the set of cases that want to treat omitted as true and undefined as false is small and nonincreasing...
Comment 3 Anne 2013-11-01 15:27:10 UTC
I filed bug 23701 on IDL to remove TreatAsUndefined entirely.

I fixed this bug via overloading as suggested:

https://github.com/whatwg/xhr/commit/76a4c653ffd0a65e04a52fe2daa9729dbcf64410