| Index: frog/frogsh
|
| diff --git a/frog/frogsh b/frog/frogsh
|
| index 827f0fdba2d4b676225aec8e8b8b5a1b695d3fee..c7061bb5cc1e212e0dbf18c6be9d29568e1ab35a 100755
|
| --- a/frog/frogsh
|
| +++ b/frog/frogsh
|
| @@ -11835,7 +11835,7 @@ CoreJs.prototype.useOperator = function(name) {
|
| CoreJs.prototype.generate = function(w) {
|
| if ($notnull_bool(this.useVarMethod)) {
|
| this.useTypeNameOf = true;
|
| - w.writeln("function $varMethod(name, methods) {\n Object.prototype[name] = function() {\n $patchMethod(this, name, methods);\n this[name].apply(this, Array.prototype.slice.call(arguments));\n };\n}\nfunction $patchMethod(obj, name, methods) {\n // Get the prototype to patch.\n // Don't overwrite an existing stub, like the one on Object.prototype\n var proto = Object.getPrototypeOf(obj);\n if (!proto || proto.hasOwnProperty(name)) proto = obj;\n var method;\n while (obj && !(method = methods[obj.$typeNameOf()])) {\n obj = Object.getPrototypeOf(obj);\n }\n obj[name] = method || methods['Object'];\n}");
|
| + w.writeln("function $varMethod(name, methods) {\n Object.prototype[name] = function() {\n $patchMethod(this, name, methods);\n return this[name].apply(this, Array.prototype.slice.call(arguments));\n };\n}\nfunction $patchMethod(obj, name, methods) {\n // Get the prototype to patch.\n // Don't overwrite an existing stub, like the one on Object.prototype\n var proto = Object.getPrototypeOf(obj);\n if (!proto || proto.hasOwnProperty(name)) proto = obj;\n var method;\n while (obj && !(method = methods[obj.$typeNameOf()])) {\n obj = Object.getPrototypeOf(obj);\n }\n obj[name] = method || methods['Object'];\n}");
|
| }
|
| if ($notnull_bool(this.useGenStub)) {
|
| this.useThrow = true;
|
|
|