mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 16:59:43 +01:00
JavaScript: root the running rejection site code
This commit is contained in:
1 file changed
+5
-1
@@ -214,7 +214,11 @@ impl Promises {
|
||||
roots.objects.extend(self.proto.iter().chain(&self.ctor).chain(&self.natives).chain(&self.rejected));
|
||||
roots.values.extend(self.completion.iter());
|
||||
match &self.running {
|
||||
Some(Then::Settle(o, _) | Then::Reject(o)) => roots.objects.push(*o),
|
||||
Some(Then::Settle(o, site)) => {
|
||||
roots.objects.push(*o);
|
||||
roots.codes.extend(site.iter().map(|(code, _)| &**code));
|
||||
}
|
||||
Some(Then::Reject(o)) => roots.objects.push(*o),
|
||||
Some(Then::Finally { derived, value, .. }) => {
|
||||
roots.objects.push(*derived);
|
||||
roots.values.push(value);
|
||||
|
||||
Reference in new issue
Block a user