Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 483699cbda9da065ae12000019af1f1f33eaeb00..b3d7af13cc9d2bf5a507fe8cb0cdda9d5e71e090 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -1222,6 +1222,23 @@ class V8_EXPORT ScriptCompiler { |
* V8 has parsed the data it received so far. |
*/ |
virtual size_t GetMoreData(const uint8_t** src) = 0; |
+ |
+ /** |
+ * V8 calls this method to set a 'bookmark' at the current position in |
+ * the source stream, for the purpose of (maybe) later calling |
+ * ResetToBookmark. If ResetToBookmark is called later, then subsequent |
+ * calls to GetMoreData should return the same data as they did when |
+ * SetBookmark was called earlier. |
+ * |
+ * The embedder may return 'false' to indicate it cannot provide this |
+ * functionality. |
+ */ |
+ virtual bool SetBookmark(); |
+ |
+ /** |
+ * V8 calls this to return to a previously set bookmark. |
+ */ |
+ virtual void ResetToBookmark(); |
}; |