Chromium Code Reviews| Index: src/runtime/runtime-scopes.cc |
| diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc |
| index 1aa6611fa0bcdce02d57703ea581f916f3fa4961..3cf593fa8d2b1a3aab131565fb3145bcdd479ba7 100644 |
| --- a/src/runtime/runtime-scopes.cc |
| +++ b/src/runtime/runtime-scopes.cc |
| @@ -542,6 +542,14 @@ RUNTIME_FUNCTION(Runtime_NewSloppyArguments) { |
| CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0); |
| Object** parameters = reinterpret_cast<Object**>(args[1]); |
| CONVERT_SMI_ARG_CHECKED(argument_count, 2); |
| +#ifdef DEBUG |
| + // This runtime function does not materialize the correct arguments when the |
|
Benedikt Meurer
2015/09/16 08:20:56
Nit: Can we turn this into a helper function on th
Michael Starzinger
2015/09/16 10:39:36
Done. Named it {JavaScriptFrame::HasInlinedFrames}
|
| + // caller has been inlined, better make sure we are not hitting that case. |
| + List<JSFunction*> functions(1); |
| + JavaScriptFrameIterator it(isolate); |
| + it.frame()->GetFunctions(&functions); |
| + DCHECK_EQ(1, functions.length()); |
| +#endif // DEBUG |
| return *NewSloppyArguments(isolate, callee, parameters, argument_count); |
| } |
| @@ -552,6 +560,14 @@ RUNTIME_FUNCTION(Runtime_NewStrictArguments) { |
| CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0) |
| Object** parameters = reinterpret_cast<Object**>(args[1]); |
| CONVERT_SMI_ARG_CHECKED(argument_count, 2); |
| +#ifdef DEBUG |
| + // This runtime function does not materialize the correct arguments when the |
| + // caller has been inlined, better make sure we are not hitting that case. |
| + List<JSFunction*> functions(1); |
| + JavaScriptFrameIterator it(isolate); |
| + it.frame()->GetFunctions(&functions); |
| + DCHECK_EQ(1, functions.length()); |
| +#endif // DEBUG |
| return *NewStrictArguments(isolate, callee, parameters, argument_count); |
| } |