[Intl] Remove incorrect CHECK

The CHECK was introduced in d7ae63e6f2.

The first time the property got read by ToDateTimeOptions
and the test will cause the needsDefault in ToDateTimeOptions
be false. Then in step 22 of InitializeDateTimeFormat,
it will get all undefined and cause the
skeleton to be empty string. If we only pass in empty options, the
defaults will be filled by ToDateTimeOptions and won't cause any
CHECK failure.


Bug: chromium:888299
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I3ee14434f0708eaaea78cc8857591152d1bdef8a
Reviewed-on: https://chromium-review.googlesource.com/1241316
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56226}
This commit is contained in:
Frank Tang 2018-09-25 16:46:32 -07:00 committed by Commit Bot
parent e3eedfb406
commit 93cbb579a6
2 changed files with 7 additions and 1 deletions

View File

@ -836,7 +836,6 @@ MaybeHandle<JSDateTimeFormat> JSDateTimeFormat::Initialize(
Maybe<std::string> maybe_skeleton =
JSDateTimeFormat::OptionsToSkeleton(isolate, options);
MAYBE_RETURN(maybe_skeleton, Handle<JSDateTimeFormat>());
CHECK(!maybe_skeleton.FromJust().empty());
std::string skeleton = maybe_skeleton.FromJust();
// 13. Set dateTimeFormat.[[Calendar]] to r.[[ca]].

View File

@ -0,0 +1,7 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var i = 0;
new Intl.DateTimeFormat(
undefined, { get hour() { if (i == 0) { i = 1; return 'numeric'} } });