Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d079117b77a9c9005025c3d9a2200c4eebcdda23
https://github.com/WebKit/WebKit/commit/d079117b77a9c9005025c3d9a2200c4eebcdda23
Author: Vassili Bykov <[email protected]>
Date: 2025-11-17 (Mon, 17 Nov 2025)
Changed paths:
M Source/JavaScriptCore/interpreter/Interpreter.cpp
M Source/JavaScriptCore/interpreter/Interpreter.h
M Source/JavaScriptCore/interpreter/InterpreterInlines.h
M Source/JavaScriptCore/interpreter/StackVisitor.h
Log Message:
-----------
Factor out two UnwindFunctor helper methods into an abstract base class
https://bugs.webkit.org/show_bug.cgi?id=302506
rdar://164690751
Reviewed by Marcus Plutowski.
UnwindFunctor defined in Interpreter.cpp implements a couple of helper methods
that are
also useful while walking the stack during JSPI suspensions. However, there is
no way to
reuse those methods in JSPI because UnwindFunctor is only available in that
compilation
unit, and it's a concrete class implementing unwinding specifically to handle a
thrown
exception.
To avoid code duplication, it makes sense to move the helper methods into an
abstract base
class inherited by UnwindFunctor, that can also be inherited by the stack
visitor functor
in JSPI.
This patch makes the following changes:
- UnwindFunctor helper methods copyCalleeSavesToEntryFrameCalleeSavesBuffer and
notifyDebuggerOfUnwinding are moved into a new class UnwindFunctorBase.
- UnwindFunctor is changed to inherit from UnwindFunctorBase.
- The comment in StackVisitor.h explaining what's expected of a StackVisitor
functor
is replaced with a concept that enforces the expectation.
- One of the moved methods is changed from static to normal because there is no
reason for it to
be static.
Tests: covered by existing tests.
Canonical link: https://commits.webkit.org/303119@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications