Issue #2241 - Part 1: Move {js::,JS_}{{Strictly,Loosely}Equal,SameValue} into their own header and implementation files

Backported from Mozilla bug 1516742.

The .from* methods are going to depend on SameValueZero, which needs to be
visible to /dom. This patch provides the foundation for that.
This commit is contained in:
Job Bautista 2023-05-10 19:10:41 +08:00 • committed by roytam1
commit ec2fb72568
17 changed files with 338 additions and 223 deletions

View file

@ -71,6 +71,7 @@
#include "jit/JitcodeMap.h"
#include "jit/OptimizationTracking.h"
#include "js/Debug.h"
#include "js/Equality.h" // JS::SameValue
#include "js/GCAPI.h"
#include "js/Initialization.h"
#include "js/StructuredClone.h"
@ -2286,7 +2287,7 @@ AssertEq(JSContext* cx, unsigned argc, Value* vp)
}
bool same;
if (!JS_SameValue(cx, args[0], args[1], &same))
if (!JS::SameValue(cx, args[0], args[1], &same))
return false;
if (!same) {
JSAutoByteString bytes0, bytes1;