mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-08 01:51:57 +00:00
Revert "LibJS: Cache the shape for normal ECMAScriptFunctionObject prototypes"
This reverts commit 749cf2d1b5
.
This broke pinterest.com
This commit is contained in:
parent
20af2eb2b0
commit
061ad33705
Notes:
github-actions[bot]
2024-09-28 17:42:53 +00:00
Author: https://github.com/awesomekling
Commit: 061ad33705
3 changed files with 2 additions and 15 deletions
|
@ -354,8 +354,8 @@ void ECMAScriptFunctionObject::initialize(Realm& realm)
|
|||
Object* prototype = nullptr;
|
||||
switch (m_kind) {
|
||||
case FunctionKind::Normal:
|
||||
prototype = Object::create_with_premade_shape(realm.intrinsics().new_function_object_prototype_shape());
|
||||
prototype->put_direct(realm.intrinsics().new_function_object_prototype_constructor_offset(), this);
|
||||
prototype = Object::create_prototype(realm, realm.intrinsics().object_prototype());
|
||||
MUST(prototype->define_property_or_throw(vm.names.constructor, { .value = this, .writable = true, .enumerable = false, .configurable = true }));
|
||||
break;
|
||||
case FunctionKind::Generator:
|
||||
// prototype is "g1.prototype" in figure-2 (https://tc39.es/ecma262/img/figure-2.png)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue