Rename and update mozStorageEvents.* to mozStorageAsyncStatementExecution.*

RESOLVED FIXED in mozilla1.9.2a1

Status

()

defect
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: sdwilsh, Assigned: sdwilsh)

Tracking

Trunk
mozilla1.9.2a1
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Posted patch v1.0Splinter Review
I want to update the style (not much work needed), as well as refactor things slightly to make modifications easier in the future (and to make the code easier to follow (hopefully).

Changes I'm making:
1) runEvent is now shouldNotify
2) got rid of the pure virtual interface for runEvent.
3) state enum is now defined as a part of AsyncExecuteStatements
4) NS_executeAsync is no more.  Now a static method on AsyncExecuteStatements called execute
Attachment #373762 - Flags: review?(bugmail)
Blocks: 488148
Whiteboard: [needs review asuth]
Comment on attachment 373762 [details] [diff] [review]
v1.0

>diff --git a/storage/src/mozStorageEvents.cpp b/storage/src/mozStorageAsyncStatementExecution.cpp
>rename from storage/src/mozStorageEvents.cpp
>rename to storage/src/mozStorageAsyncStatementExecution.cpp
>--- a/storage/src/mozStorageEvents.cpp
>+++ b/storage/src/mozStorageAsyncStatementExecution.cpp

>+nsresult
>+AsyncExecuteStatements::notifyResults()
>+{
>+  NS_ASSERTION(mCallback, "notifyResults called without a callback!");
>+
>+  nsRefPtr<CallbackResultNotifier> notifier =
>+    new CallbackResultNotifier(mCallback, mResultSet, this);
>+  NS_ENSURE_TRUE(notifier, NS_ERROR_OUT_OF_MEMORY);
>+
>+  nsresult rv = mCallingThread->Dispatch(notifier, NS_DISPATCH_NORMAL);
>+  if (NS_SUCCEEDED(rv))
>+    mResultSet = nsnull; // we no longer own it on success
>+  return rv;
>+};
   ^
extra semi-colon, gcc explosions.
Attachment #373762 - Flags: review?(bugmail) → review+
eww...how did that happen?  Will fix when I check in tomorrow.
Whiteboard: [needs review asuth] → [can land]
http://hg.mozilla.org/mozilla-central/rev/54a5878ac368
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [can land]
You need to log in before you can comment on or make changes to this bug.