From a8c8bdeb583ac7cf4a7ffbecd4f6820e3271f1ed Mon Sep 17 00:00:00 2001 From: Vijay Menon Date: Mon, 30 Nov 2015 14:29:11 -0800 Subject: [PATCH] Remove unnecessary/incorrect bind Fixes #381 R=jmesserly@google.com Review URL: https://codereview.chromium.org/1484003004 . --- pkg/dev_compiler/lib/runtime/dart/_operations.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/dev_compiler/lib/runtime/dart/_operations.js b/pkg/dev_compiler/lib/runtime/dart/_operations.js index 3b799250a065..edce6cdf8490 100644 --- a/pkg/dev_compiler/lib/runtime/dart/_operations.js +++ b/pkg/dev_compiler/lib/runtime/dart/_operations.js @@ -45,13 +45,7 @@ dart_library.library('dart/_operations', null, /* Imports */[ // Also, do we want an NSM on regular JS objects? // See: https://github.com/dart-lang/dev_compiler/issues/169 let result = obj[field]; - - // TODO(vsm): Check this more robustly. - if (typeof result == "function" && !hasOwnProperty.call(obj, field)) { - // This appears to be a method tearoff. Bind this. - return result.bind(obj); - } - return result; + return result; } exports.dload = dload;