Closed
Bug 1350933
Opened 9 years ago
Closed 9 years ago
Label dom/filesystem
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: smaug, Assigned: baku)
References
Details
Attachments
(3 files, 1 obsolete file)
|
5.83 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
|
13.40 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
|
11.78 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Reporter | ||
Comment 1•9 years ago
|
||
baku, could you take a look?
Bug 1321812 has the background information.
Flags: needinfo?(amarchesini)
| Assignee | ||
Comment 2•9 years ago
|
||
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attachment #8852042 -
Flags: review?(wmccloskey)
| Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8852044 -
Flags: review?(wmccloskey)
| Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8852046 -
Flags: review?(wmccloskey)
| Assignee | ||
Comment 5•9 years ago
|
||
Note that I cannot call SetEventTargetForActor() if the API is used in workers otherwise I receive a MOZ_CRASH() complaining that the workerID doesn't match with the ID of the IPC message.
Attachment #8852046 -
Attachment is obsolete: true
Attachment #8852046 -
Flags: review?(wmccloskey)
Attachment #8852050 -
Flags: review?(wmccloskey)
Attachment #8852042 -
Flags: review?(wmccloskey) → review+
Comment on attachment 8852044 [details] [diff] [review]
part 2 - DispatchTo{Current,Main}Thread
Review of attachment 8852044 [details] [diff] [review]:
-----------------------------------------------------------------
There's a lot of duplication of the GetParentObject/EventTargetFor/Dispatch code. Can you instead factor it into a common function or something? Or maybe a method on FileSystemEntry (although that wouldn't cover everything)?
::: dom/filesystem/compat/FileSystemDirectoryReader.cpp
@@ +103,5 @@
> + nsIEventTarget* target =
> + mParentEntry->GetParentObject()->EventTargetFor(TaskCategory::Other);
> + MOZ_ASSERT(target);
> +
> + target->Dispatch(runnable.forget(), NS_DISPATCH_NORMAL);
You're missing the NS_WARNING_ASSERTION here.
@@ +167,5 @@
> + nsIEventTarget* target =
> + GetParentObject()->EventTargetFor(TaskCategory::Other);
> + MOZ_ASSERT(target);
> +
> + target->Dispatch(runnable.forget(), NS_DISPATCH_NORMAL);
Same.
::: dom/filesystem/compat/FileSystemRootDirectoryEntry.cpp
@@ +118,5 @@
> + nsIEventTarget* target =
> + GetParentObject()->EventTargetFor(TaskCategory::Other);
> + MOZ_ASSERT(target);
> +
> + target->Dispatch(runnable.forget(), NS_DISPATCH_NORMAL);
You're missing the NS_WARNING_ASSERTION here.
Attachment #8852044 -
Flags: review?(wmccloskey) → review+
Comment on attachment 8852050 [details] [diff] [review]
part 3 - actor
Review of attachment 8852050 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/filesystem/FileSystemTaskBase.cpp
@@ +167,4 @@
> if (HasError()) {
> // In this case we don't want to use IPC at all.
> RefPtr<ErrorRunnable> runnable = new ErrorRunnable(this);
> + target->Dispatch(runnable.forget(), NS_DISPATCH_NORMAL);
NS_WARNING_ASSERTION
@@ +194,5 @@
> mozilla::ipc::BackgroundChild::GetForCurrentThread();
> MOZ_ASSERT(actor);
>
> + if (NS_IsMainThread()) {
> + aActor->SetEventTargetForActor(this, target);
This confused me. Is |aActor| always equal to |actor|? Can we just get rid of |actor|?
::: dom/filesystem/GetFileOrDirectoryTask.cpp
@@ +51,5 @@
>
> return task.forget();
> }
>
> +GetFileOrDirectoryTaskChild::GetFileOrDirectoryTaskChild(nsIGlobalObject* aGlobalObject,
Extra space at the end of the line.
Attachment #8852050 -
Flags: review?(wmccloskey) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d0d8e859a64
Labeling dom/filesystem - part 1 - Runnable, r=billm
https://hg.mozilla.org/integration/mozilla-inbound/rev/611184e06d80
Labeling dom/filesystem - part 2 - DispatchTo{Current,Main}Thread, r=billm
https://hg.mozilla.org/integration/mozilla-inbound/rev/a269457f31c9
Labeling dom/filesystem - part 3 - IPC actors, r=billm
Comment 9•9 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/9d0d8e859a64
https://hg.mozilla.org/mozilla-central/rev/611184e06d80
https://hg.mozilla.org/mozilla-central/rev/a269457f31c9
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•