зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1668825 - Move canSkipJsid to JSTracer so it's together with the other tracing options r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D92255
This commit is contained in:
Родитель
19a6dae234
Коммит
2eff6e798b
|
@ -123,18 +123,14 @@ class JS_PUBLIC_API JSTracer {
|
|||
JSTracer(JSRuntime* rt, JS::TracerKind kind,
|
||||
JS::WeakMapTraceAction weakMapAction =
|
||||
JS::WeakMapTraceAction::TraceValues)
|
||||
: runtime_(rt),
|
||||
kind_(kind),
|
||||
weakMapAction_(weakMapAction),
|
||||
traceWeakEdges_(true),
|
||||
#ifdef DEBUG
|
||||
checkEdges_(true),
|
||||
#endif
|
||||
canSkipJsids_(false) {
|
||||
}
|
||||
: runtime_(rt), kind_(kind), weakMapAction_(weakMapAction) {}
|
||||
|
||||
void setTraceWeakEdges(bool value) { traceWeakEdges_ = value; }
|
||||
|
||||
// If this is set to false, then the tracer will skip some jsids
|
||||
// to improve performance. This is needed for the cycle collector.
|
||||
void setCanSkipJsids(bool value) { canSkipJsids_ = value; }
|
||||
|
||||
#ifdef DEBUG
|
||||
// Set whether to check edges are valid in debug builds.
|
||||
void setCheckEdges(bool check) { checkEdges_ = check; }
|
||||
|
@ -146,14 +142,13 @@ class JS_PUBLIC_API JSTracer {
|
|||
const JS::WeakMapTraceAction weakMapAction_;
|
||||
|
||||
// Whether the tracer should trace weak edges. GCMarker sets this to false.
|
||||
bool traceWeakEdges_;
|
||||
bool traceWeakEdges_ = true;
|
||||
|
||||
bool canSkipJsids_ = false;
|
||||
|
||||
#ifdef DEBUG
|
||||
bool checkEdges_;
|
||||
bool checkEdges_ = true;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
bool canSkipJsids_;
|
||||
};
|
||||
|
||||
namespace js {
|
||||
|
@ -290,11 +285,6 @@ class JS_PUBLIC_API CallbackTracer : public js::GenericTracer {
|
|||
virtual void operator()(CallbackTracer* trc, char* buf, size_t bufsize) = 0;
|
||||
};
|
||||
|
||||
protected:
|
||||
// If this is set to false, then the tracer will skip some jsids
|
||||
// to improve performance. This is needed for the cycle collector.
|
||||
void setCanSkipJsids(bool value) { canSkipJsids_ = value; }
|
||||
|
||||
private:
|
||||
// This class implements the GenericTracer interface to dispatches to onChild.
|
||||
virtual bool onObjectEdge(JSObject** objp) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче