mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 909490, part 3 - Add callback for zone sweeping. r=jonco
This commit is contained in:
parent
d019fda5e2
commit
634fb697f0
@ -914,6 +914,12 @@ JS_SetDestroyZoneCallback(JSRuntime *rt, JSZoneCallback callback)
|
||||
rt->destroyZoneCallback = callback;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_SetSweepZoneCallback(JSRuntime *rt, JSZoneCallback callback)
|
||||
{
|
||||
rt->sweepZoneCallback = callback;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_SetCompartmentNameCallback(JSRuntime *rt, JSCompartmentNameCallback callback)
|
||||
{
|
||||
|
@ -1629,6 +1629,9 @@ JS_SetDestroyCompartmentCallback(JSRuntime *rt, JSDestroyCompartmentCallback cal
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_SetDestroyZoneCallback(JSRuntime *rt, JSZoneCallback callback);
|
||||
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_SetSweepZoneCallback(JSRuntime *rt, JSZoneCallback callback);
|
||||
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_SetCompartmentNameCallback(JSRuntime *rt, JSCompartmentNameCallback callback);
|
||||
|
||||
|
@ -3717,6 +3717,9 @@ BeginSweepingZoneGroup(JSRuntime *rt)
|
||||
|
||||
if (rt->isAtomsZone(zone))
|
||||
sweepingAtoms = true;
|
||||
|
||||
if (rt->sweepZoneCallback)
|
||||
rt->sweepZoneCallback(zone);
|
||||
}
|
||||
|
||||
ValidateIncrementalMarking(rt);
|
||||
|
@ -147,6 +147,7 @@ JSRuntime::JSRuntime(JSUseHelperThreads useHelperThreads)
|
||||
cxCallback(nullptr),
|
||||
destroyCompartmentCallback(nullptr),
|
||||
destroyZoneCallback(nullptr),
|
||||
sweepZoneCallback(nullptr),
|
||||
compartmentNameCallback(nullptr),
|
||||
activityCallback(nullptr),
|
||||
activityCallbackArg(nullptr),
|
||||
|
@ -953,6 +953,9 @@ struct JSRuntime : public JS::shadow::Runtime,
|
||||
/* Zone destroy callback. */
|
||||
JSZoneCallback destroyZoneCallback;
|
||||
|
||||
/* Zone sweep callback. */
|
||||
JSZoneCallback sweepZoneCallback;
|
||||
|
||||
/* Call this to get the name of a compartment. */
|
||||
JSCompartmentNameCallback compartmentNameCallback;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user