Closed
Bug 1150160
Opened 10 years ago
Closed 10 years ago
Support import of apps as memory blobs.
Categories
(Core Graveyard :: DOM: Apps, defect, P1)
Tracking
(firefox40 fixed)
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: fabrice, Assigned: fabrice)
References
Details
(Whiteboard: [spark])
Attachments
(1 file)
7.85 KB,
patch
|
marco
:
review+
justindarc
:
feedback+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Justin, do you mind testing that for lightsaber? That removes the need to save blobs on the sd-card and to grand the sd-card permissions to all apps.
Attachment #8586915 -
Flags: feedback?(jdarcangelo)
Comment 2•10 years ago
|
||
Comment on attachment 8586915 [details] [diff] [review]
import-memory-blob.patch
Review of attachment 8586915 [details] [diff] [review]:
-----------------------------------------------------------------
Seems to work for me. Thanks!
Attachment #8586915 -
Flags: feedback?(jdarcangelo) → feedback+
Assignee | ||
Updated•10 years ago
|
Attachment #8586915 -
Flags: review?(ferjmoreno)
Updated•10 years ago
|
Comment 4•10 years ago
|
||
Comment on attachment 8586915 [details] [diff] [review]
import-memory-blob.patch
Review of attachment 8586915 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/apps/ImportExport.jsm
@@ +37,5 @@
> const PR_CREATE_FILE = 0x08;
> const PR_TRUNCATE = 0x20;
>
> function debug(aMsg) {
> +//#ifdef DEBUG
I guess you used this to debug problems while working on the patch, but should be removed now.
@@ +246,5 @@
> + return new Promise((aResolve, aReject) => {
> + let reader = Cc['@mozilla.org/files/filereader;1']
> + .createInstance(Ci.nsIDOMFileReader);
> + reader.onloadend = () => {
> + Cu.import("resource://gre/modules/osfile.jsm");
Nit: could you use a lazy module getter?
@@ +248,5 @@
> + .createInstance(Ci.nsIDOMFileReader);
> + reader.onloadend = () => {
> + Cu.import("resource://gre/modules/osfile.jsm");
> + let path = OS.Path.join(OS.Constants.Path.tmpDir, "blob-" +
> + this._tmpId + ".zip");
You could use openUnique to generate a file with a unique file name: https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/OSFile.jsm/OS.File_for_the_main_thread#OS.File.openUnique%28%29
Attachment #8586915 -
Flags: review?(ferjmoreno) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
The file should be closed after being opened here: https://hg.mozilla.org/integration/b2g-inbound/rev/557609749a57#l1.55
Since you've opened it, you could also directly use |file.write| instead of |writeAtomic|.
Comment 7•10 years ago
|
||
Backed out in https://hg.mozilla.org/integration/b2g-inbound/rev/a586f075e7d0 for Windows "Memory blob processed. - got "[object Object]", expected "InvalidZip""
Assignee | ||
Comment 8•10 years ago
|
||
fixed the issues, try run at :
https://treeherder.mozilla.org/#/jobs?repo=try&revision=20cb8264e40d
pushed:
https://hg.mozilla.org/integration/b2g-inbound/rev/f69003e17520
Comment 9•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Updated•10 years ago
|
Whiteboard: [lightsaber] → [ignite]
Updated•10 years ago
|
Whiteboard: [ignite] → [spark]
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•