Index: src/jsregexp.cc |
diff --git a/src/jsregexp.cc b/src/jsregexp.cc |
index ddab751a89a05fbe65af59c1335a2ee3882afad7..5d34ba6b32d1c6c7310e58c5c074781d064079f4 100644 |
--- a/src/jsregexp.cc |
+++ b/src/jsregexp.cc |
@@ -1091,7 +1091,10 @@ RegExpEngine::CompilationResult RegExpCompiler::Assemble( |
node->set_on_work_list(false); |
if (!node->label()->is_bound()) node->Emit(this, &new_trace); |
} |
- if (reg_exp_too_big_) return IrregexpRegExpTooBig(isolate_); |
+ if (reg_exp_too_big_) { |
+ macro_assembler_->AbortedCodeGeneration(); |
+ return IrregexpRegExpTooBig(isolate_); |
+ } |
Handle<HeapObject> code = macro_assembler_->GetCode(pattern); |
heap->IncreaseTotalRegexpCodeGenerated(code->Size()); |