mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 12:45:27 +00:00
Bug 1359653: Part 4 - Fallback to the default JS version when decoding regexps off-thread. r=shu
When decoding off-thread, we can't safely access the JS runtime to get the current JS version, and doing so causes failed assertions. MozReview-Commit-ID: Lra437aa8SM --HG-- extra : source : 16259c1af36e138881d18a3f8b0a803f5d4fc3ec
This commit is contained in:
parent
7d8720d597
commit
d33959634b
@ -1449,6 +1449,9 @@ JSContext::findVersion()
|
||||
if (compartment() && compartment()->behaviors().version() != JSVERSION_UNKNOWN)
|
||||
return compartment()->behaviors().version();
|
||||
|
||||
if (!CurrentThreadCanAccessRuntime(runtime()))
|
||||
return JSVERSION_DEFAULT;
|
||||
|
||||
return runtime()->defaultVersion();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user