Closed Bug 1006562 Opened 11 years ago Closed 11 years ago

WorkerDataStoreCursor.store should be equal to the WorkerDataStore which owns the cursor

Categories

(Core :: DOM: Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: airpingu, Assigned: airpingu)

References

Details

Attachments

(2 files, 2 obsolete files)

This is a follow-up for bug 949325. We need to fix the test of: is(cursor.store, gStore, "Cursor.store is the store"); in the file_sync_worker.js. The tricky part is cursor.store will return a newly created WorkerDataStore shell which proxie to the real DataStore. However, we shouldn't create a new WorkerDataStore to return. Instead, we should return the WorkerDataStore which owns the WorkerDataStoreCursor. I already had a patch for this. Will upload it tomorrow.
Forgot to clean up the CC list when cloning. Sorry for the noise.
Keywords: dev-doc-needed
Blocks: 1006566
Assignee: nobody → gene.lian
Attached patch Part 1, minor code clean-up (obsolete) (deleted) — Splinter Review
Attachment #8418492 - Flags: review?(amarchesini)
Comment on attachment 8418492 [details] [diff] [review] Part 1, minor code clean-up Review of attachment 8418492 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/workers/DataStore.cpp @@ +360,5 @@ > } > }; > > +// A DataStoreRunnable to run DataStore::Clear(...) on the main thread. > +class DataStoreClearRunnable MOZ_FINAL : public DataStoreRunnable I just move DataStoreClearRunnable to a better place which collects all the runnables, so that the real API implementations can be listed consecutively and to be viewed easily.
Flags: in-testsuite+
Attachment #8418493 - Flags: review?(amarchesini) → review+
Comment on attachment 8418492 [details] [diff] [review] Part 1, minor code clean-up Review of attachment 8418492 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/workers/DataStore.cpp @@ +36,5 @@ > { > JSContext* cx = aGlobal.GetContext(); > WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(cx); > MOZ_ASSERT(workerPrivate); > workerPrivate->AssertIsOnWorkerThread(); Why all of this if you want to call NS_NOTREACHED immediately after?
(In reply to Andrea Marchesini (:baku) from comment #5) > Comment on attachment 8418492 [details] [diff] [review] > Part 1, minor code clean-up > > Review of attachment 8418492 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/workers/DataStore.cpp > @@ +36,5 @@ > > { > > JSContext* cx = aGlobal.GetContext(); > > WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(cx); > > MOZ_ASSERT(workerPrivate); > > workerPrivate->AssertIsOnWorkerThread(); > > Why all of this if you want to call NS_NOTREACHED immediately after? Yeap, we can remove these.
Attached patch Part 1, minor code clean-up, V1.1 (obsolete) (deleted) — Splinter Review
Attachment #8418492 - Attachment is obsolete: true
Attachment #8418492 - Flags: review?(amarchesini)
Attachment #8418553 - Flags: review?(amarchesini)
Sorry, wrong patch. This one is correct.
Attachment #8418553 - Attachment is obsolete: true
Attachment #8418553 - Flags: review?(amarchesini)
Attachment #8418555 - Flags: review?(amarchesini)
Attachment #8418555 - Flags: review?(amarchesini) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: