This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge chakra-core/ChakraCore@1ffb64cb4d] [1.6>1.7] [MERGE #3429 @atu…
…lkatti] Fixes #586 JsCreateNamedFunction should create a tracked PropertyId for name to ensure toString() works as expected. Merge pull request #3429 from atulkatti:Issue586.JSCreateNamedFunction.1 Fixes #586 JsCreateNamedFunction should create a tracked PropertyId for name to ensure toString() works as expected.
- Loading branch information
Showing
11 changed files
with
404 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
//------------------------------------------------------------------------------------------------------- | ||
// Copyright (C) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. | ||
//------------------------------------------------------------------------------------------------------- | ||
|
||
// Return values from Intl function calls show the function name correctly in debugger. | ||
|
||
/////////////////// DateFormat //////////////////// | ||
var options = { ca: "gregory", hour12: true, timeZone:"UTC" }; | ||
// Bug: GitHub Issue#3438: Intl.DateTimeFormat constructor call has 2 entries in the debugger functionCallsReturn. | ||
// https://github.com/Microsoft/ChakraCore/issues/3438 | ||
// Actual: | ||
// "functionCallsReturn": { | ||
// "[Anonymous function returned]": "undefined undefined", | ||
// "[Intl.DateTimeFormat returned]": "Object {...}" | ||
// Expected: | ||
// "functionCallsReturn": { | ||
// "[Intl.DateTimeFormat returned]": "Object {...}" | ||
var dateFormat1 = new Intl.DateTimeFormat("en-US", options); /**bp:resume('step_over');locals();**/ | ||
WScript.Echo(""); // Dummy line to get desired debugger logging behavior. Required due to the above bug. | ||
var date1 = new Date(2000, 1, 1); | ||
|
||
// Bug: GitHub Issue#3439: Intl function call has 2 entries in the debugger functionCallsReturn. | ||
// https://github.com/Microsoft/ChakraCore/issues/3439 | ||
// Actual: | ||
// "functionCallsReturn": { | ||
// "[get format returned]": "function <large string>", | ||
// "[Intl.DateTimeFormat.prototype.format returned]": "string 2/1/2000" | ||
// Expected: | ||
// "functionCallsReturn": { | ||
// "[Intl.DateTimeFormat.prototype.format returned]": "string 2/1/2000" | ||
var date2 = dateFormat1.format(date1); /**bp:resume('step_over');locals();**/ | ||
WScript.Echo(""); // Dummy line to get desired debugger logging behavior. Required due to the above bug. | ||
var stringDate1 = date1.toLocaleString("en-us"); /**bp:resume('step_over');locals();resume('step_over');locals();resume('step_over');locals();**/ | ||
Intl.DateTimeFormat.supportedLocalesOf(["en-US"], { localeMatcher: "best fit" }); | ||
dateFormat1.resolvedOptions(); | ||
WScript.Echo(""); // Dummy line to get desired debugger logging behavior. Required due to the above bug. | ||
|
||
/////////////////// NumberFormat //////////////////// | ||
var numberFormat1 = new Intl.NumberFormat(); /**bp:resume('step_over');locals();**/ | ||
WScript.Echo(""); // Dummy line to get desired debugger logging behavior. Required due to the above bug. | ||
// Bug: GitHub Issue#3439: Intl function call has 2 entries in the debugger functionCallsReturn. | ||
// https://github.com/Microsoft/ChakraCore/issues/3439 | ||
// Actual: | ||
// "functionCallsReturn": { | ||
// "[get format returned]": "function <large string>", | ||
// "[Intl.DateTimeFormat.prototype.format returned]": "string 2/1/2000" | ||
// Expected: | ||
// "functionCallsReturn": { | ||
// "[Intl.DateTimeFormat.prototype.format returned]": "string 2/1/2000" | ||
var formattedNumber1 = numberFormat1.format(123.456); /**bp:resume('step_over');locals();**/ | ||
WScript.Echo(""); // Dummy line to get desired debugger logging behavior. Required due to the above bug. | ||
Intl.NumberFormat.supportedLocalesOf(["en-US"], { localeMatcher: "lookup" }); /**bp:resume('step_over');locals();resume('step_over');locals();**/ | ||
numberFormat1.resolvedOptions(); /**bp:locals();resume('step_over');locals();**/ | ||
WScript.Echo(""); // Dummy line to get desired debugger logging behavior. Required due to the above bug. | ||
|
||
/////////////////// Collator //////////////////// | ||
var collator1 = Intl.Collator(); /**bp:resume('step_over');locals();resume('step_over');locals();**/ | ||
// Bug: GitHub Issue#3439: Intl function call has 2 entries in the debugger functionCallsReturn. | ||
// https://github.com/Microsoft/ChakraCore/issues/3439 | ||
// Actual: | ||
// "functionCallsReturn": { | ||
// "[get compare returned]": "function <large string>", | ||
// "[Intl.Collator.prototype.compare returned]": "number -1" | ||
// Expected: | ||
// "functionCallsReturn": { | ||
// "[Intl.Collator.prototype.compare returned]": "number -1" | ||
var compare1 = collator1.compare('a', 'b'); | ||
WScript.Echo(""); // Dummy line to get desired debugger logging behavior. Required due to the above bug. | ||
Intl.Collator.supportedLocalesOf(["en-US"], { localeMatcher: "best fit" }); /**bp:resume('step_over');locals();resume('step_over');locals();**/ | ||
collator1.resolvedOptions(); | ||
|
||
WScript.Echo("Pass"); |
Oops, something went wrong.