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
The Promise inserted by core-js/library/modules/es6.promise.js has different behavior around domains and Promise.all than the builtin nodejs Promise. This is problematic in that there is potential to leak context into the surround scope.
constdomain=require('domain');// core-js promise(()=>{constCorePromise=require('core-js/library').Promise;constdom=domain.create();constpromises=[dom.run(()=>CorePromise.resolve('a'))];CorePromise.all(promises).then(()=>console.log('corejs promise active domain',domain.active));})();// builtin promise(()=>{constdom=domain.create();constpromises=[dom.run(()=>Promise.resolve('a'))];Promise.all(promises).then(()=>console.log('builtin promise active domain',domain.active));})();
Hmm, I thought current fallback for domains should solve this problem. I'll explore it. If you have any ideas how to fix it - feel free propose a solution.
The Promise inserted by core-js/library/modules/es6.promise.js has different behavior around domains and
Promise.all
than the builtin nodejs Promise. This is problematic in that there is potential to leak context into the surround scope.Output:
The text was updated successfully, but these errors were encountered: