Closed Bug 1280265 Opened 9 years ago Closed 2 years ago

Add an async version of nsIStyleSheetService.preloadSheet() API

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1348442
Tracking Status
e10s - ---

People

(Reporter: jwkbugzilla, Unassigned)

References

Details

Currently, nsIStyleSheetService.preloadSheet() method will load stylesheets synchronously. While this makes things somewhat easier, the requirement to retrieve the data synchronously is rather awkward with E10S. Adblock Plus will soon use that API with a custom protocol scheme, to work around bug 1187099 among other things. However, the data is in the parent process so in order to implement nsIChannel.open() we'll have to message the parent process synchronously. This means that we'll block the entire content process whenever a new document is created - not a huge issue but still unnecessary. IMHO, it should be possible to add nsIStyleSheetService.preloadSheet() which would do the same thing but load the stylesheet asynchronously and trigger a callback once the load is complete.
See Also: → 1280263, 356503
Priority: -- → P3
Severity: normal → S3
Duplicate of this bug: 1280263

The requested capability was implemented in bug 1348442.

Extensions automatically take advantage of the functionality when content_scripts in manifest.json (or other declarative content script APIs) are used.

Internal Firefox code can use nsIStyleSheetService's preloadSheetAsync and then windowUtils.addSheet with the result.

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1348442
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.