Closed
Bug 1293126
Opened 8 years ago
Closed 8 years ago
Schemas.load in content's ExtensionContext should be removed
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(firefox51 fixed)
RESOLVED
FIXED
mozilla51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
Details
(Whiteboard: triaged)
Attachments
(1 file)
The use of Schemas.load in ExtensionContent.jsm's ExtensionContext [1] comes with the assumption that the schema can synchronously be loaded. This is only the case if the method is called in the content process *and* if the JSON data is already loaded at the invocation. These dependencies were not explicit but I confirmed that they are true. Schemas.load was refactored in bug 1263011, and now the schema data is immediately available at the start of the content process. In the main process, the schema is loaded asynchronously, so the use of Schemas.load as in [1] is of no use for the Schemas.inject call down a few lines. Note that Schemas.load is useless in the main process, regardless of that patch because of the async loading, and because of the dependency of ExtensionContext on the existence of an extension, which in its turn depends on a loaded extension, which ultimately requires all schemas to be loaded in the main process. Given that Schemas.load in ExtensionContent.jsm is of no use, I'm going to remove it. [1] http://searchfox.org/mozilla-central/rev/389a3e0817b873a64376ec2b65f6807afbba9d8f/toolkit/components/extensions/ExtensionContent.jsm#431
Assignee | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/69878/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/69878/
Attachment #8778721 -
Flags: review?(aswan)
Updated•8 years ago
|
Whiteboard: triaged
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8778721 [details] Bug 1293126 - Remove Schemas.load from content's ExtensionContext https://reviewboard.mozilla.org/r/69878/#review67398 This all seems reasonable to me but Kris knows all the history and context (no pun intended) here much better than I do so I'm going to punt over to him. Also for something like this a try run before landing seems wise.
Attachment #8778721 -
Flags: review?(aswan)
Updated•8 years ago
|
Attachment #8778721 -
Flags: review?(kmaglione+bmo)
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8778721 [details] Bug 1293126 - Remove Schemas.load from content's ExtensionContext https://reviewboard.mozilla.org/r/69878/#review67410
Attachment #8778721 -
Flags: review?(kmaglione+bmo) → review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Pushed by kwierso@gmail.com: https://hg.mozilla.org/integration/autoland/rev/cc089b038c95 Remove Schemas.load from content's ExtensionContext r=kmag
Keywords: checkin-needed
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cc089b038c95
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•