mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 15:17:29 +09:00
Issue #2172 - add null zone sanity checks
This commit is contained in:
parent
8893997378
commit
dc5702a0f2
2 changed files with 5 additions and 1 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue