mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
Issue #2305 Part 4: Check for failure when getting RegExp match result template
Null deref crash fix.
This commit is contained in:
parent
a382c2aa66
commit
1878228db7
1 changed files with 3 additions and 0 deletions
|
|
@ -99,6 +99,9 @@ js::CreateRegExpMatchResult(JSContext* cx, RegExpShared& re,
|
|||
// MakeIndicesArray: step 8
|
||||
ArrayObject* indicesTemplate =
|
||||
cx->compartment()->regExps.getOrCreateMatchResultTemplateObject(cx, RegExpCompartment::ResultTemplateKind::Indices);
|
||||
if (!indicesTemplate) {
|
||||
return false;
|
||||
}
|
||||
indices = NewDenseFullyAllocatedArrayWithTemplate(cx, numPairs, indicesTemplate);
|
||||
if (!indices) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue