Skip to content

Commit

Permalink
Remove unnecessary/incorrect bind
Browse files Browse the repository at this point in the history
Fixes #381

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1484003004 .
  • Loading branch information
vsmenon committed Nov 30, 2015
1 parent 5b2e5f8 commit a8c8bde
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/dev_compiler/lib/runtime/dart/_operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a8c8bde

Please sign in to comment.