LibJS: Add Function.prototype and make "new" Objects delegate to it

This commit is contained in:
Andreas Kling 2020-03-28 16:40:36 +01:00
commit 37fe16a99c
Notes: sideshowbarker 2024-07-19 08:05:44 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -24,6 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <AK/FlyString.h>
#include <LibJS/Heap/Heap.h>
#include <LibJS/Runtime/Function.h>
#include <LibJS/Runtime/Value.h>
@ -31,6 +33,7 @@ namespace JS {
Function::Function()
{
put("prototype", heap().allocate<Object>());
}
Function::~Function()