Issue #1442 Follow-up: Stop pretending proxies have a JSNative call/construct hook. https://bugzilla.mozilla.org/show_bug.cgi?id=1471924 Part 1 Also remove an erroneous debug assert and guard against future issues. This fixes crashes on vk.com but still does not behave correctly.

This commit is contained in:
Brian Smith 2023-10-16 01:10:26 -05:00 committed by roytam1
commit 46024cd872
7 changed files with 30 additions and 65 deletions

View file

@ -665,24 +665,6 @@ js::proxy_HasInstance(JSContext* cx, HandleObject proxy, MutableHandleValue v, b
return Proxy::hasInstance(cx, proxy, v, bp);
}
bool
js::proxy_Call(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject proxy(cx, &args.callee());
MOZ_ASSERT(proxy->is<ProxyObject>());
return Proxy::call(cx, proxy, args);
}
bool
js::proxy_Construct(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject proxy(cx, &args.callee());
MOZ_ASSERT(proxy->is<ProxyObject>());
return Proxy::construct(cx, proxy, args);
}
bool
js::proxy_GetElements(JSContext* cx, HandleObject proxy, uint32_t begin, uint32_t end,
ElementAdder* adder)