| Index: runtime/lib/errors_patch.dart
|
| diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
|
| index 01920edd28e08ec35df5ffa4d64db1df69fb9e07..1ccac70042e38e168afb5bd8a8bccdba12fb4db9 100644
|
| --- a/runtime/lib/errors_patch.dart
|
| +++ b/runtime/lib/errors_patch.dart
|
| @@ -57,6 +57,18 @@ class _TypeError extends _AssertionError implements TypeError {
|
| String error_msg)
|
| native "TypeError_throwNew";
|
|
|
| + static _throwNewIfNotLoaded(_LibraryPrefix prefix,
|
| + int location,
|
| + Object src_value,
|
| + String dst_type_name,
|
| + String dst_name,
|
| + String error_msg) {
|
| + if (!prefix.isLoaded()) {
|
| + _throwNew(location, src_value, dst_type_name, dst_name, error_msg);
|
| + }
|
| + }
|
| +
|
| +
|
| String toString() {
|
| String str = (_errorMsg != null) ? _errorMsg : "";
|
| if ((_dstName != null) && (_dstName.length > 0)) {
|
| @@ -181,6 +193,20 @@ patch class NoSuchMethodError {
|
| existingArgumentNames);
|
| }
|
|
|
| + // Calls _throwNew if 'prefix' not loaded.
|
| + static void _throwNewIfNotLoaded(_LibraryPrefix prefix,
|
| + Object receiver,
|
| + String memberName,
|
| + int invocation_type,
|
| + List arguments,
|
| + List argumentNames,
|
| + List existingArgumentNames) {
|
| + if (!prefix.isLoaded()) {
|
| + _throwNew(receiver, memberName, invocation_type, arguments,
|
| + argumentNames, existingArgumentNames);
|
| + }
|
| + }
|
| +
|
| // Remember the type from the invocation mirror or static compilation
|
| // analysis when thrown directly with _throwNew. A negative value means
|
| // that no information is available.
|
|
|