mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 877281 part 5. Add a set() method to Rooted. r=terrence
This commit is contained in:
parent
13fa178ef4
commit
24d0bddba5
@ -579,6 +579,11 @@ class MOZ_STACK_CLASS Rooted : public js::RootedBase<T>
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void set(T value) {
|
||||
JS_ASSERT(!js::RootMethods<T>::poisoned(value));
|
||||
ptr = value;
|
||||
}
|
||||
|
||||
bool operator!=(const T &other) { return ptr != other; }
|
||||
bool operator==(const T &other) { return ptr == other; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user