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

Side by Side Diff: runtime/vm/isolate.cc

Issue 1754703008: Clear fields sticky_error and pending_functions when unscheduling thread; enable background compila… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: t Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/flag_list.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/text_buffer.h" 10 #include "platform/text_buffer.h"
(...skipping 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 os_thread->set_thread(NULL); 2596 os_thread->set_thread(NULL);
2597 OSThread::SetCurrent(os_thread); 2597 OSThread::SetCurrent(os_thread);
2598 if (is_mutator) { 2598 if (is_mutator) {
2599 mutator_thread_ = NULL; 2599 mutator_thread_ = NULL;
2600 } 2600 }
2601 thread->isolate_ = NULL; 2601 thread->isolate_ = NULL;
2602 thread->heap_ = NULL; 2602 thread->heap_ = NULL;
2603 thread->set_os_thread(NULL); 2603 thread->set_os_thread(NULL);
2604 thread->set_execution_state(Thread::kThreadInVM); 2604 thread->set_execution_state(Thread::kThreadInVM);
2605 thread->set_safepoint_state(0); 2605 thread->set_safepoint_state(0);
2606 thread->clear_pending_functions();
2606 ASSERT(thread->no_safepoint_scope_depth() == 0); 2607 ASSERT(thread->no_safepoint_scope_depth() == 0);
2607 // Return thread structure. 2608 // Return thread structure.
2608 thread_registry()->ReturnThreadLocked(is_mutator, thread); 2609 thread_registry()->ReturnThreadLocked(is_mutator, thread);
2609 } 2610 }
2610 2611
2611 2612
2612 static RawInstance* DeserializeObject(Thread* thread, 2613 static RawInstance* DeserializeObject(Thread* thread,
2613 uint8_t* obj_data, 2614 uint8_t* obj_data,
2614 intptr_t obj_len) { 2615 intptr_t obj_len) {
2615 if (obj_data == NULL) { 2616 if (obj_data == NULL) {
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 void IsolateSpawnState::DecrementSpawnCount() { 2833 void IsolateSpawnState::DecrementSpawnCount() {
2833 ASSERT(spawn_count_monitor_ != NULL); 2834 ASSERT(spawn_count_monitor_ != NULL);
2834 ASSERT(spawn_count_ != NULL); 2835 ASSERT(spawn_count_ != NULL);
2835 MonitorLocker ml(spawn_count_monitor_); 2836 MonitorLocker ml(spawn_count_monitor_);
2836 ASSERT(*spawn_count_ > 0); 2837 ASSERT(*spawn_count_ > 0);
2837 *spawn_count_ = *spawn_count_ - 1; 2838 *spawn_count_ = *spawn_count_ - 1;
2838 ml.Notify(); 2839 ml.Notify();
2839 } 2840 }
2840 2841
2841 } // namespace dart 2842 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flag_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698