Closed
Bug 750243
Opened 12 years ago
Closed 12 years ago
Make sure target.currentURI is not null before saving an image
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox14 verified, firefox15 verified, firefox16 verified, firefox17 verified, blocking-fennec1.0 +)
VERIFIED
FIXED
Firefox 15
People
(Reporter: mfinkle, Assigned: mfinkle)
References
Details
Attachments
(1 file)
3.91 KB,
patch
|
wesj
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
We never check for a null URI before saving the image: http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#1197
Assignee | ||
Comment 2•12 years ago
|
||
This patch uses a more stringent selector logic to allow the image to be saved. The image must have a currentURI and must be loaded. This matches desktop and XUL fennec behavior: http://mxr.mozilla.org/mozilla-central/source/mobile/xul/chrome/content/content.js#876 http://mxr.mozilla.org/mozilla-central/source/browser/base/content/nsContextMenu.js#521 The patch also removes a lookup for browser, since we already have access to the documentURIObject, like desktop: http://mxr.mozilla.org/mozilla-central/source/browser/base/content/nsContextMenu.js#1112 Tested and it works.
Assignee: nobody → mark.finkle
Attachment #619561 -
Flags: review?(wjohnston)
Comment 3•12 years ago
|
||
Comment on attachment 619561 [details] [diff] [review] patch Review of attachment 619561 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/chrome/content/browser.js @@ +1188,5 @@ > try { > String(props.get("content-disposition", Ci.nsISupportsCString)); > String(props.get("type", Ci.nsISupportsCString)); > } catch(ex) { } > + ContentAreaUtils.internalSave(aTarget.currentURI.spec, null, null, contentDisposition, type, false, "SaveImageTitle", null, aTarget.ownerDocument.documentURIObject, true, null); Aha! I've been wondering why this was wrong sometimes.
Attachment #619561 -
Flags: review?(wjohnston) → review+
Assignee | ||
Comment 4•12 years ago
|
||
This patch defends against the crash in bug 741432
blocking-fennec1.0: --- → ?
Assignee | ||
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/76299fb5d499
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 15
Comment 6•12 years ago
|
||
Aurora nom?
Assignee | ||
Comment 8•12 years ago
|
||
Comment on attachment 619561 [details] [diff] [review] patch [Approval Request Comment] Regression caused by (bug #): native rewrite User impact if declined: potential crash when trying to save an image Testing completed (on m-c, etc.): dev testing and it's on m-c Risk to taking this patch (and alternatives if risky):potential crash String changes made by this patch: none
Attachment #619561 -
Flags: approval-mozilla-aurora?
Updated•12 years ago
|
Attachment #619561 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 9•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/0f21b590e841
status-firefox14:
--- → fixed
status-firefox15:
--- → fixed
Assignee | ||
Updated•12 years ago
|
blocking-fennec1.0: ? → +
Updated•12 years ago
|
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•