mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
LibJS/test-js: Clean up test-js code
This commit also exposes JSONObject's implementation of stringify to the public, so that it can be used by test-js without having to go through the interpreter's environment.
This commit is contained in:
parent
4c6fd49169
commit
26acc8ba88
5 changed files with 193 additions and 171 deletions
|
@ -38,6 +38,10 @@ public:
|
|||
virtual void initialize(Interpreter&, GlobalObject&) override;
|
||||
virtual ~JSONObject() override;
|
||||
|
||||
// The base implementation of stringify is exposed because it is used by
|
||||
// test-js to communicate between the JS tests and the C++ test runner.
|
||||
static String stringify_impl(Interpreter&, GlobalObject&, Value value, Value replacer, Value space);
|
||||
|
||||
private:
|
||||
struct StringifyState {
|
||||
Function* replacer_function { nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue