W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

RE: Promises: Auto-assimilating thenables returned by .then() callbacks: yay/nay?

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Thu, 2 May 2013 22:51:26 +0000
To: Jonas Sicking <jonas@sicking.cc>, "Mark S. Miller" <erights@google.com>
CC: Tab Atkins Jr. <jackalmage@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <B4AE8F4E86E26C47AC407D49872F6F9F7EF71D5D@SN2PRD0510MB360.namprd05.prod.outlook.com>
From: Domenic Denicola [domenic@domenicdenicola.com]

> I do want to add one more thing: thenable assimilation only works if `then` is a function, so it's less dangerous than `__proto__` in that sense.

In particular, it means `return JSON.parse(userData)` will never trigger the thenable assimilation, since `JSON.parse` will never return something whose `then` property is a function.
Received on Thursday, 2 May 2013 22:52:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:13 UTC