Closed
Bug 791367
Opened 10 years ago
Closed 10 years ago
nsDOMFileReader::ReadFileContent opens a channel without associating it with a load group
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file, 1 obsolete file)
1.42 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsDOMFileReader.cpp#413 Boris, should we grab the global object for the JSContext, get the window out of it and go through the ugliness to get to a load group?
Assignee | ||
Updated•10 years ago
|
Blocks: pbchannelfail
Comment 1•10 years ago
|
||
Getting loadgroup from GetOwner()->GetExtandDoc() would be more correct.
Comment 2•10 years ago
|
||
GetExtantDoc
![]() |
||
Comment 3•10 years ago
|
||
What Olli said: the FileReader is associated with a window, so we should use that window's loadgroup.
Assignee | ||
Comment 4•10 years ago
|
||
Like this?
Comment 5•10 years ago
|
||
Comment on attachment 661384 [details] [diff] [review] Patch (v1) Could you make this. nsCOMPtr<nsILoadGroup> loadGroup; if (HasOrHasHadOwner()) { NS_ENSURE_STATE(GetOwner()); nsIDocument* doc = GetOwner()->GetExtantDoc(); if (doc) { loadGroup = doc->GetDocumentLoadGroup(); } } rv = NS_NewChannel(getter_AddRefs(mChannel), uri, nullptr, loadGroup); (if we need similar thing more often, we could add a helper method to nsDOMEventTargetHelper)
Attachment #661384 -
Flags: review?(bugs) → review+
Will this make FileReader spin the network activity spinner on the tab?
![]() |
||
Comment 7•10 years ago
|
||
Yes, if you're not setting the LOAD_BACKGROUND flag. Which you probably should be.
![]() |
||
Comment 8•10 years ago
|
||
Unless you want progress notifications for it...
We don't need nsIProgressEventSink notifications, but we do need OnDataAvailable.
Comment on attachment 661384 [details] [diff] [review] Patch (v1) r- until you sort out the throbber stuff
Attachment #661384 -
Flags: review-
![]() |
||
Comment 11•10 years ago
|
||
LOAD_BACKGROUND gets OnDataAvailable; just not nsIProgressEventSink stuff.
Assignee | ||
Comment 12•10 years ago
|
||
This should address both Olli's and Kyle's concerns.
Attachment #661384 -
Attachment is obsolete: true
Attachment #661994 -
Flags: review?
Assignee | ||
Updated•10 years ago
|
Attachment #661994 -
Flags: review? → review?(khuey)
Comment on attachment 661994 [details] [diff] [review] Patch (v2) Review of attachment 661994 [details] [diff] [review]: ----------------------------------------------------------------- r=me provided you've tested that this makes the spinner not spin. Thanks for doing this.
Attachment #661994 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 14•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4b9ae51cb797
Target Milestone: --- → mozilla18
Comment 15•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4b9ae51cb797
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•