Closed
Bug 881578
Opened 12 years ago
Closed 12 years ago
Add JSM to hardcoded extensions/mime type list
Categories
(Core Graveyard :: File Handling, defect)
Core Graveyard
File Handling
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla24
People
(Reporter: vladan, Assigned: vladan)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
1.30 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
The MIME type of the .JSM extension isn't hardcoded, so the first time Firefox loads a JSM, it has to initialize the plugin list (nsPluginHost::LoadPlugins) to try to figure out the file's MIME type. This is not the case for .JS files.
It is expensive to initialize the plugin list since it involves stat'ing lots of plugin directories and libraries on the main thread during startup.
Attachment #760681 -
Flags: review?(ehsan)
| Assignee | ||
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Comment on attachment 760681 [details] [diff] [review]
Hardcode the MIME-type of .JSM files
Review of attachment 760681 [details] [diff] [review]:
-----------------------------------------------------------------
::: uriloader/exthandler/nsExternalHelperAppService.cpp
@@ +466,5 @@
> { "application/rtf", "rtf", "Rich Text Format File" },
> { APPLICATION_XPINSTALL, "xpi", "XPInstall Install" },
> { APPLICATION_POSTSCRIPT, "ps,eps,ai", "Postscript File" },
> { APPLICATION_XJAVASCRIPT, "js", "Javascript Source File" },
> + { APPLICATION_XJAVASCRIPT, "jsm", "Javascript Source File" },
Now that you actually asked for my review, here's a nit!
"Javascript Module Source File"
Attachment #760681 -
Flags: review?(ehsan) → review+
| Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•