mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 905926 - Remove watchpoints on all compartments during shutdown, not just the cx compartment. r=billm
This commit is contained in:
parent
ac7034ec92
commit
42c719e380
@ -191,9 +191,6 @@ JS_ClearWatchPoint(JSContext *cx, JSObject *obj, jsid id,
|
||||
extern JS_PUBLIC_API(bool)
|
||||
JS_ClearWatchPointsForObject(JSContext *cx, JSObject *obj);
|
||||
|
||||
extern JS_PUBLIC_API(bool)
|
||||
JS_ClearAllWatchPoints(JSContext *cx);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
// Raw JSScript* because this needs to be callable from a signal handler.
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "jsscript.h"
|
||||
#include "jsstr.h"
|
||||
#include "jstypes.h"
|
||||
#include "jswatchpoint.h"
|
||||
#include "jsworkers.h"
|
||||
|
||||
#include "gc/Marking.h"
|
||||
@ -270,9 +271,11 @@ js::DestroyContext(JSContext *cx, DestroyContextMode mode)
|
||||
FinishCommonNames(rt);
|
||||
|
||||
/* Clear debugging state to remove GC roots. */
|
||||
for (CompartmentsIter c(rt); !c.done(); c.next())
|
||||
for (CompartmentsIter c(rt); !c.done(); c.next()) {
|
||||
c->clearTraps(rt->defaultFreeOp());
|
||||
JS_ClearAllWatchPoints(cx);
|
||||
if (WatchpointMap *wpmap = c->watchpointMap)
|
||||
wpmap->clear();
|
||||
}
|
||||
|
||||
/* Clear the statics table to remove GC roots. */
|
||||
rt->staticStrings.finish();
|
||||
|
@ -373,16 +373,6 @@ JS_ClearWatchPointsForObject(JSContext *cx, JSObject *obj)
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(bool)
|
||||
JS_ClearAllWatchPoints(JSContext *cx)
|
||||
{
|
||||
if (JSCompartment *comp = cx->compartment()) {
|
||||
if (WatchpointMap *wpmap = comp->watchpointMap)
|
||||
wpmap->clear();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
JS_PUBLIC_API(unsigned)
|
||||
|
Loading…
Reference in New Issue
Block a user