Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: src/objects-inl.h

Issue 266983004: Prevent liveedit on or under generators with open activations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 3be682c276ded17a3c96e9fb6aa4cb5235573f64..6114875df4b78aafe1b168410e951109ed1d6acd 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5846,6 +5846,14 @@ bool JSGeneratorObject::is_suspended() {
return continuation() > 0;
}
+bool JSGeneratorObject::is_closed() {
+ return continuation() == kGeneratorClosed;
+}
+
+bool JSGeneratorObject::is_executing() {
+ return continuation() == kGeneratorExecuting;
+}
+
JSGeneratorObject* JSGeneratorObject::cast(Object* obj) {
ASSERT(obj->IsJSGeneratorObject());
ASSERT(HeapObject::cast(obj)->Size() == JSGeneratorObject::kSize);

Powered by Google App Engine
This is Rietveld 408576698