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

Unified Diff: src/api.cc

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 | « include/v8.h ('k') | src/flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index c7ebc7714f57a052f99964e44e412a2d66770c7d..9a1ff600745869f079c186ee3b8d2e077a713809 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -14,6 +14,7 @@
#include "include/v8-testing.h"
#include "src/assert-scope.h"
#include "src/background-parsing-task.h"
+#include "src/base/functional.h"
#include "src/base/platform/platform.h"
#include "src/base/platform/time.h"
#include "src/base/utils/random-number-generator.h"
@@ -1846,6 +1847,13 @@ Local<Script> ScriptCompiler::Compile(Isolate* v8_isolate,
}
+uint32_t ScriptCompiler::CachedDataVersionTag() {
+ return static_cast<uint32_t>(base::hash_combine(
+ internal::Version::Hash(), internal::FlagList::Hash(),
+ static_cast<uint32_t>(internal::CpuFeatures::SupportedFeatures())));
+}
+
+
Local<Script> Script::Compile(v8::Handle<String> source,
v8::ScriptOrigin* origin) {
i::Handle<i::String> str = Utils::OpenHandle(*source);
« no previous file with comments | « include/v8.h ('k') | src/flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698