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

Unified Diff: src/objects.cc

Issue 1500553002: [runtime] [proxy] Remove JSProxy::CallTrap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: removing CallTrap 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/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 27f93fdc26da944170122676a1929ef4ae6a1ea5..e7256e35a790089ddf2ebdaf8f8a7c78d16d47b0 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4822,36 +4822,11 @@ Maybe<PropertyAttributes> JSProxy::GetPropertyAttributes(LookupIterator* it) {
MaybeHandle<Object> JSProxy::GetTrap(Handle<JSProxy> proxy,
- Handle<String> trap) {
+ Handle<String> trap_name) {
DCHECK(!proxy->IsRevoked());
Isolate* isolate = proxy->GetIsolate();
Handle<JSReceiver> handler(JSReceiver::cast(proxy->handler()), isolate);
- return Object::GetMethod(handler, trap);
-}
-
-
-MaybeHandle<Object> JSProxy::CallTrap(Handle<JSProxy> proxy,
- const char* name,
- Handle<Object> derived,
- int argc,
- Handle<Object> argv[]) {
- Isolate* isolate = proxy->GetIsolate();
- Handle<Object> handler(proxy->handler(), isolate);
- Handle<String> trap_name = isolate->factory()->InternalizeUtf8String(name);
- Handle<Object> trap;
- ASSIGN_RETURN_ON_EXCEPTION(isolate, trap, GetTrap(proxy, trap_name), Object);
-
- if (trap->IsUndefined()) {
- if (derived.is_null()) {
- THROW_NEW_ERROR(isolate,
- NewTypeError(MessageTemplate::kProxyHandlerTrapMissing,
- handler, trap_name),
- Object);
- }
- trap = Handle<Object>(derived);
- }
-
- return Execution::Call(isolate, trap, handler, argc, argv);
+ return Object::GetMethod(handler, trap_name);
}
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698