diff options
author | Martok <martok@martoks-place.de> | 2023-08-09 22:41:30 +0200 |
---|---|---|
committer | Martok <martok@martoks-place.de> | 2023-08-09 22:41:30 +0200 |
commit | 3b32a66cb6c6cabf21b41ac4d5662f33ba1e80c3 (patch) | |
tree | d062a891b22700bb350e32b65cc2c7eedf59f060 /js/src/vm | |
parent | edfb29e1a250167ea2c014991f2673f2d91db509 (diff) | |
download | uxp-3b32a66cb6c6cabf21b41ac4d5662f33ba1e80c3.tar.gz |
Issue #2172 - add null zone sanity checks
Diffstat (limited to 'js/src/vm')
-rw-r--r-- | js/src/vm/Runtime.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index ceb7a498b0..053b7c44b0 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -877,6 +877,9 @@ js::CurrentThreadCanAccessRuntime(const JSRuntime* rt) bool js::CurrentThreadCanAccessZone(Zone* zone) { + if (!zone) + return false; + if (CurrentThreadCanAccessRuntime(zone->runtime_)) return true; |