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

Unified Diff: runtime/lib/mirrors.cc

Issue 28053005: Hide MirroredCompilationErrror behind a flag until post-1.0. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 9b7e9e6d593c31d3a5b02e8ba1036c685a7e5928..14280038fa751e91f699bba28f88b639f4816ec0 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -16,6 +16,10 @@
namespace dart {
+DEFINE_FLAG(bool, use_mirrored_compilation_error, false,
+ "Wrap compilation errors that occur during reflective access in a "
+ "MirroredCompilationError, rather than suspending the isolate.");
+
static RawInstance* CreateMirror(const String& mirror_class_name,
const Array& constructor_arguments) {
const Library& mirrors_lib = Library::Handle(Library::MirrorsLibrary());
@@ -41,7 +45,7 @@ static void ThrowMirroredCompilationError(const String& message) {
static void ThrowInvokeError(const Error& error) {
- if (error.IsLanguageError()) {
+ if (FLAG_use_mirrored_compilation_error && error.IsLanguageError()) {
// A compilation error that was delayed by lazy compilation.
const LanguageError& compilation_error = LanguageError::Cast(error);
String& message = String::Handle(compilation_error.message());
« no previous file with comments | « no previous file | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698