mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +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
|
||||
// faster to check our own arena, which we can do since we know that
|
||||
// the object is tenured.
|
||||
return obj->asTenured().zone()->shouldMarkInZone();
|
||||
Zone* zone = obj->asTenured().zone();
|
||||
return (zone && zone->shouldMarkInZone());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
|
|||
|
|
@ -877,6 +877,9 @@ js::CurrentThreadCanAccessRuntime(const JSRuntime* rt)
|
|||
bool
|
||||
js::CurrentThreadCanAccessZone(Zone* zone)
|
||||
{
|
||||
if (!zone)
|
||||
return false;
|
||||
|
||||
if (CurrentThreadCanAccessRuntime(zone->runtime_))
|
||||
return true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue