Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 17 | #ifndef ART_RUNTIME_SCOPED_THREAD_STATE_CHANGE_H_ |
| 18 | #define ART_RUNTIME_SCOPED_THREAD_STATE_CHANGE_H_ |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 19 | |
Elliott Hughes | 1aa246d | 2012-12-13 09:29:36 -0800 | [diff] [blame] | 20 | #include "base/casts.h" |
Ian Rogers | 693ff61 | 2013-02-01 10:56:12 -0800 | [diff] [blame] | 21 | #include "thread-inl.h" |
Mathieu Chartier | 4e30541 | 2014-02-19 10:54:44 -0800 | [diff] [blame] | 22 | #include "verify_object.h" |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 23 | |
| 24 | namespace art { |
| 25 | |
| 26 | // Scoped change into and out of a particular state. Handles Runnable transitions that require |
| 27 | // more complicated suspension checking. The subclasses ScopedObjectAccessUnchecked and |
Mathieu Chartier | eb8167a | 2014-05-07 15:43:14 -0700 | [diff] [blame] | 28 | // ScopedObjectAccess are used to handle the change into Runnable to Get direct access to objects, |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 29 | // the unchecked variant doesn't aid annotalysis. |
| 30 | class ScopedThreadStateChange { |
| 31 | public: |
| 32 | ScopedThreadStateChange(Thread* self, ThreadState new_thread_state) |
Ian Rogers | 1ffa32f | 2013-02-05 18:29:08 -0800 | [diff] [blame] | 33 | LOCKS_EXCLUDED(Locks::thread_suspend_count_lock_) ALWAYS_INLINE |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 34 | : self_(self), thread_state_(new_thread_state), expected_has_no_thread_(false) { |
Ian Rogers | c0fa3ad | 2013-02-05 00:11:55 -0800 | [diff] [blame] | 35 | if (UNLIKELY(self_ == NULL)) { |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 36 | // Value chosen arbitrarily and won't be used in the destructor since thread_ == NULL. |
| 37 | old_thread_state_ = kTerminated; |
Ian Rogers | 120f1c7 | 2012-09-28 17:17:10 -0700 | [diff] [blame] | 38 | Runtime* runtime = Runtime::Current(); |
Mathieu Chartier | 590fee9 | 2013-09-13 13:46:47 -0700 | [diff] [blame] | 39 | CHECK(runtime == NULL || !runtime->IsStarted() || runtime->IsShuttingDown(self_)); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 40 | } else { |
Ian Rogers | 22f454c | 2012-09-08 11:06:29 -0700 | [diff] [blame] | 41 | DCHECK_EQ(self, Thread::Current()); |
| 42 | // Read state without locks, ok as state is effectively thread local and we're not interested |
| 43 | // in the suspend count (this will be handled in the runnable transitions). |
Ian Rogers | 474b6da | 2012-09-25 00:20:38 -0700 | [diff] [blame] | 44 | old_thread_state_ = self->GetState(); |
Mathieu Chartier | 92b7889 | 2014-04-24 16:14:43 -0700 | [diff] [blame] | 45 | if (old_thread_state_ != new_thread_state) { |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 46 | if (new_thread_state == kRunnable) { |
| 47 | self_->TransitionFromSuspendedToRunnable(); |
Mathieu Chartier | 92b7889 | 2014-04-24 16:14:43 -0700 | [diff] [blame] | 48 | } else if (old_thread_state_ == kRunnable) { |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 49 | self_->TransitionFromRunnableToSuspended(new_thread_state); |
Mathieu Chartier | 92b7889 | 2014-04-24 16:14:43 -0700 | [diff] [blame] | 50 | } else { |
| 51 | // A suspended transition to another effectively suspended transition, ok to use Unsafe. |
| 52 | self_->SetState(new_thread_state); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 53 | } |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
Ian Rogers | 1ffa32f | 2013-02-05 18:29:08 -0800 | [diff] [blame] | 58 | ~ScopedThreadStateChange() LOCKS_EXCLUDED(Locks::thread_suspend_count_lock_) ALWAYS_INLINE { |
Ian Rogers | c0fa3ad | 2013-02-05 00:11:55 -0800 | [diff] [blame] | 59 | if (UNLIKELY(self_ == NULL)) { |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 60 | if (!expected_has_no_thread_) { |
Ian Rogers | 120f1c7 | 2012-09-28 17:17:10 -0700 | [diff] [blame] | 61 | Runtime* runtime = Runtime::Current(); |
Mathieu Chartier | 590fee9 | 2013-09-13 13:46:47 -0700 | [diff] [blame] | 62 | bool shutting_down = (runtime == NULL) || runtime->IsShuttingDown(nullptr); |
Ian Rogers | 120f1c7 | 2012-09-28 17:17:10 -0700 | [diff] [blame] | 63 | CHECK(shutting_down); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 64 | } |
| 65 | } else { |
| 66 | if (old_thread_state_ != thread_state_) { |
| 67 | if (old_thread_state_ == kRunnable) { |
| 68 | self_->TransitionFromSuspendedToRunnable(); |
| 69 | } else if (thread_state_ == kRunnable) { |
| 70 | self_->TransitionFromRunnableToSuspended(old_thread_state_); |
| 71 | } else { |
Ian Rogers | 22f454c | 2012-09-08 11:06:29 -0700 | [diff] [blame] | 72 | // A suspended transition to another effectively suspended transition, ok to use Unsafe. |
Ian Rogers | 474b6da | 2012-09-25 00:20:38 -0700 | [diff] [blame] | 73 | self_->SetState(old_thread_state_); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 74 | } |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | Thread* Self() const { |
| 80 | return self_; |
| 81 | } |
| 82 | |
| 83 | protected: |
| 84 | // Constructor used by ScopedJniThreadState for an unattached thread that has access to the VM*. |
| 85 | ScopedThreadStateChange() |
| 86 | : self_(NULL), thread_state_(kTerminated), old_thread_state_(kTerminated), |
| 87 | expected_has_no_thread_(true) {} |
| 88 | |
| 89 | Thread* const self_; |
| 90 | const ThreadState thread_state_; |
| 91 | |
| 92 | private: |
| 93 | ThreadState old_thread_state_; |
| 94 | const bool expected_has_no_thread_; |
| 95 | |
| 96 | DISALLOW_COPY_AND_ASSIGN(ScopedThreadStateChange); |
| 97 | }; |
| 98 | |
| 99 | // Entry/exit processing for transitions from Native to Runnable (ie within JNI functions). |
| 100 | // |
| 101 | // This class performs the necessary thread state switching to and from Runnable and lets us |
| 102 | // amortize the cost of working out the current thread. Additionally it lets us check (and repair) |
| 103 | // apps that are using a JNIEnv on the wrong thread. The class also decodes and encodes Objects |
| 104 | // into jobjects via methods of this class. Performing this here enforces the Runnable thread state |
| 105 | // for use of Object, thereby inhibiting the Object being modified by GC whilst native or VM code |
| 106 | // is also manipulating the Object. |
| 107 | // |
| 108 | // The destructor transitions back to the previous thread state, typically Native. In this state |
| 109 | // GC and thread suspension may occur. |
| 110 | // |
| 111 | // For annotalysis the subclass ScopedObjectAccess (below) makes it explicit that a shared of |
| 112 | // the mutator_lock_ will be acquired on construction. |
| 113 | class ScopedObjectAccessUnchecked : public ScopedThreadStateChange { |
| 114 | public: |
| 115 | explicit ScopedObjectAccessUnchecked(JNIEnv* env) |
Ian Rogers | 1ffa32f | 2013-02-05 18:29:08 -0800 | [diff] [blame] | 116 | LOCKS_EXCLUDED(Locks::thread_suspend_count_lock_) ALWAYS_INLINE |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 117 | : ScopedThreadStateChange(ThreadForEnv(env), kRunnable), |
Ian Rogers | 1eb512d | 2013-10-18 15:42:20 -0700 | [diff] [blame] | 118 | env_(down_cast<JNIEnvExt*>(env)), vm_(env_->vm) { |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 119 | self_->VerifyStack(); |
Ian Rogers | 9837939 | 2014-02-24 16:53:16 -0800 | [diff] [blame] | 120 | Locks::mutator_lock_->AssertSharedHeld(self_); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 121 | } |
| 122 | |
| 123 | explicit ScopedObjectAccessUnchecked(Thread* self) |
Ian Rogers | b726dcb | 2012-09-05 08:57:23 -0700 | [diff] [blame] | 124 | LOCKS_EXCLUDED(Locks::thread_suspend_count_lock_) |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 125 | : ScopedThreadStateChange(self, kRunnable), |
Ian Rogers | 1eb512d | 2013-10-18 15:42:20 -0700 | [diff] [blame] | 126 | env_(down_cast<JNIEnvExt*>(self->GetJniEnv())), |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 127 | vm_(env_ != NULL ? env_->vm : NULL) { |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 128 | self_->VerifyStack(); |
Ian Rogers | 9837939 | 2014-02-24 16:53:16 -0800 | [diff] [blame] | 129 | Locks::mutator_lock_->AssertSharedHeld(self_); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | // Used when we want a scoped JNI thread state but have no thread/JNIEnv. Consequently doesn't |
| 133 | // change into Runnable or acquire a share on the mutator_lock_. |
| 134 | explicit ScopedObjectAccessUnchecked(JavaVM* vm) |
Ian Rogers | 1eb512d | 2013-10-18 15:42:20 -0700 | [diff] [blame] | 135 | : ScopedThreadStateChange(), env_(NULL), vm_(down_cast<JavaVMExt*>(vm)) {} |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 136 | |
Ian Rogers | 1ffa32f | 2013-02-05 18:29:08 -0800 | [diff] [blame] | 137 | // Here purely to force inlining. |
| 138 | ~ScopedObjectAccessUnchecked() ALWAYS_INLINE { |
Ian Rogers | 9837939 | 2014-02-24 16:53:16 -0800 | [diff] [blame] | 139 | Locks::mutator_lock_->AssertSharedHeld(self_); |
Ian Rogers | c0fa3ad | 2013-02-05 00:11:55 -0800 | [diff] [blame] | 140 | } |
| 141 | |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 142 | JNIEnvExt* Env() const { |
| 143 | return env_; |
| 144 | } |
| 145 | |
| 146 | JavaVMExt* Vm() const { |
| 147 | return vm_; |
| 148 | } |
| 149 | |
| 150 | /* |
| 151 | * Add a local reference for an object to the indirect reference table associated with the |
| 152 | * current stack frame. When the native function returns, the reference will be discarded. |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 153 | * |
Elliott Hughes | 9dcd45c | 2013-07-29 14:40:52 -0700 | [diff] [blame] | 154 | * We need to allow the same reference to be added multiple times, and cope with NULL. |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 155 | * |
Elliott Hughes | 9dcd45c | 2013-07-29 14:40:52 -0700 | [diff] [blame] | 156 | * This will be called on otherwise unreferenced objects. We cannot do GC allocations here, and |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 157 | * it's best if we don't grab a mutex. |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 158 | */ |
| 159 | template<typename T> |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 160 | T AddLocalReference(mirror::Object* obj) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
Ian Rogers | 1eb512d | 2013-10-18 15:42:20 -0700 | [diff] [blame] | 161 | Locks::mutator_lock_->AssertSharedHeld(Self()); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 162 | DCHECK_EQ(thread_state_, kRunnable); // Don't work with raw objects in non-runnable states. |
| 163 | if (obj == NULL) { |
| 164 | return NULL; |
| 165 | } |
| 166 | |
| 167 | DCHECK_NE((reinterpret_cast<uintptr_t>(obj) & 0xffff0000), 0xebad0000); |
| 168 | |
Ian Rogers | 987560f | 2014-04-22 11:42:59 -0700 | [diff] [blame] | 169 | return Env()->AddLocalReference<T>(obj); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 170 | } |
| 171 | |
| 172 | template<typename T> |
| 173 | T Decode(jobject obj) const |
Ian Rogers | b726dcb | 2012-09-05 08:57:23 -0700 | [diff] [blame] | 174 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
Ian Rogers | 81d425b | 2012-09-27 16:03:43 -0700 | [diff] [blame] | 175 | Locks::mutator_lock_->AssertSharedHeld(Self()); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 176 | DCHECK_EQ(thread_state_, kRunnable); // Don't work with raw objects in non-runnable states. |
| 177 | return down_cast<T>(Self()->DecodeJObject(obj)); |
| 178 | } |
| 179 | |
Brian Carlstrom | ea46f95 | 2013-07-30 01:26:50 -0700 | [diff] [blame] | 180 | mirror::ArtField* DecodeField(jfieldID fid) const |
Ian Rogers | b726dcb | 2012-09-05 08:57:23 -0700 | [diff] [blame] | 181 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
Ian Rogers | 81d425b | 2012-09-27 16:03:43 -0700 | [diff] [blame] | 182 | Locks::mutator_lock_->AssertSharedHeld(Self()); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 183 | DCHECK_EQ(thread_state_, kRunnable); // Don't work with raw objects in non-runnable states. |
Mathieu Chartier | 590fee9 | 2013-09-13 13:46:47 -0700 | [diff] [blame] | 184 | CHECK(!kMovingFields); |
Brian Carlstrom | ea46f95 | 2013-07-30 01:26:50 -0700 | [diff] [blame] | 185 | return reinterpret_cast<mirror::ArtField*>(fid); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 186 | } |
| 187 | |
Brian Carlstrom | ea46f95 | 2013-07-30 01:26:50 -0700 | [diff] [blame] | 188 | jfieldID EncodeField(mirror::ArtField* field) const |
Ian Rogers | b726dcb | 2012-09-05 08:57:23 -0700 | [diff] [blame] | 189 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
Ian Rogers | 81d425b | 2012-09-27 16:03:43 -0700 | [diff] [blame] | 190 | Locks::mutator_lock_->AssertSharedHeld(Self()); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 191 | DCHECK_EQ(thread_state_, kRunnable); // Don't work with raw objects in non-runnable states. |
Mathieu Chartier | 590fee9 | 2013-09-13 13:46:47 -0700 | [diff] [blame] | 192 | CHECK(!kMovingFields); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 193 | return reinterpret_cast<jfieldID>(field); |
| 194 | } |
| 195 | |
Brian Carlstrom | ea46f95 | 2013-07-30 01:26:50 -0700 | [diff] [blame] | 196 | mirror::ArtMethod* DecodeMethod(jmethodID mid) const |
Ian Rogers | b726dcb | 2012-09-05 08:57:23 -0700 | [diff] [blame] | 197 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
Ian Rogers | 81d425b | 2012-09-27 16:03:43 -0700 | [diff] [blame] | 198 | Locks::mutator_lock_->AssertSharedHeld(Self()); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 199 | DCHECK_EQ(thread_state_, kRunnable); // Don't work with raw objects in non-runnable states. |
Mathieu Chartier | 590fee9 | 2013-09-13 13:46:47 -0700 | [diff] [blame] | 200 | CHECK(!kMovingMethods); |
Brian Carlstrom | ea46f95 | 2013-07-30 01:26:50 -0700 | [diff] [blame] | 201 | return reinterpret_cast<mirror::ArtMethod*>(mid); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 202 | } |
| 203 | |
Brian Carlstrom | ea46f95 | 2013-07-30 01:26:50 -0700 | [diff] [blame] | 204 | jmethodID EncodeMethod(mirror::ArtMethod* method) const |
Ian Rogers | b726dcb | 2012-09-05 08:57:23 -0700 | [diff] [blame] | 205 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
Ian Rogers | 81d425b | 2012-09-27 16:03:43 -0700 | [diff] [blame] | 206 | Locks::mutator_lock_->AssertSharedHeld(Self()); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 207 | DCHECK_EQ(thread_state_, kRunnable); // Don't work with raw objects in non-runnable states. |
Mathieu Chartier | 590fee9 | 2013-09-13 13:46:47 -0700 | [diff] [blame] | 208 | CHECK(!kMovingMethods); |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 209 | return reinterpret_cast<jmethodID>(method); |
| 210 | } |
| 211 | |
| 212 | private: |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 213 | // The full JNIEnv. |
| 214 | JNIEnvExt* const env_; |
| 215 | // The full JavaVM. |
| 216 | JavaVMExt* const vm_; |
| 217 | |
| 218 | DISALLOW_COPY_AND_ASSIGN(ScopedObjectAccessUnchecked); |
| 219 | }; |
| 220 | |
| 221 | // Annotalysis helping variant of the above. |
| 222 | class ScopedObjectAccess : public ScopedObjectAccessUnchecked { |
| 223 | public: |
| 224 | explicit ScopedObjectAccess(JNIEnv* env) |
Ian Rogers | b726dcb | 2012-09-05 08:57:23 -0700 | [diff] [blame] | 225 | LOCKS_EXCLUDED(Locks::thread_suspend_count_lock_) |
Ian Rogers | 1ffa32f | 2013-02-05 18:29:08 -0800 | [diff] [blame] | 226 | SHARED_LOCK_FUNCTION(Locks::mutator_lock_) ALWAYS_INLINE |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 227 | : ScopedObjectAccessUnchecked(env) { |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 228 | } |
| 229 | |
| 230 | explicit ScopedObjectAccess(Thread* self) |
Ian Rogers | b726dcb | 2012-09-05 08:57:23 -0700 | [diff] [blame] | 231 | LOCKS_EXCLUDED(Locks::thread_suspend_count_lock_) |
| 232 | SHARED_LOCK_FUNCTION(Locks::mutator_lock_) |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 233 | : ScopedObjectAccessUnchecked(self) { |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 234 | } |
| 235 | |
Ian Rogers | 1ffa32f | 2013-02-05 18:29:08 -0800 | [diff] [blame] | 236 | ~ScopedObjectAccess() UNLOCK_FUNCTION(Locks::mutator_lock_) ALWAYS_INLINE { |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 237 | // Base class will release share of lock. Invoked after this destructor. |
| 238 | } |
| 239 | |
| 240 | private: |
| 241 | // TODO: remove this constructor. It is used by check JNI's ScopedCheck to make it believe that |
| 242 | // routines operating with just a VM are sound, they are not, but when you have just a VM |
| 243 | // you cannot call the unsound routines. |
| 244 | explicit ScopedObjectAccess(JavaVM* vm) |
Ian Rogers | b726dcb | 2012-09-05 08:57:23 -0700 | [diff] [blame] | 245 | SHARED_LOCK_FUNCTION(Locks::mutator_lock_) |
Ian Rogers | 00f7d0e | 2012-07-19 15:28:27 -0700 | [diff] [blame] | 246 | : ScopedObjectAccessUnchecked(vm) {} |
| 247 | |
| 248 | friend class ScopedCheck; |
| 249 | DISALLOW_COPY_AND_ASSIGN(ScopedObjectAccess); |
| 250 | }; |
| 251 | |
| 252 | } // namespace art |
| 253 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 254 | #endif // ART_RUNTIME_SCOPED_THREAD_STATE_CHANGE_H_ |