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

Unified Diff: src/objects-inl.h

Issue 204693002: Handlify callers to GetElementNoException. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 9 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/objects.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 618cf30f760affb5a163268e60f2410e54d275bd..34cc97fd6baacca86d73452ece24baee6caa89f9 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1062,11 +1062,20 @@ Handle<Object> Object::GetElement(Isolate* isolate,
}
-Object* Object::GetElementNoExceptionThrown(Isolate* isolate, uint32_t index) {
- MaybeObject* maybe = GetElementWithReceiver(isolate, this, index);
- ASSERT(!maybe->IsFailure());
- Object* result = NULL; // Initialization to please compiler.
- maybe->ToObject(&result);
+static Handle<Object> GetElementNoExceptionThrownHelper(Isolate* isolate,
+ Handle<Object> object,
+ uint32_t index) {
+ CALL_HEAP_FUNCTION(isolate,
+ object->GetElementWithReceiver(isolate, *object, index),
+ Object);
+}
+
+Handle<Object> Object::GetElementNoExceptionThrown(Isolate* isolate,
+ Handle<Object> object,
+ uint32_t index) {
+ Handle<Object> result =
+ GetElementNoExceptionThrownHelper(isolate, object, index);
+ CHECK_NOT_EMPTY_HANDLE(isolate, result);
return result;
}
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698