mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
LibJS: Let RegExpPrototype inherit from Object directly
https://tc39.es/ecma262/#sec-properties-of-the-regexp-prototype-object The RegExp prototype object: - is an ordinary object. - is not a RegExp instance and does not have a [[RegExpMatcher]] internal slot or any of the other internal slots of RegExp instance objects. In other words: no need to have RegExpPrototype inherit from RegExpObject (we weren't even calling its initialize()).
This commit is contained in:
parent
a72276407b
commit
e640fdd395
2 changed files with 3 additions and 3 deletions
|
@ -36,7 +36,7 @@
|
|||
namespace JS {
|
||||
|
||||
RegExpPrototype::RegExpPrototype(GlobalObject& global_object)
|
||||
: RegExpObject({}, {}, *global_object.object_prototype())
|
||||
: Object(*global_object.object_prototype())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
class RegExpPrototype final : public RegExpObject {
|
||||
JS_OBJECT(RegExpPrototype, RegExpObject);
|
||||
class RegExpPrototype final : public Object {
|
||||
JS_OBJECT(RegExpPrototype, Object);
|
||||
|
||||
public:
|
||||
explicit RegExpPrototype(GlobalObject&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue