From: yangguo Date: Fri, 6 Mar 2015 14:44:43 +0000 (-0800) Subject: Do not use eternal handles when creating a start-up snapshot. X-Git-Tag: upstream/4.7.83~3995 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5de20c05d54f0d0585b083764bdd8d78cb7ef350;p=platform%2Fupstream%2Fv8.git Do not use eternal handles when creating a start-up snapshot. R=ulan@chromium.org Review URL: https://codereview.chromium.org/984833003 Cr-Commit-Position: refs/heads/master@{#27045} --- diff --git a/src/date.js b/src/date.js index 40ab1d25d..208a5b2b4 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; diff --git a/src/runtime/runtime-date.cc b/src/runtime/runtime-date.cc index f8b88e139..844ca25fd 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 date_cache_version = isolate->factory()->NewFixedArray(1, TENURED);