From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- js/src/jit-test/lib/prologue.js | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'js/src/jit-test/lib/prologue.js') diff --git a/js/src/jit-test/lib/prologue.js b/js/src/jit-test/lib/prologue.js index 4e24b19836..a5c21a5a08 100644 --- a/js/src/jit-test/lib/prologue.js +++ b/js/src/jit-test/lib/prologue.js @@ -7,17 +7,32 @@ var appendToActual = function(s) { actual += s + ','; } -// Add dummy versions of missing functions and record whether they -// were originally present. +// Add dummy versions of missing functions and record whether they were +// originally present. +// +// This only affects the main global. Any globals created by the test will +// lack the function. let hasFunction = {}; -for (const name of ["gczeal", - "schedulegc", - "gcslice", - "selectforgc", - "verifyprebarriers", - "verifypostbarriers", - "gcPreserveCode", - "setMarkStackLimit"]) { +for (const name of [ + // Functions present if JS_GC_ZEAL defined: + "gczeal", + "unsetgczeal", + "schedulegc", + "selectforgc", + "verifyprebarriers", + "verifypostbarriers", + "currentgc", + "deterministicgc", + "dumpGCArenaInfo", + "setMarkStackLimit", + // Functions present if DEBUG or JS_OOM_BREAKPOINT defined: + "oomThreadTypes", + "oomAfterAllocations", + "oomAtAllocation", + "resetOOMFailure", + "oomTest", + "stackTest", + "interruptTest"]) { const present = name in this; if (!present) { this[name] = function() {}; -- cgit v1.2.3