Reviewers: ulan,

Description:
Do not use eternal handles when creating a start-up snapshot.

[email protected]

Please review this at https://codereview.chromium.org/984833003/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+2, -0 lines):
  M src/date.js
  M src/runtime/runtime-date.cc


Index: src/date.js
diff --git a/src/date.js b/src/date.js
index 40ab1d25d6579b5c9d5abaac9bb26ce06d9c2e64..208a5b2b4bec27f45ccc7aef9d4836a10c8bdacc 100644
--- a/src/date.js
+++ b/src/date.js
@@ -731,6 +731,7 @@ var date_cache_version = NAN;
 function CheckDateCacheCurrent() {
   if (!date_cache_version_holder) {
     date_cache_version_holder = %DateCacheVersion();
+    if (!date_cache_version_holder) return;
   }
   if (date_cache_version_holder[0] == date_cache_version) {
     return;
Index: src/runtime/runtime-date.cc
diff --git a/src/runtime/runtime-date.cc b/src/runtime/runtime-date.cc
index f8b88e1398ea4c5c1daa0c7de9f24e28c612342d..844ca25fd5557eff7e7fb074cda10747956ac34c 100644
--- a/src/runtime/runtime-date.cc
+++ b/src/runtime/runtime-date.cc
@@ -152,6 +152,7 @@ RUNTIME_FUNCTION(Runtime_DateToUTC) {
 RUNTIME_FUNCTION(Runtime_DateCacheVersion) {
   HandleScope hs(isolate);
   DCHECK(args.length() == 0);
+ if (isolate->serializer_enabled()) return isolate->heap()->undefined_value(); if (!isolate->eternal_handles()->Exists(EternalHandles::DATE_CACHE_VERSION)) {
     Handle<FixedArray> date_cache_version =
         isolate->factory()->NewFixedArray(1, TENURED);


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to