Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 55b270c16fb24e335ccb4abd47b8b4e27851e67e..3fb886c149972d546decdebab25c19fa72765d26 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -8744,12 +8744,21 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CompileForOnStackReplacement) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_SetAllocationTimeout) { |
SealHandleScope shs(isolate); |
- ASSERT(args.length() == 2); |
+ ASSERT(args.length() == 2 || args.length() == 3); |
#ifdef DEBUG |
CONVERT_SMI_ARG_CHECKED(interval, 0); |
CONVERT_SMI_ARG_CHECKED(timeout, 1); |
isolate->heap()->set_allocation_timeout(timeout); |
FLAG_gc_interval = interval; |
+ if (args.length() == 3) { |
+ // Enable/disable inline allocation if requested. |
+ CONVERT_BOOLEAN_ARG_CHECKED(inline_allocation, 2); |
+ if (inline_allocation) { |
+ isolate->heap()->EnableInlineAllocation(); |
+ } else { |
+ isolate->heap()->DisableInlineAllocation(); |
+ } |
+ } |
#endif |
return isolate->heap()->undefined_value(); |
} |