Remove undefined-check from GetElementWithReceiver
authorverwaest <verwaest@chromium.org>
Mon, 18 May 2015 13:15:09 +0000 (06:15 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 18 May 2015 13:14:53 +0000 (13:14 +0000)
BUG=

Review URL: https://codereview.chromium.org/1145693002

Cr-Commit-Position: refs/heads/master@{#28443}

src/objects.cc

index 5bd67af..645ea57 100644 (file)
@@ -660,11 +660,7 @@ MaybeHandle<Object> Object::GetElementWithReceiver(Isolate* isolate,
                                                    Handle<Object> object,
                                                    Handle<Object> receiver,
                                                    uint32_t index) {
-  if (object->IsUndefined()) {
-    // TODO(verwaest): Why is this check here?
-    UNREACHABLE();
-    return isolate->factory()->undefined_value();
-  }
+  DCHECK(!object->IsUndefined());
 
   // Iterate up the prototype chain until an element is found or the null
   // prototype is encountered.