Index: src/runtime/runtime-generator.cc |
diff --git a/src/runtime/runtime-generator.cc b/src/runtime/runtime-generator.cc |
index e201c49fc6fe877b9f36f48e72866158685f6089..11bb46e34d16e7328d3888b63fba28fc07214024 100644 |
--- a/src/runtime/runtime-generator.cc |
+++ b/src/runtime/runtime-generator.cc |
@@ -146,14 +146,15 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetSourcePosition) { |
DCHECK(args.length() == 1); |
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); |
- if (generator->is_suspended()) { |
- Handle<Code> code(generator->function()->code(), isolate); |
- int offset = generator->continuation(); |
- RUNTIME_ASSERT(0 <= offset && offset < code->instruction_size()); |
- return Smi::FromInt(code->SourcePosition(offset)); |
- } |
+ if (!generator->is_suspended()) return isolate->heap()->undefined_value(); |
- return isolate->heap()->undefined_value(); |
+ if (FLAG_ignition && FLAG_ignition_generators) UNIMPLEMENTED(); |
+ |
+ DCHECK(!generator->function()->shared()->HasBytecodeArray()); |
+ Handle<Code> code(generator->function()->code(), isolate); |
+ int offset = generator->continuation(); |
+ RUNTIME_ASSERT(0 <= offset && offset < code->instruction_size()); |
+ return Smi::FromInt(code->SourcePosition(offset)); |
} |
} // namespace internal |