diff options
Diffstat (limited to 'JavaScriptCore/wrec/WREC.cpp')
-rw-r--r-- | JavaScriptCore/wrec/WREC.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/JavaScriptCore/wrec/WREC.cpp b/JavaScriptCore/wrec/WREC.cpp index 099931b..145a1ce 100644 --- a/JavaScriptCore/wrec/WREC.cpp +++ b/JavaScriptCore/wrec/WREC.cpp @@ -40,12 +40,9 @@ using namespace WTF; namespace JSC { namespace WREC { -// Patterns longer than this can hang the compiler. -static const int MaxPatternSize = (1 << 13); - CompiledRegExp Generator::compileRegExp(JSGlobalData* globalData, const UString& pattern, unsigned* numSubpatterns_ptr, const char** error_ptr, RefPtr<ExecutablePool>& pool, bool ignoreCase, bool multiline) { - if (pattern.size() > MaxPatternSize) { + if (pattern.size() > MAX_PATTERN_SIZE) { *error_ptr = "regular expression too large"; return 0; } @@ -80,7 +77,7 @@ CompiledRegExp Generator::compileRegExp(JSGlobalData* globalData, const UString& } *numSubpatterns_ptr = parser.numSubpatterns(); - pool = globalData->poolForSize(generator.size()); + pool = globalData->executableAllocator.poolForSize(generator.size()); return reinterpret_cast<CompiledRegExp>(generator.copyCode(pool.get())); } |