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

Unified Diff: runtime/lib/isolate.cc

Issue 1737693003: - Remove Isolate::Flags structure and store flags directly in isolate. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 4 years, 10 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/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate.cc
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index f6d248a145b460d078e65ba91c3fe47df2506a80..fb51c07afed8253423d5304972b306231f6c08b0 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -151,8 +151,8 @@ class SpawnIsolateTask : public ThreadPool::Task {
return;
}
- Dart_IsolateFlags api_flags;
- state_->isolate_flags()->CopyTo(&api_flags);
+ // Make a copy of the state's isolate flags and hand it to the callback.
+ Dart_IsolateFlags api_flags = *(state_->isolate_flags());
Isolate* isolate = reinterpret_cast<Isolate*>(
(callback)(state_->script_url(),
@@ -391,7 +391,10 @@ DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 12) {
// If we were passed a value then override the default flags state for
// checked mode.
if (!checked.IsNull()) {
- state->isolate_flags()->set_checked(checked.value());
+ bool val = checked.value();
+ Dart_IsolateFlags* flags = state->isolate_flags();
+ flags->enable_asserts = val;
+ flags->enable_type_checks = val;
}
ThreadPool::Task* spawn_task = new SpawnIsolateTask(state);
« no previous file with comments | « no previous file | runtime/lib/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698