Bug 1805798: Allow-list std::string in RegExpUnparser::VisitClassSetOperand r=sfink

V8 is creating a `std::string` in code that only runs under `--trace-regexp-parser`, which is indirectly calling `new`.

Differential Revision: https://phabricator.services.mozilla.com/D165085
This commit is contained in:
Iain Ireland 2022-12-22 18:45:11 +00:00
parent 3b2510989b
commit 84a115258d
2 changed files with 5 additions and 1 deletions

View File

@ -165,6 +165,10 @@ def main():
if "intl_components" in filename:
continue
# Ignore use of std::string in regexp AST debug output.
if filename == "regexp-ast.o":
continue
fn = m.group(2)
if filename == "Utility.o":
util_Utility_cpp.add(fn)

View File

@ -15,7 +15,6 @@ include("../js-cxxflags.mozbuild")
CXXFLAGS += ["-Wno-error=type-limits"]
UNIFIED_SOURCES += [
"imported/regexp-ast.cc",
"imported/regexp-bytecode-generator.cc",
"imported/regexp-bytecode-peephole.cc",
"imported/regexp-bytecodes.cc",
@ -31,6 +30,7 @@ UNIFIED_SOURCES += [
"util/UnicodeShim.cpp",
]
SOURCES += [
"imported/regexp-ast.cc",
"imported/regexp-compiler.cc", # Bug 1643693
"RegExpNativeMacroAssembler.cpp",
]