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

@ -5593,9 +5593,6 @@ TryAttachCallStub(JSContext* cx, ICCall_Fallback* stub, HandleScript script, jsb
RootedObject obj(cx, &callee.toObject());
if (!obj->is<JSFunction>()) {
// Try to attach a stub for a call/construct hook on the object.
// Ignore proxies, which are special cased by callHook/constructHook.
if (obj->is<ProxyObject>())
return true;
if (JSNative hook = constructing ? obj->constructHook() : obj->callHook()) {
if (op != JSOP_FUNAPPLY && !isSpread && !createSingleton) {
RootedObject templateObject(cx);