From 668254e2b2a7b4f1d6da703275b89f3753096f71 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 8 Jun 2019 17:11:49 -0400 Subject: 903389 - Fix uses of ClassMethodIsNative. --- js/src/wasm/AsmJS.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/src/wasm/AsmJS.cpp') diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp index 6483d6ec3..f906d4bf1 100644 --- a/js/src/wasm/AsmJS.cpp +++ b/js/src/wasm/AsmJS.cpp @@ -7478,10 +7478,10 @@ HasPureCoercion(JSContext* cx, HandleValue v) // coercions are not observable and coercion via ToNumber/ToInt32 // definitely produces NaN/0. We should remove this special case later once // most apps have been built with newer Emscripten. - jsid toString = NameToId(cx->names().toString); if (v.toObject().is() && - HasObjectValueOf(&v.toObject(), cx) && - ClassMethodIsNative(cx, &v.toObject().as(), &JSFunction::class_, toString, fun_toString)) + HasNoToPrimitiveMethodPure(&v.toObject(), cx) && + HasNativeMethodPure(&v.toObject(), cx->names().valueOf, obj_valueOf, cx) && + HasNativeMethodPure(&v.toObject(), cx->names().toString, fun_toString, cx)) { return true; } -- cgit v1.2.3