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

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: Removed Mutex from PersistentHandles 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..494debc3b658485af187229dbee2240cbc4b4e6a 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -540,7 +540,7 @@ bool Api::IsValid(Dart_Handle handle) {
// 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::Current()->IsValidHandle(handle) ||
siva 2017/02/02 22:51:13 Maybe you should add an assert here Thread* thread
bkonyi 2017/02/02 23:08:49 Done.
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