Fixing a WebKit bug to see if promises are made of train tracks

24 points by pushcx a day ago on lobsters | 2 comments

bakkot | 23 hours ago

Nice writeup. There's several dumb bits of this machinery. Symbol.species was a mistake in general and the committee has committed not to add it to new methods, but we're probably stuck with it for things like this.

On a closely related note, there's an open spec PR that would swap the "check if .constructor is Promise" check for "check if the prototype is Promise.prototype", which at least would be one less place user code can run and cause chaos. Probably we'll need to convince a browser to ship some instrumentation to see if that would break anyone, though I think it's quite unlikely.

olliej | a day ago

Nice to see a breakdown of a bug fix like this these days