зеркало из https://github.com/mozilla/pjs.git
Another followup to bug 643927 - use the guard-object macro magic to ensure an Auto* class is never temporarily created. r=jwalden
This commit is contained in:
Родитель
1d2a2ef249
Коммит
a750c8a8f4
|
@ -1954,17 +1954,25 @@ class DisablePrincipalsTranscoding {
|
|||
|
||||
class AutoJSXDRState {
|
||||
public:
|
||||
AutoJSXDRState(JSXDRState *x) : xdr(x) {}
|
||||
~AutoJSXDRState() {
|
||||
AutoJSXDRState(JSXDRState *x
|
||||
JS_GUARD_OBJECT_NOTIFIER_PARAM)
|
||||
: xdr(x)
|
||||
{
|
||||
JS_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
}
|
||||
~AutoJSXDRState()
|
||||
{
|
||||
JS_XDRDestroy(xdr);
|
||||
}
|
||||
|
||||
operator JSXDRState*() const {
|
||||
operator JSXDRState*() const
|
||||
{
|
||||
return xdr;
|
||||
}
|
||||
|
||||
private:
|
||||
JSXDRState *const xdr;
|
||||
JS_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||
};
|
||||
|
||||
JSScript *
|
||||
|
|
Загрузка…
Ссылка в новой задаче