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

Unified Diff: src/handles-inl.h

Issue 259173003: Kiss goodbye to MaybeObject. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase + addressed comments Created 6 years, 8 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 | « src/gdb-jit.cc ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/handles-inl.h
diff --git a/src/handles-inl.h b/src/handles-inl.h
index 5e7d236688d153f7abbcfa5fbfb060d3c80d85cb..d9f8c69c1b1e02e578d95a9c630436ff26a3e091 100644
--- a/src/handles-inl.h
+++ b/src/handles-inl.h
@@ -16,21 +16,18 @@ namespace internal {
template<typename T>
Handle<T>::Handle(T* obj) {
- ASSERT(!obj->IsFailure());
location_ = HandleScope::CreateHandle(obj->GetIsolate(), obj);
}
template<typename T>
Handle<T>::Handle(T* obj, Isolate* isolate) {
- ASSERT(!obj->IsFailure());
location_ = HandleScope::CreateHandle(isolate, obj);
}
template <typename T>
inline bool Handle<T>::is_identical_to(const Handle<T> o) const {
- ASSERT(location_ == NULL || !(*location_)->IsFailure());
// Dereferencing deferred handles to check object equality is safe.
SLOW_ASSERT(
(location_ == NULL || IsDereferenceAllowed(NO_DEFERRED_CHECK)) &&
@@ -43,14 +40,12 @@ inline bool Handle<T>::is_identical_to(const Handle<T> o) const {
template <typename T>
inline T* Handle<T>::operator*() const {
- ASSERT(location_ != NULL && !(*location_)->IsFailure());
SLOW_ASSERT(IsDereferenceAllowed(INCLUDE_DEFERRED_CHECK));
return *BitCast<T**>(location_);
}
template <typename T>
inline T** Handle<T>::location() const {
- ASSERT(location_ == NULL || !(*location_)->IsFailure());
SLOW_ASSERT(location_ == NULL ||
IsDereferenceAllowed(INCLUDE_DEFERRED_CHECK));
return location_;
« no previous file with comments | « src/gdb-jit.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698