Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index ee49ca4349d804a15020c98d5c573012d35f2e7e..2bfda9d7207689c28bdc0366c1cf0474813acbdb 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -3604,6 +3604,24 @@ class V8EXPORT PersistentHandleVisitor { // NOLINT |
/** |
+ * Asserts that no action is performed that could cause a handle's value |
+ * to be modified. Useful when otherwise unsafe handle operations need to |
+ * be performed. |
+ */ |
+class V8EXPORT AssertNoGCScope { |
+#ifndef DEBUG |
+ V8_INLINE(AssertNoGCScope(Isolate* isolate)) {} |
+#else |
+ AssertNoGCScope(Isolate* isolate); |
+ ~AssertNoGCScope(); |
+ private: |
+ Isolate* isolate_; |
+ bool last_state_; |
+#endif |
+}; |
+ |
+ |
+/** |
* Container class for static utility functions. |
*/ |
class V8EXPORT V8 { |