| Index: src/harmony-classes.js
|
| diff --git a/src/harmony-classes.js b/src/harmony-classes.js
|
| index 31c62611ef525cc26353dd56b5b8075f135fd939..ac0675862eacf581136d743163e74b3d67ea2b01 100644
|
| --- a/src/harmony-classes.js
|
| +++ b/src/harmony-classes.js
|
| @@ -9,26 +9,27 @@
|
|
|
| "use strict";
|
|
|
| +function FunctionToMethod(homeObject) {
|
| + if (!IS_SPEC_FUNCTION(this)) {
|
| + throw MakeTypeError('toMethod_non_function',
|
| + [%ToString(this), typeof this]);
|
|
|
| -(function() {
|
| - function FunctionToMethod(homeObject) {
|
| - if (!IS_SPEC_FUNCTION(this)) {
|
| - throw MakeTypeError('toMethod_non_function',
|
| - [%ToString(this), typeof this]);
|
| -
|
| - }
|
| -
|
| - if (!IS_SPEC_OBJECT(homeObject)) {
|
| - throw MakeTypeError('toMethod_non_object',
|
| - [%ToString(homeObject)]);
|
| - }
|
| + }
|
|
|
| - return %ToMethod(this, homeObject);
|
| + if (!IS_SPEC_OBJECT(homeObject)) {
|
| + throw MakeTypeError('toMethod_non_object',
|
| + [%ToString(homeObject)]);
|
| }
|
|
|
| + return %ToMethod(this, homeObject);
|
| +}
|
| +
|
| +function SetupHarmonyClasses() {
|
| %CheckIsBootstrapping();
|
|
|
| InstallFunctions($Function.prototype, DONT_ENUM, $Array(
|
| "toMethod", FunctionToMethod
|
| ));
|
| -}());
|
| +}
|
| +
|
| +SetupHarmonyClasses();
|
|
|