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

Unified Diff: runtime/vm/code_generator.cc

Issue 883263004: Allows turning on checked mode on a per-isolate basis (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 43426)
+++ runtime/vm/code_generator.cc (working copy)
@@ -227,7 +227,7 @@
// Code inlined in the caller should have optimized the case where the
// instantiator can be reused as type argument vector.
ASSERT(instantiator.IsNull() || !type_arguments.IsUninstantiatedIdentity());
- if (FLAG_enable_type_checks) {
+ if (FLAG_enable_type_checks || Isolate::Current()->checked_mode()) {
Error& bound_error = Error::Handle();
type_arguments =
type_arguments.InstantiateAndCanonicalizeFrom(instantiator,
@@ -532,7 +532,7 @@
}
String& bound_error_message = String::Handle();
if (!bound_error.IsNull()) {
- ASSERT(FLAG_enable_type_checks);
+ ASSERT(FLAG_enable_type_checks || Isolate::Current()->checked_mode());
bound_error_message = String::New(bound_error.ToErrorCString());
}
if (src_type_name.Equals(dst_type_name)) {

Powered by Google App Engine
This is Rietveld 408576698