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

Unified Diff: src/runtime.cc

Issue 325553002: --verify-predictable mode added for ensuring that GC behaves deterministically. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments Created 6 years, 6 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
« no previous file with comments | « src/objects-printer.cc ('k') | src/serialize.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index a824d6a7977c34fbd0f6508c3dd4779193a56fa5..8d80f9fd15a91b3ab78d8f33fc770b9c9d47b83b 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -9640,7 +9640,13 @@ RUNTIME_FUNCTION(Runtime_DateCurrentTime) {
// the number in a Date object representing a particular instant in
// time is milliseconds. Therefore, we floor the result of getting
// the OS time.
- double millis = std::floor(OS::TimeCurrentMillis());
+ double millis;
+ if (FLAG_verify_predictable) {
+ millis = 1388534400000.0; // Jan 1 2014 00:00:00 GMT+0000
+ millis += std::floor(isolate->heap()->synthetic_time());
+ } else {
+ millis = std::floor(OS::TimeCurrentMillis());
+ }
return *isolate->factory()->NewNumber(millis);
}
« no previous file with comments | « src/objects-printer.cc ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698