Closed
Bug 1287661
Opened 9 years ago
Closed 9 years ago
Investigate the mimeType.rdf usage of helperApp.js
Categories
(Firefox :: File Handling, defect, P2)
Firefox
File Handling
Tracking
()
RESOLVED
FIXED
People
(Reporter: alchen, Assigned: edenchuang)
References
Details
(Whiteboard: [CHE-MVP])
helperApps.js is a consumer of mimeType.rdf. We need to make the function work when we use mimeType.json to replace mimeType.rdf.
![]() |
Reporter | |
Updated•9 years ago
|
Summary: Rewrite helperApps.js to have the ability to use both JSON and RDF file → Revise helperApps.js to to be compatible with both JSON and RDF files
![]() |
Reporter | |
Updated•9 years ago
|
Assignee: nobody → alchen
![]() |
||
Updated•9 years ago
|
Whiteboard: [CHE-MVP]
![]() |
||
Comment 1•9 years ago
|
||
Set priority to P2 because we're going to implement this feature on Firefox 52.
@ Development Schedule: https://docs.google.com/spreadsheets/d/1WznJUt7lLvcZwwry0yvJ_-hw0ZAXTxOOvmYCw74uGKY/edit#gid=0
Priority: -- → P2
![]() |
Reporter | |
Updated•9 years ago
|
Summary: Revise helperApps.js to to be compatible with both JSON and RDF files → Investigate the mimeType.rdf usage of helperApp.js
![]() |
Reporter | |
Updated•9 years ago
|
Assignee: alchen → echuang
Assignee | ||
Comment 2•9 years ago
|
||
Currently we found that HelperApps.js and its related testcases directly access mimeTypes.rdf through nsIRDFService. These actions are not expected, they should be done through the nsIHandlerSerivce. However, nsIHandlerService::store() is useless.
HelperApps.js accesses mimeTypes.rdf to save the file extension attribute. The file extension is not the member of nsIHandlerInfo, but is a member of nsIMIMEInfo which is an extension of nsIHandlerInfo. Because nsIHandlderService only deals the nsIHandlerInfo, this is the root cause why nsIHandlerSerivce::store is useless for saving file extension.
The next step, I will analyze the necessity of saving file extension first. If the answer is yes, I will integrate the file extension saving into nsIHandlerService. Otherwise, the corresponding code in HelperApps.js and its related testcases will be removed.
Assignee | ||
Comment 3•9 years ago
|
||
After investigation, I think we can use nsIHandlerService::Store() to replace the HelperApps.js in nsHelperAppDlg.js. HelperApps.js is used to store the selected handler information into mimeTypes.rdf, and it is almost the same with what nsIHandlerService does. After testing by manually, there is no difference in mimeTypes.rdf results between using HelperApps.js and nsIHandlerService::Store(). So I suggest we can replace HelperApps.js by nsIHandlerService.
Flags: needinfo?(paolo.mozmail)
Comment 4•9 years ago
|
||
(In reply to Eden Chuang[:edenchuang] from comment #3)
> After testing by manually, there
> is no difference in mimeTypes.rdf results between using HelperApps.js and
> nsIHandlerService::Store(). So I suggest we can replace HelperApps.js by
> nsIHandlerService.
Sounds good, we should just ensure that we have automated tests that cover the code path that currently uses HelperApps.js. If there isn't one, we can write one in this bug.
Flags: needinfo?(paolo.mozmail)
Assignee | ||
Comment 5•9 years ago
|
||
The patch implementation will be traced on bug 1287664. HelperApps.js has its own test cases, I will make sure these test cases are passed. Of course, if new test cases are needed, I will also write corresponding one for testing.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•