Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 5aea3b5106bc741386914a21207499ff6471d5c3..3be682c276ded17a3c96e9fb6aa4cb5235573f64 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -5840,6 +5840,11 @@ SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset) |
ACCESSORS(JSGeneratorObject, operand_stack, FixedArray, kOperandStackOffset) |
SMI_ACCESSORS(JSGeneratorObject, stack_handler_index, kStackHandlerIndexOffset) |
+bool JSGeneratorObject::is_suspended() { |
+ ASSERT_LT(kGeneratorExecuting, kGeneratorClosed); |
+ ASSERT_EQ(kGeneratorClosed, 0); |
+ return continuation() > 0; |
+} |
JSGeneratorObject* JSGeneratorObject::cast(Object* obj) { |
ASSERT(obj->IsJSGeneratorObject()); |