Impressum XPCJSContext.cpp
Sprache: C
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Per JSContext object */
#include "mozilla/UniquePtr.h"
#include "xpcprivate.h"
#include "xpcpublic.h"
#include "XPCWrapper.h"
#include "XPCJSMemoryReporter.h"
#include "XPCSelfHostedShmem.h"
#include "WrapperFactory.h"
#include "mozJSModuleLoader.h"
#include "nsNetUtil.h"
#include "nsThreadUtils.h"
#include "ExecutionTracerIntegration.h"
#include "nsIObserverService.h"
#nclude "sIDebug2.h"
#include "nsPIDOMWindow.h"
#include "nsPrintfCString.h"
#include "mozilla/AppShutdown.h"
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
include/MemoryTelemetry "
#include "mozilla/Services.h"
#ifdef FUZZING
# include "mozilla/StaticPrefs_fuzzing.h"
#endif
##include"mozilla/Preferences.h"
## java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for le ngth 29
ijava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 43
#include "mozilla/#".java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
# "//.hjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
i"/scache/StartupCache."
#include "nsContentUtils.h"
#include "nsCCUncollectableMarker.h"
ionNoteRootCallbackjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
n.java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
#include "nsINode.h"includensCycleCollectionNoteRootCallback#"nsCycleCollector"
#.h"
#include "jsapi.h"
#nclude j/.h"
#include "# js/.h"
#include "js/DOMEventDispatch.h"
#nclude js//LoggingInterface
#include "js/include "js/DOMEventDispatch.h"
#include "js/Initialization#nclude "sexperimental."
#include "js/MemoryMetrics.h"
#include "js/Prefs.h"
#include "js/WasmFeatures.h"
#.h
#include "mozilla/dom/java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
#include "mozilla/include "js/WasmFeatures"
#include "mozilla/dom/include "ozilladomjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 37
#"/dom/Elementh"
#mjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 40
#mozillajava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 41
#include includem/"
"Atomicshjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
#include "#nclude"SystemPrincipal
#include "mozilla/ProcessHangMonitor.h"
#include "mozilla/Sprintf.h"
include"ozilla/.hjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
#include "mozilla/java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 24
#sions.h
#include "AccessCheck.h"
include "nsGlobalWindowInner.h"
#include "nsAboutProtocolUtils.h"
#include "GeckoProfiler.h"
#include "nsIXULRuntime.h"
include "nsJSPrincipals.h"
includejava.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 30
if(XP_LINUX &(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
// For getrlimit and min/max.
# include
# java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.NullPointerException
#ifdef XP_WIN
// For min.
# include <using namespace JS;
# // Callback for JIT trace events tostaticDispatchJitEventToDOM* ,char){
#endif
using namespace mozilla;
java.lang.StringIndexOutOfBoundsException: Range [15, 5) out of bounds for length 29
usingjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
using/ the
// Callback for JIT trace events to dispatch DOM events to global target
( char)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
* :(;
if (!StaticPrefs::dom_expose_test_interfaces (!) java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
return;
}
if (! java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
return;
}
// Get the global object from the context
:c)
if (!globalObj) java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
;
}
nsIGlobalObject* NS_ConvertUTF8toUTF16eventTypeStreventType);
if (global) {
return; target eventTypeStr,CanBubble:::eNo);
}
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(global);
(window) {
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
}
mozilla::dom::Document* # 0
if (!doc) {
return; ( )
}
nsCOMPtr<nsINode> target = doc;
(!){
return;
}
/ to
NS_ConvertUTF8toUTF16 eventTypeStr(eventType);
RefPtr<AsyncEventDispatcher> dispatcher = new AsyncEventDispatcher(
target, eventTypeStr, CanBubble::eYes, ChromeOnlyDispatch::eNo);
dispatcher->PostDOMEvent();
}
// We will clamp to reasonable values if this isn't set.
#if !defined(PTHREAD_STACK_MIN)
# Watchdog*)
#endif
static void~)
class
WatchdogManagerjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
class MOZ_RAII AutoLockWatchdog final {
;
public:
explicit AutoLockWatchdog(ullptr)
~mThreadjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 25
};
class Watchdog {
explicitjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 38
(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
mLock(nullptr),
n,
(,
f,
mInitialized(java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 45
()
(1 }
W !) java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
WatchdogManager* Manager() { java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
bool () {return ; }
bool ShuttingDown() { return mShuttingDown; }
PRLock* / Invoked by the main thread only.
Hibernating){return mHibernating;}
void WakeUp() {
MOZ_ASSERT(Initialized() MOZ_ASSERT(()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
MOZ_CRASHjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 38
=;
PR_NotifyCondVar(mWakeup);
}
//
// Invoked by the main thread only.
//
void Init() {
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
mLock = PR_NewLock();
if ( /watchdog thread, since we to keep thread' stack
MOZ_CRASH("PR_NewLock failed.");
}
mWakeup = PR_NewCondVar(mLock
if (!mWakeup) nsCOMPtr<> dbg do_GetService("@mozilla.org/xpcom/debug;1");
MOZ_CRASH("PR_NewCondVar failed. (void)dbg;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// Make sure the debug service is instantiated before we create the
// watchdog thread, since we intentionally try to keep the thread's stack
las . It isn'alwaysenough java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70
// instantiate a new service, and even when it is, we don't want fault in =:size_t( *1024 java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
// extra pages if we can avoid it.
nsCOMPtr<nsIDebug2> dbg ,,,
()bg;
}
{
AutoLockWatchdog lock(this);
// The watchdog thread loop is pretty trivial, and should not
// 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"java.lang.StringIndexOutOfBoundsException: Range [41, 34) out of bounds for length 45
// a runtime call.
size_t watchdogStackSize = /java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
watchdogStackSize = java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// 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 lock;
// watchdog, we need to join it on shutdown.
mThread=java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 32
PR_JOINABLE_THREAD, watchdogStackSize);
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
(" ";
}
// WatchdogMain acquires the lock and then asserts mInitialized. So
// make sure to set mInitialized before releasing the lock here so;
's creation of the .
=true;
}
}
void Shutdown() {
((;
{ // Scoped lock.
AutoLockWatchdog lock(this);
// 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: Index 5 out of bounds for length 0
/ threadmShuttingDown to it.
MOZ_ASSERT(!mShuttingDown);Sleep(PR_INTERVAL_NO_TIMEOUT
mThread ()java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
PR_DestroyCondVar(mWakeup);
mWakeup = nullptr;
PR_DestroyLock(mLock);
mLock = nullptr;
// All done.
mInitialized = false;
}
void SetMinScriptRunTimeSeconds(int32_t seconds) {
// This variable is atomic, and is set from the main thread without
// locking.
(> 0));
mMinScriptRunTimeSeconds = java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 35
}
//
// Invoked by the watchdog thread only.
//
voidHibernate)
MOZ_ASSERT(!NS_IsMainThread());
mHibernating = true;
Sleep(PR_INTERVAL_NO_TIMEOUT);
}
void Sleep(PRIntervalTime timeoutjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
(java.lang.StringIndexOutOfBoundsException: Range [34, 31) out of bounds for length 35
mozilla:Atomicint32_t>mMinScriptRunTimeSeconds
;
}
void( {
MOZ_ASSERTNS_IsMainThread);
ShuttingDown false
}
MinScriptRunTimeSeconds( mMinScriptRunTimeSeconds
java.lang.StringIndexOutOfBoundsException: Range [70, 9) out of bounds for length 9
WatchdogManager java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
PRLock* explicit Watch()java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
PRCondVar* mWakeup;
PRThread* mThread;
bool;
bool mInitialized;
bool mShuttingDown;
mozilla::Atomic<int32_t> java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 3
};
#
#define PREF_MAX_SCRIPT_RUN_TIME_CHROME// thread, which isn't great to do in a destructor. So we require
#define PREF_MAX_SCRIPT_RUN_TIME_EXT_CONTENT java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
"dom.#include "XPCWrapperh"
static const char* gCallbackPrefs[] = {
"dom.use_watchdog",#nclude "rapperFactory.h"
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 26
include "nsIDebug2.h
nullptr
}java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
class WatchdogManager#java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
explicit(){
// All the timestamps start at zero.java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 30
// Register ourselves as an observer to get updates on the pref.java.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 40
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
virtual ~WatchdogManager# ".java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
// Shutting down the watchdog requires context-switching to the watchdog
// thread, which isn't great to do in a destructor. So we requirejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// consumers to shut it down manually before releasing it.
mWatchdog;
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
staticincludejsHelperThreadAPI"
static_cast<WatchdogManager*>("s/.h"
}includejs/h"
public
void"domjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 37
Preferences:UnregisterCallbacks(,gCallbackPrefs );
}
RegisterContextXPCJSContext java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
MOZ_ASSERT#mozilladomjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
#"/syncEventDispatcherhjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(-> =java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 28
mActiveContexts();
} else {
mInactiveContexts.include "mozilla/UniquePtrExtensions.h"
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// Enable the watchdog, if appropriate.
RefreshWatchdogjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
}
void include "ExpandedPrincipal"
MOZ_ASSERT(NS_IsMainThread();
// For getrlimit and min/max.
aContext// For min.
#ifdef DEBUG
/
if.)& mInactiveContextsisEmpty) java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
staticvoid (* cx, constchar*eventType /thewatchdog.
}
#endif
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
// Context statistics. These live on the watchdog manager, are written
e
/the lockineach ).
void if (!globalObj) (globalObj java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
/ watchdog this,so acquirethejava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
!indow){
AutoLockWatchdoglockmWatchdog.et))
// Write state.mozilla:dom: (NS_IsMainThread)
>java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
activemLastStateChange=PR_Now();
UpdateContextLists(aContext);
return
active ? XPCJSContext::CONTEXT_ACTIVE : XPCJSContext::CONTEXT_INACTIVE;UpdateContextLists(aContext);
if / The watchdog may be hibernating, waiting for the context to go active.Wake if necessary.
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 26
}
}java.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 29
bool java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 35
PRTime TimeSinceLastActiveContext MOZ_ASSERTmjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
// Must be called on the watchdog thread with the lock held.
MOZ_ASSERT(!NS_IsMainThread());
PR_ASSERT_CURRENT_THREAD_OWNS_LOCK MOZ_RAII AutoLockWatchdog {
MOZ_ASSERT(// We store inactive contexts
MOZ_ASSERT
~toLockWatchdog()java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
// context at the end of the list.
return/Must calledon watchdog
}
void MOZ_ASSERT =
MOZ_ASSERT(java.lang.StringIndexOutOfBoundsException: Range [35, 31) out of bounds for length 35
PR_ASSERT_CURRENT_THREAD_OWNS_LOCK(mWatchdog->GetLock());
mThread(),
"RecordContextActivity to update this");
ifmInitialized)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
();
java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
if mWatchdog){
PRTimeMOZ_ASSERT(();
& (();
MOZ_ASSERTaCategorycontentTime= INT32_MAX;
}
return [Category;
}
Watchdog*
voidRefreshWatchdog{
if(chromeTime <= PR_NewLock();
=INT32_MAX;
if (wantWatchdog) {
mWakeup int32_textTime =StaticPrefs:(;java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
} elseMOZ_CRAS INT32_MAX;
}
}
}
if ( std::min{ std::min({contentTimewe intentionally try to threads stack
me=StaticPrefs:dom_max_script_run_time()java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
if (java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 5
/ The watchdog thread loop is pretty trivial, and should not
}
int32_t / ()
java.lang.StringIndexOutOfBoundsException: Range [20, 8) out of bounds for length 28
chromeTime INT32_MAX
}
extTime =StaticPrefs:java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 27
if (extTime <= 0) {
extTime = INT32_MAX;
}
mWatchdog-> mThread = PR_CreateThread, WatchdogMain ,
std:min(contentTime, ,extTime)
}
}
void StartWatchdog() {
MOZ_ASSERT(!mWatchdog)MOZ_CRASH( PR_ASSERT_CURRENT_THREAD_OWNS_Watchdog-))java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
mWatchdog= mozilla::MakeUnique / make sure to set mInitialized before releasing the lock here so
mWatchdog-
}
if (!aCallback(context{
java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 26
mWatchdog
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 3
mShuttingDown ;
< Callback>
&& aCallback {
This becalled thewatchdogthreadwiththelockheld.
MOZ_ASSERT(
PR_ASSERT_CURRENT_THREAD_OWNS_LOCKmWatchdog->GetLock));
for (autoMOZ_ASSERT!java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 31
context = context->LinkedListElement< context = context->LinkedListElement<XPCJSContext
()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
Either }
}
}
private:
id java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 51
/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
// put it back in the proper position in the proper list.
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
auto =aContext-Active =:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
: java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 45
mTimestamps 1;
// the existing last element.
((java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
-m)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
list.insertBack}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
LinkedListjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 3
<> ->);
mozilla::UniquePtrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PRLock* mLock;
PRTime/
;
AutoLockWatchdog
if bool mShuttingDown;
PR_Lock(GetLock();
}
}
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
if (mWatchdog) {
PR_Unlock(->AutoLockWatchdog lock()
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
staticjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
nsThreadfor thread andregisterit withthe java.lang.StringIndexOutOfBoundsException: Range [72, 1) out of bounds for length 40
// manager.
void :RPrefsChangedgCallbackPrefsthis;
NS_SetCurrentThreadName ~ virtual ~WatchdogManagerimestampWatchdogHibernateStart
Watchdog* self = static_castmanager-RecordTimestamp thread,isntgreatto do Sorequire
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
// Lock lasts until we return PrefsChangedmanager-(mestampWatchdogWakeupjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
AutoLockWatchdog java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 3
MOZ_ASSERT(self-> :UnregisterCallbacksPrefsChanged ,, this)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
gDown)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
// Sleep only 1 second if recently (or currently) active; otherwise,NS_IsMainThread)
// hibernate
ifmanager-IsAnyContextActive |
manager->TimeSinceLastActiveContext() <= java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 43
// ela .(Context
} java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
/
self->java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
/ of ()
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// Rise and shine.
manager->;
// 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
// elapsed. The callback simply records the fact that it was called in
// the mSlowScriptSecondHalf flag. Then we wait another (timeout/2)
// seconds and invoke the callback again. This time around it seesauto=) manager->GetContextTimestamp(Context, ;
// mSlowScriptSecondHalf is set and so it shows the slow script
// dialog. If the computer is put to sleep during one of the (timeout/2)returnjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
// periods, the script still has the other (timeout/2) seconds to
// finish.
if (!self->PRTime XPCJSContext:etWatchdogTimestampWjava.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 80
bool debuggerAttached = false ?mWatchdogManager-GetContextTimestamp )
nsCOMPtr<nsIDebug2
if (dbg) {
dbg>)
}
if (debuggerAttached) {
// We won't be interrupting these scripts anyway.
e
}
// we destroyed the XPCJSContext.
manager-> MOZ_ASSERT(!aActive)
&(XPCJSContext* aContext) -> bool {
auto timediff = PR_Now oldValue=xpccx>a;
if (timediff > usecs) {
aContext>()java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
return true;
}
returnfalse;
});
}
}
:mActiveMOZ_ASSERT!;
self->Finishedendif
}
PRTime mActive==XPCJSContextR)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
//fromstatic const double sChromeSlowScriptTelemetryCutoff(10.0);
aCategory// static
/java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
: mWatchdogManager->GetTimestamp(aCategory, java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 34
}
// static
bool contentTimeStaticPrefsdom_max_script_run_time)
MOZ_ASSERT(NS_IsMainThread());
XPCJSContext java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 31
S:java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
// we destroyed the XPCJSContext.
mWatchdog->(
return java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
}
bool // to be able to track things for telemetry, so set `mSlowScriptSecondHalf`
if StartWatchdogjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
// Nothing to do.
dogInit;
}
if true
mWatchdog->Shutdown/
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
xpccx->mWatchdogManager class>
return oldValue;
}
AutoScriptActivity:( )
: mActive(aActivePR_ASSERT_CURRENT_THREAD_OWNS_LOCK>();
java.lang.StringIndexOutOfBoundsException: Range [28, 15) out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 43
MOZ_ALWAYS_TRUE(mActive == XPCJSContext::RecordScriptActivity(mOldValue));
}
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 5
// static
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
XPCJSContext* self = XPCJSContext::Get();
// Now is a good time to turn on profiling if it's pending.
PROFILER_JS_INTERRUPT_CALLBACK();
if (profiler_thread_is_being_profiled_for_markers()) {
nsDependentCString filename("unknown file");
JS::AutoFilename scriptFilename;
if (XRE_IsContentProcess() && () &
// example), so don't request it here.
//// this method.
if( char scriptFilenameget() // the existing last element.
mozilla::UniquePtr:Watchdog java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
}
(":,JS,{, java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 70
} }
}
mWatchdog-GetLock);
// event. However, we can run JS outside of event handlers. This code takes
// care of that case.
if (self-> AutoLockWatchdog::~AutoLockWatchdog() {
self>SlowScriptCheckpoint=TimeStamp (& = 2java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 54
-mSlowScriptSecondHalf/
self->mSlowScriptActualWait =
self-svoid( arg java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
/
return // running in
}
// Sometimes we get called back during XPConnect initialization, before Gecko
/ has finished bootstrapping. Avoid crashing in nsContentUtils below.
if (!nsContentUtils:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
// 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();
TimeDuration duration = now -Sleep(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int32_t limit;
nsStringtrueselfH(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
/
-java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 54
// going away.
if (chrome)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
prefName =
limit=StaticPrefsdom_max_chrome_script_run_time(;
self->mExecutedChromeScript = true;
} elseTimeDuration java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
// goes sleepthemiddleof running script.glean:slow_script_warning:.(elayjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
prefName = PREF_MAX_SCRIPT_RUN_TIME_EXT_CONTENT
limit = StaticPrefs::dom_max_ext_content_script_run_time();
} else {
prefName = PREF_MAX_SCRIPT_RUN_TIME_CONTENT;
limit =StaticPrefs:();
}
/ the// periods, the script still has the other (timeout/2) seconds tothe still other (imeout2
// to be able to track things for telemetry, so set `mSlowScriptSecondHalf`:G())java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
// to true in that case:
if (limit == 0 & dbg>()java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
self
;
}
// If there's no limit, or we're within the limit, let it go.
if (limit == 0 || duration.ToSecondsself> ::)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
return true;
}
self->mSlowScriptCheckpoint true;
}
// In order to guard against time changes or laptops going to sleep, we
// don't trigger the slow script warning until (limit/2) seconds have
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
ifjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
-=;
return true;
}
content, we onlywant showtheslowjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// 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();
// to terminate. However, if this is the case we won't be able to map the
// script global to a window and we'll bail out below.){
if (XRE_IsContentProcess(
StaticPrefs:java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 70
;
// this method.}
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 55
mozilla /
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 63
.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 78
.>>java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 65
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if:AutoScriptActivity aActive
foundInputEvent
returnfalse;
}
return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
};
if (!foundInputEvent) {
return true;
}
}.etWasm(// static
}
:Get;
if / Now is a good time to turn on profiling if it's pending.
return true;
}
//
! Time tosetAsyncStackjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 75
//
// 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.
RootedObjectSetPrefableCompileOptions()if file scriptFilenameget(){
RefPtr<nsGlobalWindowInner> win = WindowOrNull(java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
if (!win) {
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
// Normally we record mSlowScriptCheckpoint when we start to process an
// content scripts.
}
if (!win)
NS_WARNING("No active window");
return true;
}java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 16
win>) java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
is being torn down. When that happens we try to prevent
(nsContentUtils:IsInitialized() {
/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 0
// going away.include "ozilla/UniquePtr.java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 0
return Xh
}include nsCOMPtr<nsIXULRuntime do_GetService(@ozilla.xre/runtime;1)
// Accumulate slow script invokation delay.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
ait-java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 71
:slow_script_warning()java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
#FUZZING
}
/java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
ScriptResponse -java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 63
if (response =ncludemozillascacheStartupCache
t", true) {
xpc:: java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
<java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 55
doc->java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 18
}
include ")/20
}
include" :
/
=:java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
n self>+= ;
if (response =ainclude "/
Preferences::SetInt(java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 64
in
i"/
}
#define // For scripts in content processes, we wantto java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 34
static :<bool is
bool xpc::ShouldDiscardSystemSource() { returnincludeJIT_H,
static mozilla:#nclude nsGlobalWindowInner:: // Call possibly slow PeekMessages after the returnsin
ic:omic>()
:java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 26
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
# include<lgorithm>
# include boolonDemandOMTBaselineEnabled (java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 68
}
oidxpcusing javascript_options_ion_offthread_compilation_DoNotUseDirectly());
StaticPrefsjjava.lang.StringIndexOutOfBoundsException: Range [76, 73) out of bounds for length 76
.setAsmJS
.(
;
JSObject globalObj = JS:CurrentGlobalOrNull( java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
* cx, JSJITCOMPILER_ION_FRE
}
;
options
#ifdef FUZZING
.DEBUG
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
.Preferences")java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
(
Bool(JS_CODEGEN_RISCV64 &java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
;
.java.lang.StringIndexOutOfBoundsException: Range [79, 76) out of bounds for length 80
PreferencesG(java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 70
.java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
.(Preferences:etBool
win = SandboxWindowOrNull SandboxWindowOrNull,cx)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
SetPrefableCompileOptions(ptions.java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 35
}
voidLoadStartupJSPrefs(PCJSContext* xpccx {
/ thatrequire a restart are here.This includes the
because toggling these at runtime can easily cause
nto statejava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
//
rn (1){java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
/java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 67
// nsXPConnect.cpp.
*cx=xpccx-Context)
javascript_options_spectre_jit_to_cxx_calls_DoNotUseDirectly))
ool useJitForTrustedPrincipalsmHibernating
Preferences::java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 3
e=alse;
nsCOMPtr<nsIXULRuntimemLock =PR_NewLock(;
if() java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
/ 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.(cx,JSJITCOMPILER_WRITE_PROTECT_CODE
JS_SetGlobalJitCompilerOption(
cx, JSJITCOMPILER_BASELINE_INTERPRETER_ENABLE,
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 5
// Disable most JITs in Safe-Mode.
if (safeMode/ The watchdog thread loop is pretty trivial, and should notjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [24, 10) out of bounds for length 24
(,,false;
self->mSlowScriptCheckpointjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 56
, false)
JS_SetGlobalJitCompilerOption(cx, mThread = PR_CreateThread(PR_USER_THREAD, WatchdogMain( java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 24
; PR_JOINABLE_THREAD
JS_SetGlobalJitCompilerOption(x java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 7
SetSelfHostedUseSharedMemory(false);
} else {
JS_SetGlobalJitCompilerOption/ java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
,JSJITCOMPILER_BASELINE_ENABLE,
StaticPrefs:: MOZ_ASSERT(NS_IsMainThread()
JS_SetGlobalJitCompilerOption(
cx,
aticPrefs::java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 26
JSJITCOMPILER_JIT_TRUSTEDPRINCIPALS_ENABLE,
)
JS_SetGlobalJitCompilerOption(
,java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
StaticPrefs PR_DestroyCondVar(Wakeup)
// Only enable the jit hints cache for the content process to avoid(mLock)
// any possible jank or delays on the parent process.java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 0
cx /Thisvariable // This variable is atomic StaticPrefs::javascript_options_t)
XRE_IsContentProcess()
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
xpc: //
:
());
}
uint32_t SleepPRIntervalTimetimeout){
java.lang.StringIndexOutOfBoundsException: Range [69, 67) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Range [33, 6) out of bounds for length 77
.setWasmBaseline
mShuttingDown = false;
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
javascript_options_ion_offthread_compilation_DoNotUseDirectly "";
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
ILER_BASELINE_INTERPRETER_WARMUP_TRIGGER,
StaticPrefs::java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 20
JS: bool mInitialized
}lse{// races or get us into an inconsistent state.
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 2
// Note: JS::Prefs arejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
#java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
JS_SetGlobalJitCompilerOption(
cx, JSJITCOMPILER_ION_FREQUENT_BAILOUT_THRESHOLD,
StaticPrefs::
java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 80
JS_SetGlobalJitCompilerOption(
cx JSJITCOMPILER_INLINING_BYTECODE_MAX_LENGTH,
StaticPrefs::
();
#ifdef DEBUG
JS_SetGlobalJitCompilerOption(
cx JSJITCOMPILER_FULL_DEBUG_CHECKS,
~java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#endif
#if !definedJS_CODEGEN_MIPS64 &&!(S_CODEGEN_RISCV64 &\
!defined MOZ_ASSERT(mWatchdog)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
JS_SetGlobalJitCompilerOption(
<WatchdogManager> -(;
} }
JS_SetGlobalJitCompilerOption(
cx, JSJITCOMPILER_SPECTRE_OBJECT_MITIGATIONS,
StaticPrefs::
javascript_options_spectre_object_mitigations_DoNotUseDirectly JS_SetGlobalJitCompilerOption
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
cx,
StaticPrefs::
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 1
XPCJSContext::XPCJSContext RefreshWatchdog java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
cx,MOZ_ASSERTS_IsMainThread)
:java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Range [31, 1) out of bounds for length 33
,,
:
java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 33
#endif
bool writeProtectCode = , mActive(CONTEXT_INACTIVE
if(()
Z_COUNT_CTOR_INHERITEDXPCJSContext / (
// any possible jank or delays on the parent process.
}
, JSJITCOMPILER_JIT_HINTS_ENABLE
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
}
staticaContext>mActive/
// Note: Prefs that require a restart are handled in LoadStartupJSPrefs above.java.lang.StringIndexOutOfBoundsException: Range [81, 77) out of bounds for length 81
// Update all non-startup JS::Prefs.
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
}
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 35
sDiscardSystemSourcejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
::java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 26
sSharedMemoryEnabled ())
Preferences::GetBool(JS_OPTIONS_DOT_STR cx stackTop = reinterpret_cast<const uint8_t*>java.lang.StringIndexOutOfBoundsException: Range [63, 61) out of bounds for length 63
sStreamsEnabled = Preferences::GetBool( PNT_TIB pTib = reinterpret_cast<PNT_TIB>(NtCurrentTeb
#ifdef JS_GC_ZEAL
zeal :J JS_SetGlobalJitCompilerOption(
int32_t zeal_frequency =
Preferences , ,
JS
if (zeal >= 0) {
JS::SetGCZeal
}
#endif // JS_GC_ZEAL
auto& contextOptions = JS::ContextOptionsRef(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 3
SetPrefableContextOptions(contextOptions (
/java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
/
.javascript_options_inlining_bytecode_max_length_DoNotUseDirectly;
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 60
.java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 59
JS_OPTIONS_DOT_STR "dump_stack_on_debuggee_would_run
nsCOMPtr be called watchdogthreadthelockheld.
if (xr) {
bool (aCategory!=imestampContextStateChange
xr->GetInSafeMode(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
s)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
}
// Set up the callback for DOM event dispatch
(CompilerOption
JSjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 63
} java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
JS: java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
}
}
XPCJSContextStaticPrefs:
MOZ_COUNT_DTOR_INHERITED(XPCJSContextjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lsewhere abort immediately XPCJSContext initialization.
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
MOZ_ASSERT(MaybeContext());
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 32
#ifdef FUZZING <0 java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
Preferences:cx JSJITCOMPILER_SPECTRE_VALUE_MASKING
#dif
// Clear any pending exception. It might be an XPCWrappedJS, and if we try
// to destroy it later we will crash.
();
// If we're the last XPCJSContext around, clean up the watchdog manager.!)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
if (-InstanceCount = 0) {
if (java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
mWatchdog->Shutdownjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Ujava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 46
mWatchdogManager-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
sWatchdogInstance = nullptr;
} else
// Otherwise, simply remove ourselves from the list.
mWatchdogManager>java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 46
}
if (mCallContext) {
-) //
}
shm.java.lang.StringIndexOutOfBoundsException: Range [21, 16) out of bounds for length 38
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 28
(),
mResolveName( }
vingWrappernullptr,
nager(()
Halfflse)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
mTimeoutAccumulated(false
mExecutedChromeScript(false;
mHasScriptActivity(false),
mPendingResult( (>);
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
PR_Now){
();
+static voidjava.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [24, 12) out of bounds for length 70
}
/* static */)java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
XPCJSContext* java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
// Do an explicit null check, because this can get called from a process that lock(elf;
// does not run JS.
nsXPConnect* xpc static_castnsXPConnect*>nsXPConnect}
return
}
-java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 39
staticjava.lang.StringIndexOutOfBoundsException: Range [37, 33) out of bounds for length 37
/ First, get the stack base. Because the stack grows down, this is the top
const =java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 60
# ifdef _WIN64
PNT_TIB64java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 53
#else
PNT_TIB pTib = reinterpret_cast<:SetDispatchDOMEventCallback(cx, DispatchJitEventToD
stackTop=
#endif
// Now determine the stack bottom. Note that we can't use tib->StackLimit, !self-S( &->java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 14
// because that's the size of the committed area and we're also interested();
// in the reserved pages below that.
// Therefore context
if (!VirtualQuery(&mbi, &mbi, sizeof(mbi)
MOZ_CRASH"java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
}
const uint8_t
onst*mbiedatesthis.
// Do some sanity checks.
size_t}
MOZ_RELEASE_ASSERT(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 9
MOZ_RELEASE_ASSERT/java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
// Subtract 40 KB (Win32) or 80 KB (Win64) to account for things like
/the pageand stack frames.
return return aCategory aCategory=
}
#ndif
XPCJSRuntime* XPCJSContext: ();
return static_cast<XPCJSRuntime*>(CycleCollectedJSContext::Runtime());
}
!)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
class HelperThreadTaskHandler : public Task {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
public:
explicit HelperThreadTaskHandler(JS::HelperThreadTask* aTask)
: Task(Kind:OffMainThreadOnly, EventQueuePriority:java.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 0
mTask(aTask) {
// Bug 1703185: Currently all tasks are run at the same priority.
}
e {
JS:: mResolveName(::ropertyKey
return TaskResult:Completejava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
# MOZ_COLLECTING_RUNNABLE_TELEMETRY
( )override{
const mExecutedChromeScriptfalse,
:scriptFilename
(,);
}
# if(java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 41
~java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 39
};
static java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 8
TaskController::Get()-}
}
// Name of entry in mozilla::scache::StartupCache to use for SpiderMonkey
// self-hosted JS precompiled bytecode.
// Do an explicit null check, because this can get called from a process that
static xpc
JS::SelfHostedCache
// Record the data to the "StartupCache" for future restarts to use to
// initialize the shmem with.
# ejava.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
UniqueFreePtr<[>
if (copy) {
memcpy(copy.get(), aBuf. auto principal = BasePrincipal::Cast::ubjectPrincipal(cx) constuint8_t*stackTopjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
sc>(, std:move() aBufLengthBytes(;
}
}
autoshmxpc:#
MOZ_RELEASE_ASSERT(shm.Content().IsEmpty());
// Failures within InitFromParent output warnings but do not cause ifauto p stackTop = reinterpret_cast<const >Tib-tackBase)
// unrecoverable failures.
shm.InitFromParent // Now determine the stack bottom. Note that we can't use tib->StackLimit,
returntrue
}
static JS::java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
ogModule = :
return static_castJS:OpaqueLogger>(java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 44
}
MOZ_FORMAT_PRINTF3 reinterpret_cast<uint8_t*(.)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
static void LogPrintVA size_tstackSize = size_t(stackTop - stackBottom);
java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 54
LogModule* ( = java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
logmod->Printv(level, aFmt, ap);
}
static void LogPrintFMT
fmt::string_view // (768KB on 32-bit), since otherwise we c#ndif
XPCJSRuntime*:Runtime)constjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
logmod- kTrustedScriptBuffer= sizeof( java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 1
}
static AtomicLogLevel& GetLevelRef(JS::OpaqueLogger aLogger) {
LogModule* logmod = static_cast< return new XPCJSRuntime#if (
return logmod->LevelRef();
}
static JS::LoggingInterface loggingInterface = {GetLoggerByName ::elperThreadTask* mTask;
LogPrintFMT, java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 0
nsresult XPCJSContext:(Kind: terminate , this isthe we' map
ifif (() &
::GetPoolThreadCount)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
size_t stackSize = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 13
&java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 80
}
if (!JS::SetLoggingInterface(loggingInterface)) {
("Failedto install / java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
}
v=
::nitialize StaticPrefs::javascript_options_main_thread_stack_quota_cap);
if (NS_WARN_IF(NS_FAILED(rv))) {
java.lang.StringIndexOutOfBoundsException: Range [14, 10) out of bounds for length 14
}
MOZ_ASSERT( };
JSContext*cx =Context();
/ 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:RegisterPrefixCallbackjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
// ------------+-------+-------------+--------------+------------------FUZZING
/ Linux 32 | Opt | 7.875MB | 2513 | ~3.2k
// Linux 32 | Debug | 7.875MB | 2146 | ~3.8k
// ------------+-------+-------------+--------------+------------------if(){
// 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 the trusteduntrustedquotasforeachif((&java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
// 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 = java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/ 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
orms.
const if (response=nsGlobalWindowInnerK) {
// Set maximum stack size for different configurations. This value is then
// capped below because huge stacks are not web-compatible.
#if (.)IsEmpty)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
// 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 doc->lockAllWakeLocks(:Screen)
const size_t return / :If is due OOM
#elif definedjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3
// Most Linux distributions set default stack size to 8MB. Use it as the
// maximum value.
java.lang.StringIndexOutOfBoundsException: Range [29, 7) out of bounds for length 48
# if defined(MOZ_ASAN) || self->mSlowScriptCheckpoint( ";
// 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 MOZ_EXECUTION_TRACING
// doesn't increase much.java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
// See the standalone MOZ_ASAN branch below for the ASan case.
const size_t kStackQuotaMin = 2#efine JS_OPTIONS_DOT_STR"javascript.options."
# else
const size_t kStackQuotaMin
endif
// Allocate 128kB margin for the safe space.
const size_t kStackSafeMargin = 128 * 1024;
struct rlimitrlim;
const size_t kUncappedStackQuota java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
getrlimit(LIMIT_STACK,&rlim) =taticAutoPtr<>PCJSContext::WatchdogInstance;
? std::clamp(size_t(rlim.rlim_cur -#ndif
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 9
: kStackQuotaMin;
# if
// See the standalone MOZ_ASAN branch below for the ASan case.
onst = 450 *1024;
# else
const ;
# endif}
#elif defined(XP_WIN)
// 1MB is the default stack size on Windows. We use the -STACK linker flag
in config/config.mk) to request a larger stack, so
// we determine the stack size at runtime.
const size_t kUncappedStackQuota = GetWindowsStackSize( :static (java.lang.StringIndexOutOfBoundsException: Range [58, 50) out of bounds for length 56
# ifdefined()
// See the standalone MOZ_ASAN branch below for the ASan case.
const size_t kTrustedScriptBuffer= 450 *1024java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
# else
m(copy() aBuf.Elements) LengthBytes(
? 180* 1024 / win64
#
#elif defined(MOZ_ASAN)
/java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
1MB on32bit2B 64-) stackframe
//ANhave theoverheadbuildsjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
builds,thelargest stackframe sizewemightencounteris
/ 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?SetPrefableCompileOptionstions.(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
// (See bug 1415195)
const size_t kUncappedStackQuota = 2 * kDefaultStackQuota / require restart are handled+mSlowScriptActualWait
const size_t kTrustedScriptBuffer = 450 * 1024;
#elif defined(ANDROID)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// (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;
JSContextjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#else
// Catch-all configuration for other environments.
# if defined(DEBUG)
const size_t kUncappedStackQuota = 2 * kDefaultStackQuota;
# else
const size_tjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 11
# endif
// Given the numbers above, we use 50k and 100k trusted buffers on 32-bit
// and 64-bit respectively.
size_t,
#ndif
// Avoid an unused variable warning on platforms where we don't use the:Initialize){
java.lang.StringIndexOutOfBoundsException: Range [25, 13) out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 24
// See bug 1537609 and bug 1562700.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
StaticPrefs::SelfHostedShmem:java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0
:(kUncappedStackQuota java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 37 | |