Chromium Code Reviews| Index: src/runtime/runtime-generator.cc |
| diff --git a/src/runtime/runtime-generator.cc b/src/runtime/runtime-generator.cc |
| index 459713ee85f039f4966aeca095f1361eb57dea07..7cf0314fc6f469cc8c9d0c72e4997d9dd5d637c0 100644 |
| --- a/src/runtime/runtime-generator.cc |
| +++ b/src/runtime/runtime-generator.cc |
| @@ -36,7 +36,7 @@ RUNTIME_FUNCTION(Runtime_CreateJSGeneratorObject) { |
| RUNTIME_FUNCTION(Runtime_SuspendJSGeneratorObject) { |
| HandleScope handle_scope(isolate); |
| - DCHECK(args.length() == 1 || args.length() == 2); |
| + DCHECK(args.length() == 1); |
|
Michael Starzinger
2016/01/29 09:48:53
The declaration in runtime.h can be changed from "
|
| CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator_object, 0); |
| JavaScriptFrameIterator stack_iterator(isolate); |
| @@ -55,18 +55,6 @@ RUNTIME_FUNCTION(Runtime_SuspendJSGeneratorObject) { |
| DCHECK_GE(operands_count, 1 + args.length()); |
| operands_count -= 1 + args.length(); |
| - // Second argument indicates that we need to patch the handler table because |
| - // a delegating yield introduced a try-catch statement at expression level, |
| - // hence the operand count was off when we statically computed it. |
| - // TODO(mstarzinger): This special case disappears with do-expressions. |
|
Michael Starzinger
2016/01/29 09:48:53
Woot! This the the awesomez! :)
|
| - if (args.length() == 2) { |
| - CONVERT_SMI_ARG_CHECKED(handler_index, 1); |
| - Handle<Code> code(frame->unchecked_code()); |
| - Handle<HandlerTable> table(HandlerTable::cast(code->handler_table())); |
| - int handler_depth = operands_count - TryBlockConstant::kElementCount; |
| - table->SetRangeDepth(handler_index, handler_depth); |
| - } |
| - |
| if (operands_count == 0) { |
| // Although it's semantically harmless to call this function with an |
| // operands_count of zero, it is also unnecessary. |