| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index a5da88a0b3b2e0b5e44b17e0918d17655ea38e09..34532f1081c2f0d5456415e1a2fa249da4d079a5 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -18863,5 +18863,19 @@ void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell,
|
| }
|
| }
|
|
|
| +int JSGeneratorObject::source_position() const {
|
| + CHECK(is_suspended());
|
| + if (function()->shared()->HasBytecodeArray()) {
|
| + // New-style generators.
|
| + int offset = Smi::cast(input())->value();
|
| + return function()->shared()->bytecode_array()->SourcePosition(offset);
|
| + } else {
|
| + // Old-style generators.
|
| + int offset = continuation();
|
| + CHECK(0 <= offset && offset < function()->code()->instruction_size());
|
| + return function()->code()->SourcePosition(offset);
|
| + }
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace v8
|
|
|