You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think we should give more advice to specifications how to deal with promises and realms.
I think typically promises are created in the relevant realm of this.
However, this might lead to inconsistencies for immediately rejected promises depending on how they are implemented. Implementations might rely on throwing being tackled by the IDL layer, which would use the current realm for such rejected promises.
Given what we have, the simplest advice to me would be that for promise-returning methods you throw in the synchronous section and let IDL deal with it, and create a promise in the relevant realm of this that you return at the end of the synchronous section (and operate on in the in parallel part).
This is fairly subjective though so I would love to hear other perspectives.
The text was updated successfully, but these errors were encountered:
I think we should give more advice to specifications how to deal with promises and realms.
I think typically promises are created in the relevant realm of this.
However, this might lead to inconsistencies for immediately rejected promises depending on how they are implemented. Implementations might rely on throwing being tackled by the IDL layer, which would use the current realm for such rejected promises.
Given what we have, the simplest advice to me would be that for promise-returning methods you throw in the synchronous section and let IDL deal with it, and create a promise in the relevant realm of this that you return at the end of the synchronous section (and operate on in the in parallel part).
This is fairly subjective though so I would love to hear other perspectives.
The text was updated successfully, but these errors were encountered: