зеркало из https://github.com/mozilla/pjs.git
imported patch storage.remove-statement-state-checks
This commit is contained in:
Родитель
89e8db6b31
Коммит
e3a25dad6a
|
@ -111,10 +111,12 @@ StatementJSHelper::getRow(Statement *aStatement,
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
PRInt32 state;
|
PRInt32 state;
|
||||||
(void)aStatement->GetState(&state);
|
(void)aStatement->GetState(&state);
|
||||||
if (state != mozIStorageStatement::MOZ_STORAGE_STATEMENT_EXECUTING)
|
NS_ASSERTION(state == mozIStorageStatement::MOZ_STORAGE_STATEMENT_EXECUTING,
|
||||||
return NS_ERROR_UNEXPECTED;
|
"Invalid state to get the row object - all calls will fail!");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!aStatement->mStatementRowHolder) {
|
if (!aStatement->mStatementRowHolder) {
|
||||||
nsCOMPtr<mozIStorageStatementRow> row(new StatementRow(aStatement));
|
nsCOMPtr<mozIStorageStatementRow> row(new StatementRow(aStatement));
|
||||||
|
@ -147,10 +149,12 @@ StatementJSHelper::getParams(Statement *aStatement,
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
PRInt32 state;
|
PRInt32 state;
|
||||||
(void)aStatement->GetState(&state);
|
(void)aStatement->GetState(&state);
|
||||||
if (state != mozIStorageStatement::MOZ_STORAGE_STATEMENT_READY)
|
NS_ASSERTION(state == mozIStorageStatement::MOZ_STORAGE_STATEMENT_READY,
|
||||||
return NS_ERROR_UNEXPECTED;
|
"Invalid state to get the params object - all calls will fail!");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!aStatement->mStatementParamsHolder) {
|
if (!aStatement->mStatementParamsHolder) {
|
||||||
nsCOMPtr<mozIStorageStatementParams> params =
|
nsCOMPtr<mozIStorageStatementParams> params =
|
||||||
|
|
Загрузка…
Ссылка в новой задаче