Chromium Code Reviews| Index: src/runtime.cc |
| diff --git a/src/runtime.cc b/src/runtime.cc |
| index 55b270c16fb24e335ccb4abd47b8b4e27851e67e..e34f0ca900c586e34a226e6d2cd61a091592f2cb 100644 |
| --- a/src/runtime.cc |
| +++ b/src/runtime.cc |
| @@ -8744,12 +8744,22 @@ 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()->inline_allocation_disabled()) { |
| + isolate->heap()->EnableInlineAllocation(); |
|
Michael Starzinger
2014/01/23 15:52:19
As discussed offline: We could turn the ASSERT wit
|
| + } else if (!inline_allocation && |
| + !isolate->heap()->inline_allocation_disabled()) { |
| + isolate->heap()->DisableInlineAllocation(); |
| + } |
| + } |
| #endif |
| return isolate->heap()->undefined_value(); |
| } |