Commit 2fe2258c authored by ishell's avatar ishell Committed by Commit bot

Ensure we have some space on the stack for compilation.

BUG=chromium:527345, chromium:522289
LOG=N

Review URL: https://codereview.chromium.org/1323243005

Cr-Commit-Position: refs/heads/master@{#30595}
parent 129593b4
......@@ -28,6 +28,8 @@ RUNTIME_FUNCTION(Runtime_CompileLazy) {
PrintF("]\n");
}
#endif
StackLimitCheck check(isolate);
if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
// Compile the target function.
DCHECK(function->shared()->allows_lazy_compilation());
......@@ -48,6 +50,9 @@ RUNTIME_FUNCTION(Runtime_CompileOptimized) {
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
CONVERT_BOOLEAN_ARG_CHECKED(concurrent, 1);
StackLimitCheck check(isolate);
if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
Compiler::ConcurrencyMode mode =
concurrent ? Compiler::CONCURRENT : Compiler::NOT_CONCURRENT;
Handle<Code> code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment