Bug 867459 - Fix storage rooting hazards r=terrence

This commit is contained in:
David Zbarsky 2013-05-02 22:02:40 -04:00
parent 3a87369b98
commit 13d2098e73
2 changed files with 6 additions and 6 deletions

View File

@ -55,8 +55,8 @@ AsyncStatementJSHelper::getParams(AsyncStatement *aStatement,
NS_ENSURE_SUCCESS(rv, rv);
}
JSObject *obj = nullptr;
rv = aStatement->mStatementParamsHolder->GetJSObject(&obj);
JS::Rooted<JSObject*> obj(aCtx);
rv = aStatement->mStatementParamsHolder->GetJSObject(obj.address());
NS_ENSURE_SUCCESS(rv, rv);
*_params = OBJECT_TO_JSVAL(obj);

View File

@ -108,8 +108,8 @@ StatementJSHelper::getRow(Statement *aStatement,
NS_ENSURE_SUCCESS(rv, rv);
}
JSObject *obj = nullptr;
rv = aStatement->mStatementRowHolder->GetJSObject(&obj);
JS::Rooted<JSObject*> obj(aCtx);
rv = aStatement->mStatementRowHolder->GetJSObject(obj.address());
NS_ENSURE_SUCCESS(rv, rv);
*_row = OBJECT_TO_JSVAL(obj);
@ -147,8 +147,8 @@ StatementJSHelper::getParams(Statement *aStatement,
NS_ENSURE_SUCCESS(rv, rv);
}
JSObject *obj = nullptr;
rv = aStatement->mStatementParamsHolder->GetJSObject(&obj);
JS::Rooted<JSObject*> obj(aCtx);
rv = aStatement->mStatementParamsHolder->GetJSObject(obj.address());
NS_ENSURE_SUCCESS(rv, rv);
*_params = OBJECT_TO_JSVAL(obj);