Skip to content

Commit

Permalink
Conversion misspelled "Convertion" in error message string
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=185436

Patch by Rick Waldron <[email protected]> on 2018-05-23
JSTests:

Reviewed by Saam Barati, Michael Saboff.

* bigIntTests.yaml:

Source/JavaScriptCore:

Reviewed by Saam Barati, Michael Saboff

* runtime/JSBigInt.cpp:
(JSC::JSBigInt::toNumber const):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@232110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
[email protected] committed May 23, 2018
1 parent 986a7a5 commit c6f8518
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 1 deletion.
9 changes: 9 additions & 0 deletions JSTests/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2018-05-23 Rick Waldron <[email protected]>

Conversion misspelled "Convertion" in error message string
https://bugs.webkit.org/show_bug.cgi?id=185436

Reviewed by Saam Barati, Michael Saboff.

* bigIntTests.yaml:

2018-05-23 Yusuke Suzuki <[email protected]>

Unreviewed, skip test if memoryLimited is specified
Expand Down
3 changes: 3 additions & 0 deletions JSTests/bigIntTests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,6 @@

- path: stress/big-int-division.js
cmd: runBigIntEnabled

- path: stress/big-int-no-conversion-to-number.js
cmd: runBigIntEnabled
12 changes: 12 additions & 0 deletions JSTests/stress/big-int-no-conversion-to-number.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//@ runBigIntEnabled

let message;
try {
1n + 1;
} catch (error) {
message = error.message;
}

if (message !== "Conversion from 'BigInt' to 'number' is not allowed.") {
throw new Error("Error message has changed to something unexpected");
}
10 changes: 10 additions & 0 deletions Source/JavaScriptCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2018-05-23 Rick Waldron <[email protected]>

Conversion misspelled "Convertion" in error message string
https://bugs.webkit.org/show_bug.cgi?id=185436

Reviewed by Saam Barati, Michael Saboff

* runtime/JSBigInt.cpp:
(JSC::JSBigInt::toNumber const):

2018-05-22 Yusuke Suzuki <[email protected]>

[JSC] Clean up stringGetByValStubGenerator
Expand Down
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/runtime/JSBigInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ double JSBigInt::toNumber(ExecState* state) const
{
VM& vm = state->vm();
auto scope = DECLARE_THROW_SCOPE(vm);
throwTypeError(state, scope, ASCIILiteral("Convertion from 'BigInt' to 'number' is not allowed."));
throwTypeError(state, scope, ASCIILiteral("Conversion from 'BigInt' to 'number' is not allowed."));
return 0.0;
}

Expand Down

0 comments on commit c6f8518

Please sign in to comment.