mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 05:51:55 +00:00
HackStudio: Implement custom JS -> C++ "proxy" objects
This patch adds a custom JS Object type that will convert written properties to their C++ equivalents, reflecting JS writes back to the debugging session. This is better than a simple proxy because printing this custom object works as expected because properties still exist on the object as existing handlers expect.
This commit is contained in:
parent
60d329a186
commit
4f2c0e9968
Notes:
sideshowbarker
2024-07-18 19:06:09 +09:00
Author: https://github.com/FalseHonesty
Commit: 4f2c0e9968
Pull-request: https://github.com/SerenityOS/serenity/pull/6285
Reviewed-by: https://github.com/itamar8910 ✅
Reviewed-by: https://github.com/linusg
5 changed files with 111 additions and 36 deletions
|
@ -23,7 +23,6 @@ public:
|
|||
JS::Value get(const JS::PropertyName& name, JS::Value receiver, bool without_side_effects) const override;
|
||||
bool put(const JS::PropertyName& name, JS::Value value, JS::Value receiver) override;
|
||||
|
||||
private:
|
||||
Optional<JS::Value> debugger_to_js(const Debug::DebugInfo::VariableInfo&) const;
|
||||
Optional<u32> js_to_debugger(JS::Value value, const Debug::DebugInfo::VariableInfo&) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue