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

Unified Diff: lib/runtime/dart_sdk.js

Side-by-side diff isn't available for this file because of its large size.
Issue 1921503007: simplify emitting dart.bind for native types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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:
Download patch
« no previous file with comments | « no previous file | lib/src/compiler/code_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart_sdk.js
diff --git a/lib/runtime/dart_sdk.js b/lib/runtime/dart_sdk.js
index 3b83779fd143ceb9e955fb6568ae3c810f63148f..92124c18e07785ba58873d2bf7ceeeaac3f5690c 100644
--- a/lib/runtime/dart_sdk.js
+++ b/lib/runtime/dart_sdk.js
@@ -114,9 +114,8 @@ dart_library.library('dart_sdk', null, /* Imports */[
dart._methodSig = Symbol("sig");
dart._staticSig = Symbol("sigStatic");
dart.getMethodType = function(obj, name) {
- if (obj === void 0) return void 0;
- if (obj == null) return void 0;
- return dart.getMethodTypeFromType(obj.__proto__.constructor, name);
+ let type = obj == null ? core.Object : obj.__proto__.constructor;
+ return dart.getMethodTypeFromType(type, name);
};
dart.getMethodTypeFromType = function(type, name) {
let sigObj = type[dart._methodSig];
« no previous file with comments | « no previous file | lib/src/compiler/code_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698