mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
LibJS: Add Proxy objects
Includes all traps except the following: [[Call]], [[Construct]], [[OwnPropertyKeys]]. An important implication of this commit is that any call to any virtual Object method has the potential to throw an exception. These methods were not checked in this commit -- a future commit will have to protect these various method calls throughout the codebase.
This commit is contained in:
parent
58a72e9b81
commit
39ad42defd
29 changed files with 1697 additions and 54 deletions
|
@ -50,6 +50,8 @@
|
|||
#include <LibJS/Runtime/Object.h>
|
||||
#include <LibJS/Runtime/ObjectConstructor.h>
|
||||
#include <LibJS/Runtime/ObjectPrototype.h>
|
||||
#include <LibJS/Runtime/ProxyConstructor.h>
|
||||
#include <LibJS/Runtime/ProxyPrototype.h>
|
||||
#include <LibJS/Runtime/ReflectObject.h>
|
||||
#include <LibJS/Runtime/Shape.h>
|
||||
#include <LibJS/Runtime/StringConstructor.h>
|
||||
|
@ -103,6 +105,7 @@ void GlobalObject::initialize()
|
|||
add_constructor("Function", m_function_constructor, *m_function_prototype);
|
||||
add_constructor("Number", m_number_constructor, *m_number_prototype);
|
||||
add_constructor("Object", m_object_constructor, *m_object_prototype);
|
||||
add_constructor("Proxy", m_proxy_constructor, *m_proxy_prototype);
|
||||
add_constructor("String", m_string_constructor, *m_string_prototype);
|
||||
add_constructor("Symbol", m_symbol_constructor, *m_symbol_prototype);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue