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

Unified Diff: runtime/lib/errors_patch.dart

Issue 1211273011: Added full deferred loading semantic to precompiled/--noopt/eager-loading code (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: c Created 5 years, 5 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 | runtime/lib/lib_prefix.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/errors_patch.dart
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index 01920edd28e08ec35df5ffa4d64db1df69fb9e07..59a61ec4bb9238f98da38db0bd605b63a7c3c224 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,19 @@ patch class NoSuchMethodError {
existingArgumentNames);
}
+ 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.
« no previous file with comments | « no previous file | runtime/lib/lib_prefix.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698