Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-08-10 22:14:40 +08:00
commit 08a62b0b06
5 changed files with 14 additions and 2 deletions

View file

@ -788,7 +788,8 @@ ShouldMark<JSObject*>(GCMarker* gcmarker, JSObject* obj)
// Don't mark things outside a zone if we are in a per-zone GC. It is // Don't mark things outside a zone if we are in a per-zone GC. It is
// faster to check our own arena, which we can do since we know that // faster to check our own arena, which we can do since we know that
// the object is tenured. // the object is tenured.
return obj->asTenured().zone()->shouldMarkInZone(); Zone* zone = obj->asTenured().zone();
return (zone && zone->shouldMarkInZone());
} }
template <typename T> template <typename T>

View file

@ -344,6 +344,10 @@ JS_GetTraceThingInfo(char* buf, size_t bufsize, JSTracer* trc, void* thing,
name = "object_group"; name = "object_group";
break; break;
case JS::TraceKind::RegExpShared:
name = "reg_exp_shared";
break;
default: default:
name = "INVALID"; name = "INVALID";
break; break;

View file

@ -2323,7 +2323,8 @@ static const AllocKinds UpdatePhaseMisc {
AllocKind::ACCESSOR_SHAPE, AllocKind::ACCESSOR_SHAPE,
AllocKind::OBJECT_GROUP, AllocKind::OBJECT_GROUP,
AllocKind::STRING, AllocKind::STRING,
AllocKind::JITCODE AllocKind::JITCODE,
AllocKind::REGEXP_SHARED
}; };
static const AllocKinds UpdatePhaseObjects { static const AllocKinds UpdatePhaseObjects {

View file

@ -259,6 +259,9 @@ class RegExpShared : public gc::TenuredCell
static bool dumpBytecode(JSContext* cx, MutableHandleRegExpShared res, bool match_only, static bool dumpBytecode(JSContext* cx, MutableHandleRegExpShared res, bool match_only,
HandleLinearString input); HandleLinearString input);
#endif #endif
public:
static const JS::TraceKind TraceKind = JS::TraceKind::RegExpShared;
}; };
class RegExpCompartment class RegExpCompartment

View file

@ -877,6 +877,9 @@ js::CurrentThreadCanAccessRuntime(const JSRuntime* rt)
bool bool
js::CurrentThreadCanAccessZone(Zone* zone) js::CurrentThreadCanAccessZone(Zone* zone)
{ {
if (!zone)
return false;
if (CurrentThreadCanAccessRuntime(zone->runtime_)) if (CurrentThreadCanAccessRuntime(zone->runtime_))
return true; return true;