Skip to content

Commit

Permalink
Apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat committed Sep 16, 2023
1 parent 4aed703 commit 1c804fc
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions boa_engine/src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,13 +717,11 @@ impl Context<'_> {
// 1. If the execution context stack is empty, return null.
// 2. Let ec be the topmost execution context on the execution context stack whose ScriptOrModule component is not null.
// 3. If no such execution context exists, return null. Otherwise, return ec's ScriptOrModule.
for frame in self.vm.frames.iter().rev() {
if frame.active_runnable.is_some() {
return frame.active_runnable.clone();
}
}

None
self.vm
.frames
.iter()
.rev()
.find_map(|frame| frame.active_runnable.clone())
}

/// Get `active function object`
Expand Down

0 comments on commit 1c804fc

Please sign in to comment.