3846fc3a2e
Consider the case that uloc_toLegacyType may return nullptr while the specified keyword value cannot be mapped to a well-formed legacy type. Bug: chromium:966285 Change-Id: I40511c54e4835599c002f1c678121341276a4e58 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627902 Commit-Queue: Frank Tang <ftang@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#61829}
11 lines
387 B
JavaScript
11 lines
387 B
JavaScript
// Copyright 2019 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.
|
|
|
|
// Flags: --harmony-intl-add-calendar-numbering-system
|
|
|
|
var v = {};
|
|
Object.defineProperty(v.__proto__, "calendar",
|
|
{ get: function() { return -1; } });
|
|
assertThrows(() => new Intl.DateTimeFormat(v, 0), RangeError);
|