mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
LibWeb: Add missing visit_edges implementation to RegExpObject
This commit is contained in:
parent
f357998e81
commit
b018114bee
Notes:
sideshowbarker
2024-07-17 06:45:52 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/b018114bee Pull-request: https://github.com/SerenityOS/serenity/pull/23854 Issue: https://github.com/SerenityOS/serenity/issues/23848 Reviewed-by: https://github.com/mattco98 ✅ Reviewed-by: https://github.com/trflynn89
2 changed files with 8 additions and 0 deletions
|
@ -304,6 +304,12 @@ ByteString RegExpObject::escape_regexp_pattern() const
|
|||
return builder.to_byte_string();
|
||||
}
|
||||
|
||||
void RegExpObject::visit_edges(JS::Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_realm);
|
||||
}
|
||||
|
||||
// 22.2.3.1 RegExpCreate ( P, F ), https://tc39.es/ecma262/#sec-regexpcreate
|
||||
ThrowCompletionOr<NonnullGCPtr<RegExpObject>> regexp_create(VM& vm, Value pattern, Value flags)
|
||||
{
|
||||
|
|
|
@ -60,6 +60,8 @@ private:
|
|||
RegExpObject(Object& prototype);
|
||||
RegExpObject(Regex<ECMA262> regex, ByteString pattern, ByteString flags, Object& prototype);
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
ByteString m_pattern;
|
||||
ByteString m_flags;
|
||||
bool m_legacy_features_enabled { false }; // [[LegacyFeaturesEnabled]]
|
||||
|
|
Loading…
Add table
Reference in a new issue