| Index: src/js/messages.js
|
| diff --git a/src/js/messages.js b/src/js/messages.js
|
| index d0305412b74896a7971e4e435032b5f9a8ee3a05..e0d6a07daeec5fa3adbc7b97e107833810f4958b 100644
|
| --- a/src/js/messages.js
|
| +++ b/src/js/messages.js
|
| @@ -566,10 +566,18 @@ function GetStackTraceLine(recv, fun, pos, isGlobal) {
|
| // Error implementation
|
|
|
| function CallSite(receiver, fun, pos, strict_mode) {
|
| + if (!IS_FUNCTION(fun)) {
|
| + throw MakeTypeError(kCallSiteExpectsFunction, typeof fun);
|
| + }
|
| +
|
| + if (IS_UNDEFINED(new.target)) {
|
| + return new CallSite(receiver, fun, pos, strict_mode);
|
| + }
|
| +
|
| SET_PRIVATE(this, callSiteReceiverSymbol, receiver);
|
| SET_PRIVATE(this, callSiteFunctionSymbol, fun);
|
| - SET_PRIVATE(this, callSitePositionSymbol, pos);
|
| - SET_PRIVATE(this, callSiteStrictSymbol, strict_mode);
|
| + SET_PRIVATE(this, callSitePositionSymbol, TO_INT32(pos));
|
| + SET_PRIVATE(this, callSiteStrictSymbol, TO_BOOLEAN(strict_mode));
|
| }
|
|
|
| function CallSiteGetThis() {
|
|
|