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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2672833003: Fix for issue #28606. Removed loop which iterated over all threads in the thread registry to check … (Closed)
Patch Set: Fix for issue #28606. Removed loop which iterated over all threads in the thread registry to check … Created 3 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
« no previous file with comments | « no previous file | runtime/vm/thread_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 69ef30066df019db9ed42f14bb6e38f1bdba78f4..ee95896ceb1d435266f6497ed811daafe98321a5 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -536,11 +536,13 @@ Dart_Handle Api::AcquiredError(Isolate* isolate) {
bool Api::IsValid(Dart_Handle handle) {
Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ ASSERT(thread->IsMutatorThread());
CHECK_ISOLATE(isolate);
// Check against all of the handles in the current isolate as well as the
// read-only handles.
- return isolate->thread_registry()->IsValidHandle(handle) ||
+ return thread->IsValidHandle(handle) ||
isolate->api_state()->IsActivePersistentHandle(
reinterpret_cast<Dart_PersistentHandle>(handle)) ||
isolate->api_state()->IsActiveWeakPersistentHandle(
« no previous file with comments | « no previous file | runtime/vm/thread_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698