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}
This commit is contained in:
yangguo 2015-03-06 06:44:43 -08:00 committed by Commit bot
parent 233ea0eef8
commit 5de20c05d5
2 changed files with 2 additions and 0 deletions

View File

@ -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;

View File

@ -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);