Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Unified Diff: frog/frogsh

Issue 8511081: Better fix for client tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: update status Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/corejs.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « frog/corejs.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698