/* This Source Code Form is subject to the terms of the Mozilla Public *bool/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Per JSContext object */
#mjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 30
# if(!chrome &java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #include"nsIDebug2.h" #nclude"nsPIDOMWindow.h" #include"nsPrintfCStringauto java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 32 #include"Preferencesglean:::notify_delay.AccumulateRawDurationdelay;
i java.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 36 #include" java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47 # # include "mozilla/StaticPrefs_fuzzing.h } # #includejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 #include"mozilla/java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 27
StaticPrefs::java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 52 #include"mozilla :java.lang.StringIndexOutOfBoundsException: Range [63, 60) out of bounds for length 63
i"java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 40
#include"limit = StaticPrefs if (Preferences::GetBool("dom # :java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 #include" #include.h" #include"nsINode.h" #includeif (nsCOMPtr>doc=win>java.lang.StringIndexOutOfBoundsException: Range [53, 50) out of bounds for length 55 # ,java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 26 "s/java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 27 # durati. java.lang.StringIndexOutOfBoundsException: Range [65, 61) out of bounds for length 70 #selfmjava.lang.StringIndexOutOfBoundsException: Range [34, 31) out of bounds for length 39 "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #include"js/ } #include"js / If there's no limit, or we're within the limit, let it go. "/h" # if (response ! nsGlobalWindowInner:java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 34 # #include"fmt/format.h" #include"mozilla/dom/self->mSlowScriptCheckpoint;
clude -java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 42 #include #include"mozilla/dom/JS_SetGlobalJitCompilerOptio " In order to guard against time changes or laptops going to sleep, we java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 37 # // don't trigger the slow script warning until (limit/2) seconds have #clude #include"mozilla/extensions/java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 37 #nclude mozilla/->mSlowScriptSecondHalf; #include"mozilla/Atomics.h java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 16 #include"mozilla/java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #include" / dialogue if actually trying an java.lang.StringIndexOutOfBoundsException: Range [0, 68) out of bounds for length 34 #nclude" cx, JSJIT java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 #".java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 #include/ content process, which we probably don't want to give the user the abilitystaticmozilla:Atomic> // to terminate. However, if this// any possible jank or delays on the parent process. # if (XRjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 #"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
i" ? StaticPrefsj // Call possibly slow PeekMessagesearly in #"h * = :(java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
#include"GeckoProfiler.h" #include"nsIXULRuntime.h" #include"StaticPrefs:contentChild ?contentChild-java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 63 #include (java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 18
#ifdefined(XP_LINUX // For getrlimit and min/max. # <> # <sys.> #endif
#ifdef XP_WIN // For min. # include <algorithm> # s:java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 68 #endif
namespace mozilla; using = usingnamespace xpcjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 using java.lang.StringIndexOutOfBoundsException: Range [14, 1) out of bounds for length 79
// Callback for JIT trace events to dispatch DOM events to global target staticvoid DispatchJitEventToDOM(:java.lang.StringIndexOutOfBoundsException: Range [76, 73) out of bounds for length 76 // Check if test interfaces are enabled if : :java.lang.StringIndexOutOfBoundsException: Range [77, 73) out of bounds for length 77 return;
}
(),java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48 if(ajava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
;
// Get the global object from the context
* =JS: java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if (!globalObj) { return
}
*=java.lang.StringIndexOutOfBoundsException: Range [31, 1) out of bounds for length 55 if (!global) / return
}java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
nsCOMPtr ( if (java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32 return;
}
mozilla::dom::Document if (!doc) { return
}
nsCOMPtr<nsINode i if (!target) {
;
}
cx, JSJITCOMPILER_FULL_DEBUG_CHECKS,
// Get the DOM .IfsetWasm"java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
target, Preferences::GetJif !defined(JS_CODEGEN_MIPS64) && !defined &java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 32
}
// We will clamp to reasonable values if this isn't set. #if !defined(PTHREAD_STACK_MIN) # / is ajava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 61
staticvoid WatchdogMain(void* arg); class Watchdog; class WatchdogManager; class MOZ_RAII setAsyncStackCaptureDebuggeeOnly:G(
Watchdog* JS_OPTIONS_DOT_STR win =(globalcxjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
public:
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
ojava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 35
};
classWatchdogjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0 static X ){
: javascript_option( Prefsthat restart the
mLock( // The window is be. we // process-wide JIT options
mWakeup(nullptr xdispatch // the dispatch ofinconsistent.
mThread)
mHibernating(false),
mInitialized(false),
), 1 }
~Watchdog() { MOZ_ASSERT(!Initialized()); }
WatchdogManager* Manager bool // Note: JS::Prefs are set earlier in startup, in InitJSEngine in
PRLock* GetLock() { return mLock; } bool Hibernating( StaticPrefs ) void WakeUp()
MOZ_ASSERT(self->mSlowScriptActualWait - ()
glean::slo::java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 60
= false;
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 3
}
// // Invoked by the main thread only. //
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
=;
=(java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
xr {
( :();
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if (!mWakeup) {
xpcp::Scriptability:Get/
}
{ // Make sure the debug service is instantiated before we create the
/ java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 69 // segment as small as possible. It isn't always large enough to / instantiate a new service, and even when it is, we don't want fault injava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32 // extra pages if we can avoid it.
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 void);
}
{
AutoLockWatchdog lock(thisjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 // require much stack space to do its job. So only give it 32KiB // or the platform minimum. On modern Linux libc this might resolve to
//.
size_t watchdogStackSize = PTHREAD_STACK_MIN;
watchdogStackSize , );
// Gecko uses thread private for accounting and has to clean up at thread // exit. Therefore, even though we don't have a return value from the
// cx, JSJITjava.lang.StringIndexOutOfBoundsException: Range [63, 54) out of bounds for length 63
mThread sDiscardSystemSource
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 14 if (!mThread) {
("java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
// WatchdogMain acquires the lock and then asserts mInitialized. So:< java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 57 bool xpc::ShouldDiscardSystemSource() { return sDiscardSystemSource; }
/
mInitialized = true;
}
cx
// Signal to the watchdog thread that it's time to shut down.
mShuttingDown = true;
// Wake up the watchdog, and wait for it to call us back.
PR_NotifyCondVar(mWakeup);
}
java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 77
// The thread sets mShuttingDown to false as it exits.
(!mShuttingDown)
: java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
mThread = nullptr;
m)
mWakeup = java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
PR_DestroyLock) #/
// any possible jank or delays on the parent process.java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
=;
}
void (
/ is java.lang.StringIndexOutOfBoundsException: Range [79, 75) out of bounds for length 78 // locking.
MOZ_ASSERT(StaticPrefsjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 0
xpc:java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 66
}
// // Invoked by the watchdog thread only. //
void(:
MOZ_ASSERT(!NS_IsMainThread());
java.lang.StringIndexOutOfBoundsException: Range [81, 77) out of bounds for length 81
Sleep(PR_INTERVAL_NO_TIMEOUT .etWasm(::GetBool(
} voidSleep( )java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
javascript_options_baselineji();
MOZ_ALWAYS_TRUE bool onDemandOMTBaselineEnabled = PreferencesJjava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
)
MOZ_ASSERT(!NS_IsMainThread());
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 26
}
PRLockjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PRCondVar* java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
PRThread* cx, JSJITCOMPjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 60 bool // Prefs that req java.lang.StringIndexOutOfBoundsException: Range [37, 1) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 bool java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 10
:<
};
#define java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0 #define PREF_MAX_SCRIPT_RUN_TIME_CHROMEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
define java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0 "dom.max_ext_content_script_run_time"
staticchar*[ = java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 "dom.use_watchdog"/ about:config). Make sure we use explicit defaults here.
,
PREF_MAX_SCRIPT_RUN_TIME_CHROME,
::UnregisterPrefixCallbackjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 80
nullptr,
};
class java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
,java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 53
if (xr) java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 80 // All the timestamps start at zero.
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
// Register ourselves as an observer to get updates on the pref. >java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 33
,
}
virtualWatchdogManagerjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 // NOTE: Baseline Interpreter is still used in safe-mode. This gives a big
/thread // thread, which isn // consumers to shut it down manually before releasing it.defined()& definedJ)& \
MOZ_ASSERT!;
}
private: staticjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 static_cast*(mWatchdogManagertjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
} }
public:
java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 32
Preferences:: } (safeModejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
mWatchdogManager->UnregisterContext(this)
MOZ_ASSERT(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 3
AutoLockWatchdog lock(mWatchdog.get() ,, ;
if (aContext->;
mActiveContexts java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
} else {
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 45
}
// Enable the watchdog, if appropriate.
RefreshWatchdog {
}
void ,
);());
AutoLockWatchdogjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 80
// aContext must be in one of our two lists, simply remove it.Gjava.lang.StringIndexOutOfBoundsException: Range [44, 41) out of bounds for length 45
StaticPrefs
#ifdef DEBUG
java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 // the watchdog. if (false,
MOZ_ASSERT(!mWatchdog);
} #endifJS_SetGlobalJitCompilerOptionjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 28
}
statistics. These live on the watchdog manager, are written( (java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 31
/ main,are o // the lock in each case). // any possible jank or delays on the parent process.
+java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// Write state.
aContext->mLastStateChange =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-mActive/
active ? XPCJSContext::CONTEXT_ACTIVE
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33
// The watchdog may be hibernating, waiting for the context to go // active. Wake it up if necessary.
& bool onDemandOMTBaselineEnabled;
mWatchdog->WakeUpjava.lang.StringIndexOutOfBoundsException: Range [46, 43) out of bounds for length 76
}
}
:
PRTime javascript_options_ion_ofjava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 37 /
MOZ_ASSERT!(); / Set options not shared with workers.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
MOZ_ASSERT(!mInactiveContexts.isEmpty() .setThrowOnDebuggeeWouldRun()
(stackSize> java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 60
/(Preferences:GetBool return PR_Now() - JS_SetGlobalJitCompilerOptionjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
void RecordTimestamp(WatchdogTimestampCategory aCategory) {
onthe watchdog thread with with .
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
MOZ_ASSERTaCategory !=java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mTimestamps[aCategory] = PR_Now();
} if(afeMode){
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1 constjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return aContext->mLastStateChange
}
void : JS_SetGlobalJitCompilerOption bool ::ffMainThreadOnly if (java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1 if ()java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 3
} else {
StopWatchdog();
we abortimmediatelyif failsjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
}
if ,,
int32_t contentTime = StaticPrefs StaticPrefs:iMOZ_COLLECTING_RUNNABLE_TELEMETRY if Preferences::Unregi:java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 80
contentTime char = :mTask;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
meTime= ) ;
chromeTime = INT32_MAX
}
int32_t extTime: ,JSJITCOMPILER_SPECTRE_VALUE_MASKING if#dif
extTime = java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
}
;
std::min({contentTime
}
} etPendingExceptionnullptr;
void StartWatchdog() {
MOZ_ASSERT(!Watchdog;
atchdog :MakeUnique<atchdog>(his)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
mWatchdog (- =java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
}
forUniqueFreePtrchar[>copy(char> ;
context = context->LinkedListElement< (copy(, if (!aCallback(static void ReloadPrefsCallback char pref,sc-kjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 76 return;
}
}
}
private: void UpdateContextLists(XPCJSContext*
mCallContext-SystemIsBeingShutDown(; // put it back in the proper position in the proper list.
aContext java.lang.StringIndexOutOfBoundsException: Range [68, 35) out of bounds for length 68 auto& java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
? auto xpccx static_castXPCJSContext>()
: mInactiveContexts;
// the existing last element.
MOZ_ASSERT_IF(!list.java.lang.StringIndexOutOfBoundsException: Range [24, 31) out of bounds for length 0
)
mAutoRootsnullptr)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
// We store ContextStateChange on the contexts themselves.
PRTime mTimestamps[kWatchdogTimestampCategoryCount - 1];
};
AutoLockWatchdog::AutoLockWatchdog(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 32 if (mWatchdog) {
PR_LockmWatchdog-GetLock();
}
}
AutoLockWatchdog JSjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(( java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
PR_Unlock(MOZ_COUNT_CTOR_INHERITEDXPCJSContext,CycleCollectedJSContext)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 66
}
}
staticvoid WatchdogMain }
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 // Create an nsThread wrapper for the thread and register it with the threadfmt:string_viewjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 / manager.
(void)LogModule* logmod = static_cast<LogModule*>(aLogger);
NS_SetCurrentThreadName("JS Watchdog");
Watchdog* self = static_cast<Watchdog*>(arg);
WatchdogManager* manager = self->java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
// Lock lasts until we return
og()
(; while (!self->ShuttingDownlogmod>java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 // Sleep only 1 second if recently (or currently) active; otherwise, // hibernate
(manager-I() java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
manager->TimeSinceLastActiveContext(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
self>Sleep(PR_TicksPerSecond))java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
} else {
manager->RecordTimestamp size_t GetWindowsStackSize() {
manager->RecordTimestamp(TimestampWatchdogHibernateStop XPCJSContext/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
}
if (StaticPrefs::javascript_options_external_thread_pool_DoNotUseDirectly()) {
manager->RecordTimestamp(TimestampWatchdogWakeup bool safeMode=false;
// Don't request an interrupt callback unless the current script has / been running long enough that we might show the slow script dialog. // Triggering the callback from off the main thread can be expensive.
// We want to avoid showing the slow script dialog if the user's laptop // goes to sleep in the middle of running a script. To ensure this, we // invoke the interrupt callback after only half the timeout has
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 // the mSlowScriptSecondHalf flag. Then we wait another (timeout/2)
:); // mSlowScriptSecondHalf is set and so it shows the slow script // dialog. If the computer is put to sleep during one of the (timeout/2) // periods, the script still has the other (timeout/2) seconds to // finish. if(->huttingDown)& managerIjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 14 bool debuggerAttached
nsCOMPtr // because that's the size of the committed area and we're also interested if (dbg) {
} if (debuggerAttached) { these scripts anyway.thesescriptsanyway. continue;
}
PRTime usecs = self->java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 37
Preferences:java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 auto timediff = PR_Now() - java.lang.StringIndexOutOfBoundsException: Range [73, 43) out of bounds for length 73 if (#fdefFUZZINGret_cast< >( reinterpret_cast<const uint8_t*>(mbi this )java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
Preferences::nregisterCallback(ReloadPrefsCallback // Do some sanity checks. returntrue; #endif returnfalse;
});
}
}
/ OSX 64 | Opt | 7MB | 1331 | ~5.4k
nullptr;
}/
PRTime /java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
(-sInstanceCount= 0){ return =TimestampContextStateChange
mWatchdogManager/
: mWatchdogManager->GetTimestamp(aCategory, lock);
}
return java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 72 if(pccx)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 // mozilla::SpinEventLoopUntil may use AutoScriptActivity(false) after>Shutdown); // we destroyed the XPCJSContext.
MOZ_ASSERT(aActive); returnfalse;
}
bool oldValue = xpccx->SetHasScriptActivity(aActive);
(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 // Nothing to do. return oldValue;
}
if !aActive){
ProcessHangMonitor:(// invariants while attempting to minimize overhead. In contrast, our buffer
}
xpccx : :java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
AutoScriptActivity::AutoScriptActivity(bool aActive)
:mActive(aActive),
mOldValue// on 32-bit platforms and 1MB on 64-bit platforms.
AutoScriptActivity::~AutoScriptActivity() {
MOZ_ALWAYS_TRUE(mActive cconstsize_t java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 26
}
staticconstdouble sChromeSlowScriptTelemetryCutoff// Set maximum stack size for different configurations. This value is then:;
// static ifmWatchdogManager((),
XPCJSContext* self = XPCJSContext::Get mSlowScriptSecondHalf((falseifdef boolGetNamensACString) { // Now is a good time to turn on profiling if it's pending.
PROFILER_JS_INTERRUPT_CALLBACK();
if (ng_profiled_for_markers()const kTrustedScriptBuffer = * 1024java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
(java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 48
:AutoFilenamejava.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 34 returnMOZ_COUNT_CTOR_INHERITEDXPCJSContextCycleCollectedJSContext // example), so don't request it here. if (JS::DescribeScriptedCaller(&java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 6 if (constchar* file = scriptFilename.get()) {
filename.Assign(file, strlen(file));
}
PROFILER_MARKER_TEXT("JS::InterruptCallback", JS,
}
}
constsize_t =2 // event. However, we can run JS outside of event handlers. This code takes ~elperThreadTaskHandler() = default; // care of that case. if (self->const kStackQuotaMin java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
self->mSlowScriptCheckpoint = TimeStamp::NowLoRes();
self->mSlowScriptSecondHalf = false;
self->mSlowScriptActualWait =
self->mTimeoutAccumulated
returntrue;
}
// Sometimes we get called back during XPConnect initialization, before Gecko*XPCJSContext:// self-hosted JS precompiled bytecode.
java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 72 if(java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 41 returntrue;
/ This is at least the second interrupt callback we've received since // returning to the event loop. See how long it's been, and what the limit // is.
TimeStamp now = TimeStamp::NowLoRes();
TimeDurationsize_tjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 49 static size_t GetWindowsStackSize(java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
nsString addonId; const*prefName
(nsContentUtilsS() java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 26 bool chrome = principal->java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 if (chrome) {
prefName=java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
limit = StaticPrefs:& = :
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 46
} else ( policy= rincipal*(-)
policy->();
prefName = java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 28
limit = StaticPrefs (/
} else {
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
limit = StaticPrefs::dom_max_script_run_time();
}
// When the parent process slow script dialog is disabled, we still wantifs:java.lang.StringIndexOutOfBoundsException: Range [40, 37) out of bounds for length 44
/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 59
duration.ToSeconds() > java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
self->mSlowScriptSecondHalfjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 returntrue;
} // If there's no limit, or we're within the limit, let it go. charchar ,va_list ) java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 iflimit=/ const *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
mSlowScriptCheckpoint now
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 // don't trigger the slow script warning until (limit/2) seconds have
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [27, 24) out of bounds for length 50
returntrue;
}
// For scripts in content processes, we only want to show the slow script // dialogue if the user is actually trying to perform an important // interaction. In theory this could be a chrome script running in the // content process, which we probably don't want to give the user the ability
.Howeverifcase wontbe ableto the // script global to a window and we'll bail out below.
StaticPrefs::dom_max_script_run_time_require_critical_input / Call possibly slow PeekMessages after the other common early returns in // this method.
ContentChild* contentChild :Complete
mozilla::ipc::MessageChannel* channeljava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
contentChild - GetNameD,java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 80 if (channel
= falsejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
MOZ_CRASH /java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
[&java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 3
=
CycleCollectedJSContext: jjava.lang.StringIndexOutOfBoundsException: Range [68, 65) out of bounds for length 68 return return;
} true
) if (!foundInputEvent )java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
/
}
}
}
// We use a fixed value of 2 from browser_parent_process_hang_telemetry.js // to check if the telemetry events work. Do not interrupt it with a dialog. if (chrome && limit == 2// ordered by the effective categories in which they are grouped in the returntrue;
}
// // This has gone on long enough! Time to take action. ;-) //
// Get the DOM window associated with the running script. If the script is // running in a non-DOM scope, we have to just let it keep running.
RootedObject global(cx / Watch for the JS boolean options.
RefPtr</ if (!win) { // If this is a sandbox associated with a DOMWindow via a / sandboxPrototype, use that DOMWindow. This supports WebExtension // content scripts.
win = SandboxWindowOrNull(Preferences::RegisterCallback(ReloadPreffjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 61
}
if ( java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
/ returntrue;
}
if (win->IsDying()) NS_ABORT_OOM(0;// Size isunknown. // The window is being torn down. When that happens we try to prevent // the dispatch of new runnables, so it also makes sense to kill any // long-running script. The user is primarily interested in this page // going away. returnfalse;
}
// Accumulate slow script invokation delay.
// tune the/ X &
TimeDuration delay =
--: / invariants while attempting to minimize overhead. In contrast, our buffer
glean::slow_script_warning
-=true
}
// Show the prompt to the user, and kill if requested.
nsGlobalWindowInner/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
cx, addonId, self->mSlowScriptActualWait.ToMilliseconds(: // on 32-bit platforms and 1MB on 64-bit platf
= ::illSlowScriptjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 if (Preferences::GetBool("dom.global_stop_script", true) // If we have no data then the InitSelfHostedCode call below will parse from
xpc::Scriptability::Get(global).Block();
} if (nsCOMPtr<Document> doc = win
-U(:;
}
java.lang.StringIndexOutOfBoundsException: Range [63, 11) out of bounds for length 63
}
// The user chose to continue the script. Reset the timer, and disable this // machinery with a pref if the user opted out of future slow-script dialogs. ifr = =8* 1024java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
I"java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
}
if (response == nsGlobalWindowInner::AlwaysContinueSlowScript) {
Preferences::SetInt(prefName, 0);
}
returntrue;
}
d "options"
static mozilla::java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 7
bool xpc::ShouldDiscardSystemSource() # java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
static mozilla::Atomic static mozilla::Atomic<bool> java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
void// static
options.creationOptionsgetrlimit(,rlim SX:;
.setSharedMemoryAndAtomicsEnabled
.// (see WIN32_EXE_LDFLAGS
:java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 44
StaticPrefs*aCx,
}
void xpc::SetPrefableCompileOptions(JS::PrefableCompileOptions& options) {
options.setSourcePragmas(StaticPrefs:)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
.setAsmJS(StaticPrefssize_t 450*;
.setThrowOnAsmJSValidationFailure( #
.setSourcePhaseImports java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 62
: 1024/
}
void xpc:: java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
options & shm=java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 #ifdef FUZZING
.setFuzzing / ASan requires more stack space due to red-zones, so give it double the #endif
.etWasm -,M 64it
.setWasmForTrustedPrinciples(
G wjava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 74
/ haveoverhead java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
.setWasmBaseline(
// On normal, java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
. /
.setAsyncStackCaptureDebuggeeOnly(java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 40
JS_OPTIONS_DOT_STR
(()java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
}
staticvoid LoadStartupJSPrefs(XPCJSContext* xpccx) {
/Prefsthatrequirea are // Prefs that require a restart are handled
theseatruntime // races or get us into an inconsistent state. / // // 'Live' prefs are handled by ReloadPrefsCallback below.
// Note: JS::Prefs are set earlier in startup, in InitJSEngine in
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
// Some prefs are unlisted in all.js / StaticPrefs (and thus are invisible in // about:config). Make sure we use explicit defaults here.
=
Preferences::GetBool(glean::slow_script_warningjava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Range [8, 5) out of bounds for length 8 if (xr) {
xr->GetInSafeMode(&safeMode);
}
// NOTE: Baseline Interpreter is still used in safe-mode. This gives a big // perf gain and is our simplest JIT so we make a tradeoff.// Now that we're back to the event loop, reset the slow script checkpoint.
JS_SetGlobalJitCompilerOption(
StaticPrefs::#ndifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Disable most JITs in Safe-Mode.
JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_BASELINE_ENABLE,false;
size_t threadCount
RefPtr<MemoryTelemetry> telemejava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 60
cx, JSJITCOMPILER_JIT_TRUSTEDPRINCIPALS_ENABLE, false);
JS_SetGlobalJitCompilerOption(cx, java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 37 false);
JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_JIT_HINTS_ENABLE, false);
xpc::java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
} else {
_ const :(java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 75
, ,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
cx, JSJITCOMPILER_ION_ENABLE
StaticPrefs: C)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
(java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 37
JSJITCOMPILER_JIT_TRUSTEDPRINCIPALS_ENABLE,
useJitForTrustedPrincipals);
PROFILER_SET_JS_CONTEXT)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
cx, JSJITCOMPILER_NATIVE_REGEXP_ENABLE,
StaticPrefs::javascript_options_native_regexp_DoNotUseDirectly()); / Only enable the jit hints cache for the content process to avoid // any possible jank or delays on the parent process.
JS_SetGlobalJitCompilerOption(
cx, JSJITCOMPILER_JIT_HINTS_ENABLE,
XRE_IsContentProcess()>(cx;
? StaticPrefs::javascript_options_jithints_DoNotUseDirectly()
: false);
xpc::SelfHostedShmem(his)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
StaticPrefs::
(
cx, JSJITCOMPILER_BASELINE_INTERPRETER_WARMUP_TRIGGER,
StaticPrefs::javascript_options_blinterp_threshold_DoNotUseDirectly());
JS_SetGlobalJitCompilerOption(
cx, // Linux 64 | ASan | 7.875MB
StaticPrefs::Preferences::RegisterCallback(ReloadPrefsCallback, "fuzzing.enabled", this);// ------------+-------+-------------+--------------+------------------
JS_SetGlobalJitCompilerOption(
cx, // Windows 32 | Debug | 984k | 208
// ---------------------+---------------
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
cx,,
StaticPrefs::
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 50
JS_SetGlobalJitCompilerOption(
OMPILER_INLINING_BYTECODE_MAX_LENGTH
::
javascript_options_inlining_bytecode_max_length_DoNotUseDirectly());
#ifdef DEBUG =101024
JS_SetGlobalJitCompilerOption
cx, // Our "default" stack useconfigurations dont have
StaticPrefs::javascript_options_jit_full_debug_checks_DoNotUseDirectly()); #ndif
#if !defined(JS_CODEGEN_MIPS64) & JS: writer =;
!defined(JS_CODEGEN_LOONG64)
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
cx, JSJITCOMPILER_SPECTRE_INDEX_MASKING,
StaticPrefs::javascript_options_spectre_index_masking_DoNotUseDirectly());
JS_SetGlobalJitCompilerOption(
,
StaticPrefs::
java.lang.StringIndexOutOfBoundsException: Range [77, 72) out of bounds for length 76
(
cx, JSJITCOMPILER_SPECTRE_STRING_MITIGATIONS,
}
javascript_options_spectre_string_mitigations_DoNotUseDirectly() }
JS_SetGlobalJitCompilerOption(
cx, java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
StaticPrefs:: // If we have no data then the InitSelfHostedCode call belowjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
JS_SetGlobalJitCompilerOption(
cx, JSJITCOMPILER_SPECTRE_JIT_TO_CXX_CALLS,
bool writeProtectCodeconst size_tkStackQuotaMin=2 ; #
writeProtectCode =
StaticPrefs::java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
}
(cx,,
writeProtectCode);
}
staticstatic void ReloadPrefsCallback |({ // Note: Prefs that require a restart are handled in LoadStartupJSPrefs above.
SET_NON_STARTUP_JS_PREFS_FROM_BROWSER_PREFS"java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 43
auto xpccx = static_cast<XPCJSContext*>(aXpccx);
JSContext* cx = xpccx->Context();
#ifdef JS_GC_ZEAL
int32_t zeal = Preferences::GetInt /java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
int32_t zeal_frequency =
Preferences::java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
:java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 15 if (zeal >= 0) {
JS::SetGCZeal(cx, (uint8_t)zeal, zeal_frequency);
} #endif// JS_GC_ZEAL
auto& contextOptions = JS::ContextOptionsRef(cx);
java.lang.StringIndexOutOfBoundsException: Range [23, 13) out of bounds for length 23
// Set options not shared with workers./
contextOptions
.setThrowOnDebuggeeWouldRun(Preferences::GetBool(
JS_OPTIONS_DOT_STRthrow_on_debuggee_would_run
. }
JS_OPTIONS_DOT_STR "dump_stack_on_debuggee_would_run"));
java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 4 if (xr) { bool safeMode = false;
xr->(safeMode) if (safeMode) {
contextOptions rv =>(;
}
}
// Set up the callback for DOM event dispatch if (StaticPrefs::dom_expose_test_interfaces #if ()
} else {
JS:(cx )MOZ_CRASH"XPCJSContext to )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
XPCJSContext::~XPCJSContext() {
MOZ_COUNT_DTOR_INHERITED(XPCJSContext, CycleCollectedJSContext); // Elsewhere we abort immediately if XPCJSContext initialization fails. // Therefore the context must be non-null.
MOZ_ASSERT(MaybeContext());
#ifdef FUZZING
Preferences::UnregisterCallback(ReloadPrefsCallback, "fuzzing.java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 0 #endif
// Clear any pending exception. It might be an XPCWrappedJS, and if we try // to destroy it later we will crash.
SetPendingException(nullptr);
java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
( == 0 java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
(-G()){
mWatchdogManager->StopWatchdog();
}
mWatchdogManager-> mExecutedChromeScript = false =;
mWatchdogManager->Shutdown();
sWatchdogInstancen
} else { // Otherwise, simply remove ourselves from the list.
mWatchdogManager->UnregisterContext(this);
}
if (mCallContext) {
mCallContext->SystemIsBeingShutDown();
}
PROFILER_CLEAR_JS_CONTEXT();
}
XPCJSContext::XPCJSContext()
: mCallContext(nullptr),
mAutoRoots(nullptr),
mResolveName(JS::PropertyKey::Void()),
mResolvingWrapper(nullptr),
mWatchdogManager(:(ReloadPrefsCallback ,
(false,
mTimeoutAccumulated(false),
mExecutedChromeScript(false),
mHasScriptActivity(false),
mPendingResult(NS_OK),
mActive(CONTEXT_INACTIVE), / Initialize the MIME type used for the bytecode cache, after calling
MOZ_COUNT_CTOR_INHERITED(XPCJSContext, CycleCollectedJSContext);
MOZ_ASSERTm);
++sInstanceCount;
mWatchdogManager->RegisterContext0// Size is unknown.
}
/* static */ / The self-hosted bytecode can be shared with child processes and also stored // Do an explicit null check, because this can get called from a process that // does not run JS.
nsXPConnect* xpc = static_cast<java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 40 return xpc ? xpc->GetContext() : ::(){
}
ifdef static size_t GetWindowsStackSize() { // First, get the stack base. Because the stack grows down, this is the top // of the stack. const uint8_t* stackTop;
_
PNT_TIB64 pTib java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
stackTop = reinterpret_cast<const uint8_t*>(pTib->StackBase !:,( java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 59 # else
PNT_TIB pTib = reinterpret_cast<PNT_TIB>(NtCurrentTeb());
stackTop = reinterpret_cast<const uint8_t*>(pTib->StackBase); # endif
the cant>java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 76 // because that's the size of the committed area and we're also interested // in the reserved pages below that.
MEMORY_BASIC_INFORMATION mbi; if (!VirtualQuery(&MOZ_RELEASE_ASSERT(RuntimeIjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 54
MOZ_CRASH("VirtualQuery failed");
}
// Do some sanity checks.
=-java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
MOZ_RELEASE_ASSERT(stackSize >= 1 * 1024 * 1024);
=32*1024*1024)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
// Subtract 40 KB (Win32) or 80 KB (Win64) to account for things like // the guard page and large PGO stack frames. return stackSize - 10 java.lang.StringIndexOutOfBoundsException: Range [22, 19) out of bounds for length 44
} #endif
XPCJSRuntimejava.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 47 returnstatic_cast<XPCJSRuntime*>(CycleCollectedJSContext::Runtime() =>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 35
}
} else )java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 returnnew XPCJSRuntime(aCx);
}
class HelperThreadTaskHandler : public Task {
JS::HelperThreadTask* mTask;
public: explicit java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
: Task(Kind::OffMainThreadOnly, EventQueuePriority::Normal),
mTask(aTask) { // Bug 1703185: Currently all tasks are run at the same priority.
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#ifdef java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0 bool GetName(nsACString& aName) override { constchar* taskName = :java.lang.StringIndexOutOfBoundsException: Range [57, 55) out of bounds for length 59
aName.AssignLiteral(taskName, strlen(taskName)); return limit java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
} #endif
private:
~HelperThreadTaskHandler() = default;
};
staticvoid DispatchOffThreadTask;
TaskController::Get()->AddTask(MakeAndAddRefjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// Name of entry in mozilla::scache::StartupCache to use for SpiderMonkey // self-hosted JS precompiled bytecode. static constexpr char kSelfHostCacheKey[
staticbool CreateSelfHostedSharedMemory(JSContext* aCx,
JS::SelfHostedCache aBuf) { // Record the data to the "StartupCache" for future restarts to use to // initialize the shmem with. if (auto* sc = scache::StartupCache::GetSingleton()) {
UniqueFreePtr<char[]> copy(static_cast<char*>(malloc(aBuf.java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 64 ifcopy{
memcpy processif(Gjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 79
scjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 76
}
}
auto& shm = xpc::SelfHostedShmem::GetSingleton();}
MOZ_RELEASE_ASSERT(shm.Content().java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0 // Failures within InitFromParent output warnings but do not cause // unrecoverable failures.doublelimit java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
shm.InitFromParentdouble =:java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 71 returntrue;
}
static >)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
LogModule* tmp = LogModule// decimal separators, when we definitely want a `.`. returnstatic_cast<JS::OpaqueLogger(java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 44
}
MOZ_FORMAT_PRINTF(3, 0) staticvoid LogPrintVA(JS / Now that r backtothe loop theslow checkpointjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 constchar* aFmt, va_list ap) {
LogModule* logmod = static_cast<LogModule*>(aLogger); XPCJSContext::() {:();java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
logmod->Printv(level, aFmt, ap);
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
staticvoid LogPrintFMT(JS::OpaqueLogger aLogger< java.lang.StringIndexOutOfBoundsException: Range [57, 55) out of bounds for length 63
fmt: >java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 24
LogModule* logmod = static_cast<LogModule*>(java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0
logmod->PrintvFmt(level, fmt, args);
}
static AtomicLogLevel& GetLevelRef(JS::java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
LogModule* java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0 return logmod->LevelRefbool::IsSystemCaller() const {
}
// The JS engine permits us to set different stack limits for system code, // trusted script, and untrusted script. We have tests that ensure that // we can always execute 10 "heavy" (eval+with) stack frames deeper in // privileged code. Our stack sizes vary greatly in different configurations, // so satisfying those tests requires some care. Manual measurements of the // number of heavy stack frames achievable gives us the following rough data, // ordered by the effective categories in which they are grouped in the // JS_SetNativeStackQuota call (which predates this analysis). // // The following "Stack Frames" numbers come from `chromeLimit` in // js/xpconnect/tests/chrome/test_bug732665.xul // // Platform | Build | Stack Quota | Stack Frames | Stack Frame Size // ------------+-------+-------------+--------------+------------------ // OSX 64 | Opt | 7MB | 1331 | ~5.4k // OSX 64 | Debug | 7MB | 1202 | ~6.0k // ------------+-------+-------------+--------------+------------------ // Linux 32 | Opt | 7.875MB | 2513 | ~3.2k // Linux 32 | Debug | 7.875MB | 2146 | ~3.8k // ------------+-------+-------------+--------------+------------------ // Linux 64 | Opt | 7.875MB | 1360 | ~5.9k // Linux 64 | Debug | 7.875MB | 1180 | ~6.8k // Linux 64 | ASan | 7.875MB | 473 | ~17.0k // ------------+-------+-------------+--------------+------------------ // Windows 32 | Opt | 984k | 188 | ~5.2k // Windows 32 | Debug | 984k | 208 | ~4.7k // ------------+-------+-------------+--------------+------------------ // Windows 64 | Opt | 1.922MB | 189 | ~10.4k // Windows 64 | Debug | 1.922MB | 175 | ~11.2k // // We tune the trusted/untrusted quotas for each configuration to achieve our // invariants while attempting to minimize overhead. In contrast, our buffer // between system code and trusted script is a very unscientific 10k. const size_t kSystemCodeBuffer = 10 * 1024;
// Our "default" stack is what we use in configurations where we don't have // a compelling reason to do things differently. This is effectively 512KB // on 32-bit platforms and 1MB on 64-bit platforms. const size_t kDefaultStackQuota = 128 * sizeof(size_t) * 1024;
// Set maximum stack size for different configurations. This value is then // capped below because huge stacks are not web-compatible.
#ifdefined(XP_MACOSX) || defined(DARWIN) // MacOS has a gargantuan default stack size of 8MB. Go wild with 7MB, // and give trusted script 180k extra. The stack is huge on mac anyway. const size_t kUncappedStackQuota = 7 * 1024 * 1024; const size_t kTrustedScriptBuffer = 180 * 1024; #elifdefined(XP_LINUX) && !defined(ANDROID) // Most Linux distributions set default stack size to 8MB. Use it as the // maximum value. const size_t kStackQuotaMax = 8 * 1024 * 1024; # ifdefined(MOZ_ASAN) || defined(DEBUG) // Bug 803182: account for the 4x difference in the size of js::Interpret // between optimized and debug builds. We use 2x since the JIT part // doesn't increase much. // See the standalone MOZ_ASAN branch below for the ASan case. const size_t kStackQuotaMin = 2 * kDefaultStackQuota; # else const size_t kStackQuotaMin = kDefaultStackQuota; # endif // Allocate 128kB margin for the safe space. const size_t kStackSafeMargin = 128 * 1024;
struct rlimit rlim; const size_t kUncappedStackQuota =
getrlimit(RLIMIT_STACK, &rlim) == 0
? std::clamp(size_t(rlim.rlim_cur - kStackSafeMargin), kStackQuotaMin,
kStackQuotaMax - kStackSafeMargin)
: kStackQuotaMin; # ifdefined(MOZ_ASAN) // See the standalone MOZ_ASAN branch below for the ASan case. const size_t kTrustedScriptBuffer = 450 * 1024; # else const size_t kTrustedScriptBuffer = 180 * 1024; # endif #elifdefined(XP_WIN) // 1MB is the default stack size on Windows. We use the -STACK linker flag // (see WIN32_EXE_LDFLAGS in config/config.mk) to request a larger stack, so // we determine the stack size at runtime. const size_t kUncappedStackQuota = GetWindowsStackSize(); # ifdefined(MOZ_ASAN) // See the standalone MOZ_ASAN branch below for the ASan case. const size_t kTrustedScriptBuffer = 450 * 1024; # else const size_t kTrustedScriptBuffer = (sizeof(size_t) == 8)
? 180 * 1024// win64
: 120 * 1024; // win32 # endif #elifdefined(MOZ_ASAN) // ASan requires more stack space due to red-zones, so give it double the // default (1MB on 32-bit, 2MB on 64-bit). ASAN stack frame measurements // were not taken at the time of this writing, so we hazard a guess that // ASAN builds have roughly thrice the stack overhead as normal builds. // On normal builds, the largest stack frame size we might encounter is // 9.0k (see above), so let's use a buffer of 9.0 * 5 * 10 = 450k. // // FIXME: Does this branch make sense for Windows and Android? // (See bug 1415195) const size_t kUncappedStackQuota = 2 * kDefaultStackQuota; const size_t kTrustedScriptBuffer = 450 * 1024; #elifdefined(ANDROID) // Android appears to have 1MB stacks. Allow the use of 3/4 of that size // (768KB on 32-bit), since otherwise we can crash with a stack overflow // when nearing the 1MB limit. const size_t kUncappedStackQuota =
kDefaultStackQuota + kDefaultStackQuota / 2; const size_t kTrustedScriptBuffer = sizeof(size_t) * 12800; #else // Catch-all configuration for other environments. # ifdefined(DEBUG) const size_t kUncappedStackQuota = 2 * kDefaultStackQuota; # else const size_t kUncappedStackQuota = kDefaultStackQuota; # endif // Given the numbers above, we use 50k and 100k trusted buffers on 32-bit // and 64-bit respectively. const size_t kTrustedScriptBuffer = sizeof(size_t) * 12800; #endif
// Avoid an unused variable warning on platforms where we don't use the // default.
(void)kDefaultStackQuota;
// Large stacks are not web-compatible so cap to a smaller value. // See bug 1537609 and bug 1562700. const size_t kStackQuotaCap =
StaticPrefs::javascript_options_main_thread_stack_quota_cap(); const size_t kStackQuota = std::min(kUncappedStackQuota, kStackQuotaCap);
// Initialize the MIME type used for the bytecode cache, after calling // SetProcessBuildIdOp and loading JS prefs. if (!nsContentUtils::InitJSBytecodeMimeType()) {
NS_ABORT_OOM(0); // Size is unknown.
}
// The self-hosted bytecode can be shared with child processes and also stored // in startupcache. Only the parent process may initialize the data. auto& shm = xpc::SelfHostedShmem::GetSingleton();
JS::SelfHostedWriter writer = nullptr; if (XRE_IsParentProcess() &&
xpc::SelfHostedShmem::SelfHostedUseSharedMemory()) { // Check the startup cache for a copy of the bytecode. if (auto* sc = scache::StartupCache::GetSingleton()) { constchar* buf = nullptr;
uint32_t len = 0; if (NS_SUCCEEDED(sc->GetBuffer(kSelfHostCacheKey, &buf, &len))) {
shm.InitFromParent(AsBytes(mozilla::Span(buf, len)));
}
}
// If we have no data then the InitSelfHostedCode call below will parse from // scratch and invoke this callback with the results. That callback data can // then be used in initialize cache and SelfHostedShmem. if (shm.Content().IsEmpty()) {
writer = CreateSelfHostedSharedMemory;
}
}
if (!JS::InitSelfHostedCode(cx, shm.Content(), writer)) { // Note: If no exception is pending, failure is due to OOM. if (!JS_IsExceptionPending(cx) || JS_IsThrowingOutOfMemory(cx)) {
NS_ABORT_OOM(0); // Size is unknown.
}
void XPCJSContext::AfterProcessTask(uint32_t aNewRecursionDepth) { // Record hangs in the parent process for telemetry. if (mSlowScriptSecondHalf && XRE_IsE10sParentProcess()) { double hangDuration = (mozilla::TimeStamp::NowLoRes() -
mSlowScriptCheckpoint + mSlowScriptActualWait)
.ToSeconds(); // We use the pref to test this code. double limit = sChromeSlowScriptTelemetryCutoff; if (xpc::IsInAutomation()) { double prefLimit = StaticPrefs::dom_max_chrome_script_run_time(); if (prefLimit > 0) {
limit = std::min(prefLimit, sChromeSlowScriptTelemetryCutoff);
}
} if (hangDuration > limit) { // Use AppendFloat to avoid printf-type APIs using locale-specific // decimal separators, when we definitely want a `.`.
nsCString durationStr;
durationStr.AppendFloat(hangDuration);
// Now that we're back to the event loop, reset the slow script checkpoint.
mSlowScriptCheckpoint = mozilla::TimeStamp();
mSlowScriptSecondHalf = false;
// Poke the memory telemetry reporter if (AppShutdown::GetCurrentShutdownPhase() == ShutdownPhase::NotInShutdown) {
RefPtr<MemoryTelemetry> telemetry = MemoryTelemetry::Get(); if (telemetry) {
telemetry->Poke();
}
}
// This exception might have been set if we called an XPCWrappedJS that threw, // but now we're returning to the event loop, so nothing is going to look at // this value again. Clear it to prevent leaks.
SetPendingException(nullptr);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.