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

Unified Diff: runtime/vm/dart_api_impl.h

Issue 2640573003: Resolution for issue #5092: Unit test handle checks consider dangling handles to be valid. (Closed)
Patch Set: Resolution for issue #5092: Unit test handle checks consider dangling handles to be valid. 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/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.h
diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h
index f597ca29d4e782aec56cab3c99d5d6b0654985c4..d61a3f8c55a9b0df91d7da90f582415161ee589e 100644
--- a/runtime/vm/dart_api_impl.h
+++ b/runtime/vm/dart_api_impl.h
@@ -9,6 +9,7 @@
#include "vm/native_arguments.h"
#include "vm/object.h"
#include "vm/safepoint.h"
+#include "vm/thread_registry.h"
namespace dart {
@@ -18,6 +19,7 @@ class FinalizablePersistentHandle;
class LocalHandle;
class PersistentHandle;
class ReusableObjectHandleScope;
+class ThreadRegistry;
const char* CanonicalFunction(const char* func);
@@ -166,6 +168,9 @@ class Api : AllStatic {
return (ClassId(handle) >= kInstanceCid);
}
+ // Returns true if the handle is non-dangling.
+ static bool IsValid(Dart_Handle handle);
+
// Returns true if the handle holds an Error.
static bool IsError(Dart_Handle handle) {
return RawObject::IsErrorClassId(ClassId(handle));
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698