зеркало из 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 {
|
class AutoJSXDRState {
|
||||||
public:
|
public:
|
||||||
AutoJSXDRState(JSXDRState *x) : xdr(x) {}
|
AutoJSXDRState(JSXDRState *x
|
||||||
~AutoJSXDRState() {
|
JS_GUARD_OBJECT_NOTIFIER_PARAM)
|
||||||
|
: xdr(x)
|
||||||
|
{
|
||||||
|
JS_GUARD_OBJECT_NOTIFIER_INIT;
|
||||||
|
}
|
||||||
|
~AutoJSXDRState()
|
||||||
|
{
|
||||||
JS_XDRDestroy(xdr);
|
JS_XDRDestroy(xdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
operator JSXDRState*() const {
|
operator JSXDRState*() const
|
||||||
|
{
|
||||||
return xdr;
|
return xdr;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
JSXDRState *const xdr;
|
JSXDRState *const xdr;
|
||||||
|
JS_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||||
};
|
};
|
||||||
|
|
||||||
JSScript *
|
JSScript *
|
||||||
|
|
Загрузка…
Ссылка в новой задаче