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

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

Issue 10689040: Throw a NullPointerException when throwing null. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | no next file » | 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 99a5ac7ca85946a11a3ee89dfdbb79c5771fbfc0..4f45b395ec5451d57e4aebb0d1dc37cba7e34c12 100644
--- a/lib/compiler/implementation/lib/js_helper.dart
+++ b/lib/compiler/implementation/lib/js_helper.dart
@@ -757,6 +757,7 @@ class MathNatives {
* an exception.
*/
captureStackTrace(ex) {
+ if (ex === null) ex = const NullPointerException();
var jsError = JS('Object', @'new Error()');
JS('void', @'#.dartException = #', jsError, ex);
JS('void', @'''#.toString = #''', jsError,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698