OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 | 53 |
54 template <typename T> | 54 template <typename T> |
55 inline bool Handle<T>::is_identical_to(const Handle<T> other) const { | 55 inline bool Handle<T>::is_identical_to(const Handle<T> other) const { |
56 ASSERT(location_ == NULL || | 56 ASSERT(location_ == NULL || |
57 reinterpret_cast<Address>(*location_) != kZapValue); | 57 reinterpret_cast<Address>(*location_) != kZapValue); |
58 #ifdef DEBUG | 58 #ifdef DEBUG |
59 if (FLAG_enable_slow_asserts) { | 59 if (FLAG_enable_slow_asserts) { |
60 Isolate* isolate = Isolate::Current(); | 60 Isolate* isolate = Isolate::Current(); |
61 CHECK(isolate->AllowHandleDereference() || | 61 CHECK(isolate->AllowHandleDereference() || |
62 Heap::RelocationLock::IsLocked(isolate->heap()) || | |
63 !isolate->optimizing_compiler_thread()->IsOptimizerThread()); | 62 !isolate->optimizing_compiler_thread()->IsOptimizerThread()); |
64 } | 63 } |
65 #endif // DEBUG | 64 #endif // DEBUG |
66 return *location_ == *other.location_; | 65 return *location_ == *other.location_; |
67 } | 66 } |
68 | 67 |
69 | 68 |
70 template <typename T> | 69 template <typename T> |
71 inline T* Handle<T>::operator*() const { | 70 inline T* Handle<T>::operator*() const { |
72 ASSERT(location_ != NULL); | 71 ASSERT(location_ != NULL); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 188 |
190 HandleDereferenceGuard::~HandleDereferenceGuard() { | 189 HandleDereferenceGuard::~HandleDereferenceGuard() { |
191 isolate_->SetAllowHandleDereference(old_state_); | 190 isolate_->SetAllowHandleDereference(old_state_); |
192 } | 191 } |
193 | 192 |
194 #endif | 193 #endif |
195 | 194 |
196 } } // namespace v8::internal | 195 } } // namespace v8::internal |
197 | 196 |
198 #endif // V8_HANDLES_INL_H_ | 197 #endif // V8_HANDLES_INL_H_ |
OLD | NEW |