Closed Bug 1006919 Opened 10 years ago Closed 10 years ago

[Gallery] Remove work around to generate and pass file backed blob for pick activity inside gallery.js

Categories

(Firefox OS Graveyard :: Gaia::Gallery, defect)

x86
macOS
defect
Not set
normal

Tracking

(b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
2.0 S2 (23may)
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: pdahiya, Assigned: pdahiya)

Details

Attachments

(1 file)

As fix of Bug 975599, we used a workaround to pass a file backed blob in pendingPick.postResult. Workaround saves the blob to a temporary file in device storage and then reads that file back and passes that to endPick in gallery.js.

With the fix of bug 982779, we can remove convertToFileBackedBlob function and use cropped region memory-backed blob directly.
Assignee: nobody → pdahiya
Hi David,

I have removed the workaround for bug 975599 from gallery.js. Please review.

Thanks
Attachment #8418970 - Flags: review?(dflanagan)
Comment on attachment 8418970 [details] [review]
PR with fix of bug 1006919

The patch looks good.

Please verify that landing this patch does not bring bug 975599 back.

We'll need to uplift this to 1.4 as well, since the gecko bug was fixed there.

Note that removing this workaround means that if the user has temporary files stored in .gallery/tmp/ when they upgrade from 1.3 or 1.3T to a newer release, those files will never be deleted.  I'm okay with that, though. It seems simpler to live with it than to take the risk of adding the extra code needed to detect and delete those stranded files.
Attachment #8418970 - Flags: review?(dflanagan) → review+
Nominating this for 1.4 since it is a pretty huge workaround that is no longer needed on the v1.4 branch.
blocking-b2g: --- → 1.4?
Punam: could you also check on the patch that landed in bug 949941?  I think that is something we want to keep (because it is more efficient to pass the file that we're saving anyway). But just want to make sure that there are not workarounds there that we could also remove as part of this patch.
Attachment #8418970 - Flags: approval-gaia-v1.4+
blocking-b2g: 1.4? → ---
Verified landing this patch does not bring bug 975599 back, patch landed on  master
https://github.com/mozilla-b2g/gaia/commit/44fed8d50581dfc3b61386c77531aeba7f6c5f38
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
(In reply to David Flanagan [:djf] from comment #4)
> Punam: could you also check on the patch that landed in bug 949941?  I think
> that is something we want to keep (because it is more efficient to pass the
> file that we're saving anyway). But just want to make sure that there are
> not workarounds there that we could also remove as part of this patch.

I walked through 949941 patch, and we are saving files even before 949941 patch when memory backed blobs were used. We are doing refetchImage as an extra step to read file backed blob as addNamed does not give us File Handle but this is not a workaround and IMO should be ok considering we are passing the file that we are saving. 
https://github.com/mozilla-b2g/gaia/pull/17136/files#diff-0eef4fb5c22c93bb9dbce7eb56edf5a6R68

Thanks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: