Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 114e8d940dff3f1aa8f75b6a2c12d6cbf57a11e8..c7cf6369bc173d0af0098e42548a9b6593667769 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -359,10 +359,10 @@ Maybe<bool> Object::Equals(Handle<Object> x, Handle<Object> y) { |
return Just(false); |
} |
} else if (x->IsJSReceiver()) { |
- if (y->IsUndetectable()) { |
- return Just(x->IsUndetectable()); |
- } else if (y->IsJSReceiver()) { |
+ if (y->IsJSReceiver()) { |
return Just(x.is_identical_to(y)); |
+ } else if (y->IsUndetectable()) { |
+ return Just(x->IsUndetectable()); |
} else if (y->IsBoolean()) { |
y = Oddball::ToNumber(Handle<Oddball>::cast(y)); |
} else if (!JSReceiver::ToPrimitive(Handle<JSReceiver>::cast(x)) |