| Index: src/js/v8natives.js
|
| diff --git a/src/js/v8natives.js b/src/js/v8natives.js
|
| index fa9ebb4c9880f39334b2bc03790cfea3b8414079..711a22fe64ca8e0a43aecf2fe8aaed46bc066d14 100644
|
| --- a/src/js/v8natives.js
|
| +++ b/src/js/v8natives.js
|
| @@ -1290,7 +1290,7 @@ utils.InstallFunctions(GlobalObject, DONT_ENUM, [
|
| function BooleanConstructor(x) {
|
| // TODO(bmeurer): Move this to toplevel.
|
| "use strict";
|
| - if (%_IsConstructCall()) {
|
| + if (!IS_UNDEFINED(new.target)) {
|
| %_SetValueOf(this, TO_BOOLEAN(x));
|
| } else {
|
| return TO_BOOLEAN(x);
|
| @@ -1616,7 +1616,7 @@ function FunctionBind(this_arg) { // Length is 1.
|
| "use strict";
|
| // This function must not use any object literals (Object, Array, RegExp),
|
| // since the literals-array is being used to store the bound data.
|
| - if (%_IsConstructCall()) {
|
| + if (!IS_UNDEFINED(new.target)) {
|
| return %NewObjectFromBound(boundFunction);
|
| }
|
| var bindings = %BoundFunctionGetBindings(boundFunction);
|
|
|