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

Unified Diff: lib/compiler/implementation/lib/js_helper.dart

Issue 11175032: Revert "Removing reference to ObjectNotClosureException from dart2js." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | tests/language/call_through_getter_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/lib/js_helper.dart
diff --git a/lib/compiler/implementation/lib/js_helper.dart b/lib/compiler/implementation/lib/js_helper.dart
index 8f938e4d4f9205780b28cf73579054123c53f230..a961599608584f2ed9c6f2226afca6ad0a82006d 100644
--- a/lib/compiler/implementation/lib/js_helper.dart
+++ b/lib/compiler/implementation/lib/js_helper.dart
@@ -882,9 +882,17 @@ unwrapException(ex) {
type == 'called_non_callable' ||
type == 'non_object_property_call' ||
type == 'non_object_property_load') {
- return new NullPointerException();
+ if (name is String && name.startsWith(r'call$')) {
+ return new ObjectNotClosureException();
+ } else {
+ return new NullPointerException();
+ }
} else if (type == 'undefined_method') {
- return new NoSuchMethodError('', name, []);
+ if (name is String && name.startsWith(r'call$')) {
+ return new ObjectNotClosureException();
+ } else {
+ return new NoSuchMethodError('', name, []);
+ }
}
var ieErrorCode = JS('int', '#.number & 0xffff', ex);
« no previous file with comments | « no previous file | tests/language/call_through_getter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698