FirefoxOS/Device Storage/Worker Design: Difference between revisions

Jump to navigation Jump to search
→‎Expose DOMRequest to workers: Add DOMCursor to dependencies
(add notes about file watcher notifications)
(→‎Expose DOMRequest to workers: Add DOMCursor to dependencies)
Line 1: Line 1:
= Phase 1 =
= Phase 1 =


== Expose DOMRequest to workers ==
== Expose DOMRequest and DOMCursor to workers ==


See [https://bugzilla.mozilla.org/show_bug.cgi?id=1167650 bug 1167650].
See [https://bugzilla.mozilla.org/show_bug.cgi?id=1167650 bug 1167650].


DOMRequest is currently only accessible on the main thread. It be supported by workers we must:
DOMRequest and DOMCursor are currently only accessible on the main thread. It be supported by workers we must:


# Allow it to be constructed using nsIGlobalObject* (fed into DOMEventTargetHelper) in addition to nsPIDOMWindow*. The underlying Promise needs that to get a JS context and check state.
# Allow DOMRequest/DOMCursor to be constructed using nsIGlobalObject* (fed into DOMEventTargetHelper) in addition to nsPIDOMWindow*. The underlying Promise needs that to get a JS context and check state.
# DOMRequestService::FireSuccessAsync (FireSuccessAsyncTask by extension) and DOMRequestService::FireErrorAsync must be changed to dispatch to the current thread and remove the assert checks for main thread. mozilla::ThreadsafeAutoSafeJSContext should be switched for AutoJSAPI and Init(nsIGlobalObject*) (gotten from DOMRequest::GetParentObject); this will assert that the current thread is owning thread.
# DOMRequestService::FireSuccessAsync (FireSuccessAsyncTask by extension) and DOMRequestService::FireErrorAsync must be changed to dispatch to the current thread and remove the assert checks for main thread. mozilla::ThreadsafeAutoSafeJSContext should be switched for AutoJSAPI and Init(nsIGlobalObject*) (gotten from DOMRequest::GetParentObject); this will assert that the current thread is owning thread.
# Add Exposed=(Window,Worker) to the WebIDL definition.
# Add Exposed=(Window,Worker) to the WebIDL definitions.


== Ensure volume service is thread safe ==
== Ensure volume service is thread safe ==
24

edits

Navigation menu