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

Unified Diff: runtime/vm/handles.h

Issue 1411403002: Cleanups (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/handles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/handles.h
diff --git a/runtime/vm/handles.h b/runtime/vm/handles.h
index c5bcac798a86ac4c1a8a8e71e83b9937db8f67af..5e07d6eb2f2f0728aa0d97fadedeb40ff734e8fc 100644
--- a/runtime/vm/handles.h
+++ b/runtime/vm/handles.h
@@ -22,12 +22,12 @@ namespace dart {
// - allocation of handles in the current zone (Handle::AllocateZoneHandle).
// Handles allocated in this manner are destroyed when the zone is destroyed.
// - allocation of handles in a scoped manner (Handle::AllocateHandle).
-// A new scope can be started using HANDLESCOPE(isolate).
+// A new scope can be started using HANDLESCOPE(thread).
// Handles allocated in this manner are destroyed when the HandleScope
// object is destroyed.
// Code that uses scoped handles typically looks as follows:
// {
-// HANDLESCOPE(isolate);
+// HANDLESCOPE(thread);
// const String& str = String::Handle(String::New("abc"));
// .....
// .....
@@ -50,7 +50,7 @@ namespace dart {
// raw dart objects directly. We use NOHANDLESCOPE to assert that we do not
// add code that will allocate new handles during this critical area.
// {
-// NOHANDLESCOPE(isolate);
+// NOHANDLESCOPE(thread);
// ....
// ....
// }
@@ -316,8 +316,8 @@ class HandleScope : public StackResource {
};
// Macro to start a new Handle scope.
-#define HANDLESCOPE(isolate_or_thread) \
- dart::HandleScope vm_internal_handles_scope_(isolate_or_thread);
+#define HANDLESCOPE(thread) \
+ dart::HandleScope vm_internal_handles_scope_(thread);
// The class NoHandleScope is used in critical regions of the virtual machine
@@ -345,7 +345,6 @@ class NoHandleScope : public StackResource {
class NoHandleScope : public ValueObject {
public:
explicit NoHandleScope(Thread* thread) { }
- explicit NoHandleScope(Isolate* isolate) { }
NoHandleScope() { }
~NoHandleScope() { }
@@ -355,8 +354,8 @@ class NoHandleScope : public ValueObject {
#endif // defined(DEBUG)
// Macro to start a no handles scope in the code.
-#define NOHANDLESCOPE(isolate_or_thread) \
- dart::NoHandleScope no_vm_internal_handles_scope_(isolate_or_thread);
+#define NOHANDLESCOPE(thread) \
+ dart::NoHandleScope no_vm_internal_handles_scope_(thread);
} // namespace dart
« no previous file with comments | « no previous file | runtime/vm/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698