| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 | 79 |
| 80 static Handle<T> null() { return Handle<T>(); } | 80 static Handle<T> null() { return Handle<T>(); } |
| 81 bool is_null() const { return location_ == NULL; } | 81 bool is_null() const { return location_ == NULL; } |
| 82 | 82 |
| 83 // Closes the given scope, but lets this handle escape. See | 83 // Closes the given scope, but lets this handle escape. See |
| 84 // implementation in api.h. | 84 // implementation in api.h. |
| 85 inline Handle<T> EscapeFrom(v8::HandleScope* scope); | 85 inline Handle<T> EscapeFrom(v8::HandleScope* scope); |
| 86 | 86 |
| 87 #ifdef DEBUG | 87 #ifdef DEBUG |
| 88 bool IsDereferenceAllowed(bool explicitly_allow_deferred) const; | 88 enum DereferenceCheckMode { INCLUDE_DEFERRED_CHECK, NO_DEFERRED_CHECK }; |
| 89 |
| 90 bool IsDereferenceAllowed(DereferenceCheckMode mode) const; |
| 89 #endif // DEBUG | 91 #endif // DEBUG |
| 90 | 92 |
| 91 private: | 93 private: |
| 92 T** location_; | 94 T** location_; |
| 93 | 95 |
| 94 // Handles of different classes are allowed to access each other's location_. | 96 // Handles of different classes are allowed to access each other's location_. |
| 95 template<class S> friend class Handle; | 97 template<class S> friend class Handle; |
| 96 }; | 98 }; |
| 97 | 99 |
| 98 | 100 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 private: | 346 private: |
| 345 Isolate* isolate_; | 347 Isolate* isolate_; |
| 346 Object** limit_; | 348 Object** limit_; |
| 347 int level_; | 349 int level_; |
| 348 #endif | 350 #endif |
| 349 }; | 351 }; |
| 350 | 352 |
| 351 } } // namespace v8::internal | 353 } } // namespace v8::internal |
| 352 | 354 |
| 353 #endif // V8_HANDLES_H_ | 355 #endif // V8_HANDLES_H_ |
| OLD | NEW |