diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index 2ba5bdb7178..dfd9c0483d8 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -2900,6 +2900,17 @@ jit::Invalidate(JSContext *cx, const Vector &invalid, bool cancelOffThread); } +bool +jit::IonScript::invalidate(JSContext *cx, bool resetUses, const char *reason) +{ + JitSpew(JitSpew_IonInvalidate, " Invalidate IonScript %p: %s", this, reason); + Vector list(cx); + if (!list.append(recompileInfo())) + return false; + Invalidate(cx, list, resetUses, true); + return true; +} + bool jit::Invalidate(JSContext *cx, JSScript *script, ExecutionMode mode, bool resetUses, bool cancelOffThread) diff --git a/js/src/jit/IonCode.h b/js/src/jit/IonCode.h index cfab3a599f6..df2b5d19a05 100644 --- a/js/src/jit/IonCode.h +++ b/js/src/jit/IonCode.h @@ -581,6 +581,10 @@ struct IonScript bool invalidated() const { return refcount_ != 0; } + + // Invalidate the current compilation. + bool invalidate(JSContext *cx, bool resetUses, const char *reason); + size_t refcount() const { return refcount_; }