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

Unified Diff: include/v8.h

Issue 718043002: Add a version tag for cached data. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Final rebase. Created 6 years, 1 month 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index e2dee5d7b3007d9e525fec11f1bbbd94ccf49a97..bca4d125eca6164ddeb80a2a8b440a588498c2fe 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1238,6 +1238,26 @@ class V8_EXPORT ScriptCompiler {
static Local<Script> Compile(Isolate* isolate, StreamedSource* source,
Handle<String> full_source_string,
const ScriptOrigin& origin);
+
+ /**
+ * Return a version tag for CachedData for the current V8 version & flags.
+ *
+ * This value is meant only for determining whether a previously generated
+ * CachedData instance is still valid; the tag has no other meaing.
+ *
+ * Background: The data carried by CachedData may depend on the exact
+ * V8 version number or currently compiler flags. This means when
+ * persisting CachedData, the embedder must take care to not pass in
+ * data from another V8 version, or the same version with different
+ * features enabled.
+ *
+ * The easiest way to do so is to clear the embedder's cache on any
+ * such change.
+ *
+ * Alternatively, this tag can be stored alongside the cached data and
+ * compared when it is being used.
+ */
+ static uint32_t CachedDataVersionTag();
};
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698