diff --git a/js/public/RootingAPI.h b/js/public/RootingAPI.h index 00634fc5a68..5ad008cf17d 100644 --- a/js/public/RootingAPI.h +++ b/js/public/RootingAPI.h @@ -579,6 +579,11 @@ class MOZ_STACK_CLASS Rooted : public js::RootedBase return ptr; } + void set(T value) { + JS_ASSERT(!js::RootMethods::poisoned(value)); + ptr = value; + } + bool operator!=(const T &other) { return ptr != other; } bool operator==(const T &other) { return ptr == other; }