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

Unified Diff: src/runtime/runtime-object.cc

Issue 1494283002: Revert of [proxies] Make Object.prototype.isPrototypeOf work with proxies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/runtime/runtime-debug.cc ('k') | test/mjsunit/harmony/proxies-get-prototype-of.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index 57191a8fc31d03cfdc88927d42521c06fe540182..ad69a1004bf27bb847b8ce5c6fe46427390d690d 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -1538,20 +1538,18 @@
NewTypeError(MessageTemplate::kInstanceofNonobjectProto, prototype));
}
// Return whether or not {prototype} is in the prototype chain of {object}.
- Maybe<bool> result = Object::HasInPrototypeChain(isolate, object, prototype);
- MAYBE_RETURN(result, isolate->heap()->exception());
- return isolate->heap()->ToBoolean(result.FromJust());
+ return isolate->heap()->ToBoolean(
+ object->HasInPrototypeChain(isolate, *prototype));
}
RUNTIME_FUNCTION(Runtime_HasInPrototypeChain) {
- HandleScope scope(isolate);
+ SealHandleScope scope(isolate);
DCHECK_EQ(2, args.length());
- CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
- CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
- Maybe<bool> result = Object::HasInPrototypeChain(isolate, object, prototype);
- MAYBE_RETURN(result, isolate->heap()->exception());
- return isolate->heap()->ToBoolean(result.FromJust());
+ CONVERT_ARG_CHECKED(Object, object, 0);
+ CONVERT_ARG_CHECKED(Object, prototype, 1);
+ return isolate->heap()->ToBoolean(
+ object->HasInPrototypeChain(isolate, prototype));
}
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | test/mjsunit/harmony/proxies-get-prototype-of.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698