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}
This commit is contained in:
parent
129593b40e
commit
2fe2258cc5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user