Closed
Bug 1360603
Opened 8 years ago
Closed 7 years ago
Mark Save as... channels used for download as throttleable
Categories
(Toolkit :: Downloads API, defect, P1)
Toolkit
Downloads API
Tracking
()
RESOLVED
FIXED
mozilla58
People
(Reporter: mayhemer, Assigned: amchung)
References
Details
Attachments
(2 files, 5 obsolete files)
(deleted),
patch
|
amchung
:
review+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
amchung
:
review+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
(In reply to :Paolo Amadini from comment #12)
> It seems to me that downloads started via nsIWebBrowserPersist are still not
> throttled. These may include downloads started by "Save Page As" or "Save
> Link As".
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Comment 1•7 years ago
|
||
Looks like we want to add the Throttleable class somewhere at https://dxr.mozilla.org/mozilla-central/rev/c01aa84ded7eb0b3e691f8bcc5cd887c960a779e/dom/webbrowserpersist/nsWebBrowserPersist.cpp#1497
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → amchung
Assignee | ||
Comment 3•7 years ago
|
||
Hi Nick,
I had set the class flags as throttleable when using save channel.
Would you help me to review my patch?
Thanks!
Attachment #8904930 -
Flags: review?(hurley)
Comment on attachment 8904930 [details] [diff] [review]
implementation -- Marked the save channel as throttleable.
Review of attachment 8904930 [details] [diff] [review]:
-----------------------------------------------------------------
This looks generally reasonable to me, but I don't know nsWebBrowserPersist at all. You need to have a dom peer review this.
::: dom/webbrowserpersist/nsWebBrowserPersist.cpp
@@ +1526,5 @@
> // Add the output transport to the output map with the channel as the key
> nsCOMPtr<nsISupports> keyPtr = do_QueryInterface(aChannel);
> mOutputMap.Put(keyPtr, new OutputData(aFile, mURI, aCalcFileExt));
>
> + // Remove throttleable when save channel which finishs the saving work.
"Remove throttleable flag when the save channel finishes"
Attachment #8904930 -
Flags: review?(hurley) → feedback+
Assignee | ||
Comment 5•7 years ago
|
||
Hi Nathan,
I had set the class flags as throttleable when using save channel.
Would you help me to review my patch?
Thanks!
Attachment #8904930 -
Attachment is obsolete: true
Attachment #8906934 -
Flags: review?(nfroyd)
Assignee | ||
Comment 6•7 years ago
|
||
Comment on attachment 8906934 [details] [diff] [review]
implementation -- Marked the save channel as throttleable.
Hi Ehsan,
I had set the class flags as throttleable when using save channel.
Would you help me to review my patch?
Thanks!
Attachment #8906934 -
Flags: review?(nfroyd) → review?(ehsan)
Assignee | ||
Comment 7•7 years ago
|
||
Comment on attachment 8906934 [details] [diff] [review]
implementation -- Marked the save channel as throttleable.
Hi Bobby,
I had set the class flags as throttleable when using save channel.
Would you help me to review my patch?
Thanks!
Attachment #8906934 -
Flags: review?(ehsan) → review?(bobbyholley)
Comment 8•7 years ago
|
||
Comment on attachment 8906934 [details] [diff] [review]
implementation -- Marked the save channel as throttleable.
I don't know this code and don't have cycles to dig into it right now - sorry about that.
Attachment #8906934 -
Flags: review?(bobbyholley)
Assignee | ||
Comment 9•7 years ago
|
||
Comment on attachment 8906934 [details] [diff] [review]
implementation -- Marked the save channel as throttleable.
Hi Baku,
I had set the class flags as throttleable when using save channel.
Would you help me to review my patch?
Thanks!
Attachment #8906934 -
Flags: review?(amarchesini)
Updated•7 years ago
|
Attachment #8906934 -
Flags: review?(amarchesini) → review+
Comment 10•7 years ago
|
||
Comment on attachment 8906934 [details] [diff] [review]
implementation -- Marked the save channel as throttleable.
Review of attachment 8906934 [details] [diff] [review]:
-----------------------------------------------------------------
mayhemer do you have time to take a look at this ClearClassFlags()?
::: dom/webbrowserpersist/nsWebBrowserPersist.cpp
@@ +1498,5 @@
> return StartUpload(bufferedInputStream, aFile, contentType);
> }
>
> + // Mark save channel as throttleable.
> + nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(aChannel));
if (cos) { ...
@@ +1527,5 @@
> nsCOMPtr<nsISupports> keyPtr = do_QueryInterface(aChannel);
> mOutputMap.Put(keyPtr, new OutputData(aFile, mURI, aCalcFileExt));
>
> + // Remove throttleable flag when the save channel finishes.
> + cos->ClearClassFlags(nsIClassOfService::Throttleable);
Why clearing this flag here? The operation is async.
Attachment #8906934 -
Flags: review+ → review-
Assignee | ||
Comment 11•7 years ago
|
||
Hi Baku,
I have modified the patch as below:
1. Added a confirmation for verifying cos is null or not.
2. Removed the removing throttleable flag.
Would you help me to review this patch?
Thanks!
Attachment #8906934 -
Attachment is obsolete: true
Attachment #8908467 -
Flags: review?(amarchesini)
Updated•7 years ago
|
Target Milestone: --- → mozilla57
Updated•7 years ago
|
Status: NEW → ASSIGNED
Updated•7 years ago
|
Attachment #8908467 -
Flags: review?(amarchesini) → review+
Reporter | ||
Comment 12•7 years ago
|
||
Comment on attachment 8908467 [details] [diff] [review]
implementation -- Marked the save channel as throttleable.
This patch looks fine, thanks!
Assignee | ||
Comment 13•7 years ago
|
||
Hi Baku,
I have finished the test case, and I found browser_saveImageURL.js which is the better test case to confirm throttleable flag.
Would you help me to review my patch?
Thanks!
Attachment #8909932 -
Flags: review?(amarchesini)
Updated•7 years ago
|
Attachment #8909932 -
Flags: review?(amarchesini) → review+
Reporter | ||
Comment 14•7 years ago
|
||
This seems ready to land, please also request 57 approval (beta), thanks!
Assignee | ||
Comment 15•7 years ago
|
||
Attachment #8908467 -
Attachment is obsolete: true
Attachment #8911490 -
Flags: review+
Assignee | ||
Comment 16•7 years ago
|
||
Attachment #8911490 -
Attachment is obsolete: true
Attachment #8911497 -
Flags: review+
Assignee | ||
Comment 17•7 years ago
|
||
Attachment #8909932 -
Attachment is obsolete: true
Attachment #8911498 -
Flags: review+
Assignee | ||
Comment 18•7 years ago
|
||
Keywords: checkin-needed
Assignee | ||
Comment 19•7 years ago
|
||
Comment on attachment 8911497 [details] [diff] [review]
implementation -- Marked the save channel as throttleable.
Approval Request Comment
[Feature/Bug causing the regression]:unknown
[User impact if declined]:unknown
[Is this code covered by automated tests?]:no
[Has the fix been verified in Nightly?]:no
[Needs manual test from QE? If yes, steps to reproduce]:unknown
[List of other uplifts needed for the feature/fix]:none
[Is the change risky?]:no
[Why is the change risky/not risky?]:Added a throttleable flags in saving channel.
[String changes made/needed]:none
Attachment #8911497 -
Flags: approval-mozilla-beta?
Assignee | ||
Comment 20•7 years ago
|
||
Comment on attachment 8911498 [details] [diff] [review]
test case -- Confirmed the Throttleable flag on browser_saveImageURL.js
Approval Request Comment
[Feature/Bug causing the regression]:unknown
[User impact if declined]:unknown
[Is this code covered by automated tests?]:no
[Has the fix been verified in Nightly?]:no
[Needs manual test from QE? If yes, steps to reproduce]: unknown
[List of other uplifts needed for the feature/fix]:none
[Is the change risky?]:no
[Why is the change risky/not risky?]: Modified the test case for confirming throttleable flag on browser_saveImageURL.js
[String changes made/needed]:none
Attachment #8911498 -
Flags: approval-mozilla-beta?
Updated•7 years ago
|
Comment 21•7 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d409c2ac7d88
Mark the save channel as throttleable. r=baku
https://hg.mozilla.org/integration/mozilla-inbound/rev/6d7610f4d26d
Confirm the Throttleable flag on browser_saveImageURL.js. r=baku
Keywords: checkin-needed
Comment 22•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d409c2ac7d88
https://hg.mozilla.org/mozilla-central/rev/6d7610f4d26d
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Comment 23•7 years ago
|
||
> [Feature/Bug causing the regression]:unknown
> [User impact if declined]:unknown
> [Needs manual test from QE? If yes, steps to reproduce]:unknown
Could you please be a bit more explicit here?
We need these information to make a call if it is worth taking the risk to uplift that to beta.
Thanks
Flags: needinfo?(amchung)
Assignee | ||
Comment 24•7 years ago
|
||
Hi,
(In reply to Sylvestre Ledru [:sylvestre] from comment #23)
> > [Feature/Bug causing the regression]:none
This bug is similar to Bug 1348062, the patches of bug 1348062 seems not to occur the regression bugs.
> > [User impact if declined]:none
> > [Needs manual test from QE? If yes, steps to reproduce]:none
The behavior of this patch is set throttleable flags when user uses "save as.." function, can't use manual test to verify the effect.
> Could you please be a bit more explicit here?
> We need these information to make a call if it is worth taking the risk to
> uplift that to beta.
> Thanks
Flags: needinfo?(amchung)
Comment 25•7 years ago
|
||
Comment on attachment 8911498 [details] [diff] [review]
test case -- Confirmed the Throttleable flag on browser_saveImageURL.js
OK, thanks. Let's take it then!
Should be in 57b4 (gtb tomorrow Thursday)
Attachment #8911498 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 26•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/cc0f6c992a6c
https://hg.mozilla.org/releases/mozilla-beta/rev/70517fee99a3
Flags: in-testsuite+
Updated•7 years ago
|
Attachment #8911497 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in
before you can comment on or make changes to this bug.
Description
•