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

Unified Diff: lib/runtime/dart/core.js

Issue 1200243002: fixes #232, handling of arguments (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 months 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 | « no previous file | lib/runtime/dart/js.js » ('j') | lib/src/codegen/js_codegen.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/core.js
diff --git a/lib/runtime/dart/core.js b/lib/runtime/dart/core.js
index d28b84bb3c90df78980e3bb48b54bff39bdad594..3174a3e9ab17b4e326154b31b8216551d76247fc 100644
--- a/lib/runtime/dart/core.js
+++ b/lib/runtime/dart/core.js
@@ -12,10 +12,9 @@ dart_library.library('dart/core', null, /* Imports */[
class Object {
constructor() {
let name = this.constructor.name;
- let init = this[name];
let result = void 0;
- if (init)
- result = init.apply(this, arguments);
+ if (name in this)
+ result = this[name](...arguments);
return result === void 0 ? this : result;
}
['=='](other) {
« no previous file with comments | « no previous file | lib/runtime/dart/js.js » ('j') | lib/src/codegen/js_codegen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698