Issue #1257 - Part1: Remove watch class-hook and proxy trap.

This commit is contained in:
wolfbeast 2019-10-26 13:08:45 +02:00 • committed by Roy Tam
commit 3b9fbdc71d
18 changed files with 5 additions and 145 deletions

View file

@ -2836,9 +2836,6 @@ js::UnwatchGuts(JSContext* cx, JS::HandleObject origObj, JS::HandleId id)
bool
js::WatchProperty(JSContext* cx, HandleObject obj, HandleId id, HandleObject callable)
{
if (WatchOp op = obj->getOpsWatch())
return op(cx, obj, id, callable);
if (!obj->isNative() || obj->is<TypedArrayObject>()) {
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CANT_WATCH,
obj->getClass()->name);
@ -2851,9 +2848,6 @@ js::WatchProperty(JSContext* cx, HandleObject obj, HandleId id, HandleObject cal
bool
js::UnwatchProperty(JSContext* cx, HandleObject obj, HandleId id)
{
if (UnwatchOp op = obj->getOpsUnwatch())
return op(cx, obj, id);
return UnwatchGuts(cx, obj, id);
}