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

Unified Diff: runtime/vm/reusable_handles.h

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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 | « runtime/vm/resolver_test.cc ('k') | runtime/vm/ring_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/reusable_handles.h
diff --git a/runtime/vm/reusable_handles.h b/runtime/vm/reusable_handles.h
index 83855d6e1eb3fedd425c7663a46f64b4eb7621a4..11178d8342f833d64007fa59ef15a4ba7f7b0ec6 100644
--- a/runtime/vm/reusable_handles.h
+++ b/runtime/vm/reusable_handles.h
@@ -35,8 +35,7 @@ namespace dart {
#define REUSABLE_SCOPE(name) \
class Reusable##name##HandleScope : public ValueObject { \
public: \
- explicit Reusable##name##HandleScope(Thread* thread) \
- : thread_(thread) { \
+ explicit Reusable##name##HandleScope(Thread* thread) : thread_(thread) { \
ASSERT(!thread->reusable_##name##_handle_scope_active()); \
thread->set_reusable_##name##_handle_scope_active(true); \
} \
@@ -53,6 +52,7 @@ namespace dart {
ASSERT(thread_->name##_handle_ != NULL); \
return *thread_->name##_handle_; \
} \
+ \
private: \
Thread* thread_; \
DISALLOW_COPY_AND_ASSIGN(Reusable##name##HandleScope); \
@@ -62,18 +62,15 @@ namespace dart {
class Reusable##name##HandleScope : public ValueObject { \
public: \
explicit Reusable##name##HandleScope(Thread* thread) \
- : handle_(thread->name##_handle_) { \
- } \
+ : handle_(thread->name##_handle_) {} \
Reusable##name##HandleScope() \
- : handle_(Thread::Current()->name##_handle_) { \
- } \
- ~Reusable##name##HandleScope() { \
- handle_->raw_ = name::null(); \
- } \
+ : handle_(Thread::Current()->name##_handle_) {} \
+ ~Reusable##name##HandleScope() { handle_->raw_ = name::null(); } \
name& Handle() const { \
ASSERT(handle_ != NULL); \
return *handle_; \
} \
+ \
private: \
name* handle_; \
DISALLOW_COPY_AND_ASSIGN(Reusable##name##HandleScope); \
@@ -93,15 +90,14 @@ REUSABLE_HANDLE_LIST(REUSABLE_SCOPE)
#define REUSABLE_ERROR_HANDLESCOPE(thread) \
ReusableErrorHandleScope reused_error_handle(thread);
#define REUSABLE_EXCEPTION_HANDLERS_HANDLESCOPE(thread) \
- ReusableExceptionHandlersHandleScope \
- reused_exception_handlers_handle(thread);
+ ReusableExceptionHandlersHandleScope reused_exception_handlers_handle(thread);
#define REUSABLE_FIELD_HANDLESCOPE(thread) \
ReusableFieldHandleScope reused_field_handle(thread);
#define REUSABLE_FUNCTION_HANDLESCOPE(thread) \
ReusableFunctionHandleScope reused_function_handle(thread);
#define REUSABLE_GROWABLE_OBJECT_ARRAY_HANDLESCOPE(thread) \
- ReusableGrowableObjectArrayHandleScope \
- reused_growable_object_array_handle(thread)
+ ReusableGrowableObjectArrayHandleScope reused_growable_object_array_handle( \
+ thread)
#define REUSABLE_INSTANCE_HANDLESCOPE(thread) \
ReusableInstanceHandleScope reused_instance_handle(thread);
#define REUSABLE_LIBRARY_HANDLESCOPE(thread) \
« no previous file with comments | « runtime/vm/resolver_test.cc ('k') | runtime/vm/ring_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698