| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index 40c9fa1b995d9afc6a99ef48d5c1e9db0ad92ad5..f45257e66ddbc83743ff9931befa3538cea41a51 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -1594,6 +1594,10 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
| number_fun->shared()->SetConstructStub(
|
| *isolate->builtins()->NumberConstructor_ConstructStub());
|
| number_fun->shared()->set_length(1);
|
| + // https://tc39.github.io/ecma262/#sec-built-in-function-objects says
|
| + // that "Built-in functions that are ECMAScript function objects must
|
| + // be strict functions".
|
| + number_fun->shared()->set_language_mode(STRICT);
|
| InstallWithIntrinsicDefaultProto(isolate, number_fun,
|
| Context::NUMBER_FUNCTION_INDEX);
|
|
|
| @@ -1739,6 +1743,10 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
| *isolate->builtins()->StringConstructor_ConstructStub());
|
| string_fun->shared()->DontAdaptArguments();
|
| string_fun->shared()->set_length(1);
|
| + // https://tc39.github.io/ecma262/#sec-built-in-function-objects says
|
| + // that "Built-in functions that are ECMAScript function objects must
|
| + // be strict functions".
|
| + string_fun->shared()->set_language_mode(STRICT);
|
| InstallWithIntrinsicDefaultProto(isolate, string_fun,
|
| Context::STRING_FUNCTION_INDEX);
|
|
|
|
|