Commit Graph

238 Commits

Author SHA1 Message Date
Boris Zbarsky
0f52bda7da Bug 1453053 part 3. Remove JS QIs to nsIMessageSender. r=qdot
MozReview-Commit-ID: 4TS38gebl7l
2018-04-12 00:06:25 -04:00
Kris Maglione
e9dca3c017 Bug 1451058: Follow-up: Fix some errors that show up during tests. r=me
MozReview-Commit-ID: K410z6VdHov
2018-04-06 16:34:15 -07:00
Kris Maglione
4c402a31f9 Bug 1451215: Run codespell on code. r=aswan
MozReview-Commit-ID: HIilZTKcQUY
2018-04-03 22:22:07 -07:00
Kris Maglione
f373de248e Bug 1420485: Follow-up: Remove unnecessary single-use stringToCryptoHash function. r=me
MozReview-Commit-ID: H1tPnsN0v2J
2018-03-11 22:25:56 -07:00
Florian Quèze
f1a55f73f8 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Boris Zbarsky
e59f740ee6 Bug 1437921 part 2. Switch document_idle to use the documentReadyForIdle promise. r=kmag
MozReview-Commit-ID: 9cJ1cGuMzBJ
2018-02-22 16:55:40 -05:00
Andrew McCreight
272cee1e65 Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG
2018-02-06 09:36:57 -08:00
Luca Greco
2d6facde38 Bug 1420485 - Reduce memory usage related to the tabs.insertCSS cssCode urls. r=mixedpuppy
This patch introduces a cache of blob urls which are related to the cssCode
injected by the extensions using tabs.insertCSS, which aims to reduce the
amount of memory used by the extensions to store the cssCode injected
into the tabs and their subframes in the content child process.

The generated Blob URL are associated to the extension principal,
so that it is easier to identify in the about:memory reports
which is extension that is using the cached data.

MozReview-Commit-ID: ERhR5nmVMqY
2017-11-24 19:17:33 +01:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Kris Maglione
c8ea1d4273 Bug 1421459: Update to ESLint 4 "indent" rule. r=aswan
MozReview-Commit-ID: LxLDWlsIlSk
2017-11-28 14:13:59 -08:00
Kris Maglione
5620aa14ff Remove unused imports. r=trivial (no bug)
MozReview-Commit-ID: EEVSPkAgORY
2017-11-09 16:39:57 -08:00
Mark Banner
45b0812566 Bug 1412893 - Change instances of using getService to Services.jsm where possible in toolkit/components - Part 1. r=mossop
MozReview-Commit-ID: BBnacIvRJBR
2017-10-30 16:29:58 +00:00
Kris Maglione
20c0bee14c Bug 1402944: Part 11 - Use number rather than string value for getUniqueId(). r=mixedpuppy
This allows us to avoid a fairly expensive stringification/string allocation
when calling getUniqueId(), which is helpful. It also allows us to avoid
atomizing the ID string when storing it in a Set or Map, which is even more
helpful. And, of course, it makes comparisons faster.

MozReview-Commit-ID: 8wMc6TdhzfY
2017-09-25 15:00:17 -07:00
Kris Maglione
89ccbf3bf9 Bug 1379148: Part 3 - Inject scripts synchronously if they're already available. r=mixedpuppy
MozReview-Commit-ID: J6vheuxsqJR
2017-09-20 17:00:44 -07:00
Kris Maglione
88c51fe789 Bug 1398630: Follow-up: Fix typo. r=me
MozReview-Commit-ID: 7Wv2WPWRC4L
2017-09-11 16:09:58 -07:00
Kris Maglione
19017b8170 Bug 1398630: Part 7 - Random cleanup. r=zombie
MozReview-Commit-ID: LibtXDKXrnA
2017-09-10 15:37:08 -07:00
Kris Maglione
bb1850dc22 Bug 1398630: Part 2 - Avoid unnecessary Map/Set lookups. r=zombie
We currently call has() every time we do a DefaultMap/DefaultWeakMap lookup,
which unfortunately shows up a lot in profiles. We only actually need to
check, though, if get() returns an undefined value.

Similar things in other places, where we only need to do a has() call if
another operation fails.

MozReview-Commit-ID: 9qFWsb4vlZj
2017-09-10 15:39:49 -07:00
Kris Maglione
877f3c7535 Bug 1398630: Part 1 - Remove/cleanup some old ExtensionUtils helpers. r=zombie
MozReview-Commit-ID: FeLUjH7pkiB
2017-09-10 15:39:28 -07:00
Kris Maglione
db3feb1eb4 Bug 1397448: Part 6 - Cache messageManager for MessageManagerProxy. r=mixedpuppy
MozReview-Commit-ID: 7eqSgBkrj4f
2017-09-08 21:36:00 -07:00
Kris Maglione
0f0ab00a58 Bug 1397448: Part 5 - Make uniqueProcessID a lexically scoped string. r=zombie
MozReview-Commit-ID: Fxob3RUPQtd
2017-09-08 17:12:43 -07:00
Kris Maglione
be161e68b4 Bug 1391110: Part 4 - Remove unnecessary nsIFrameLoaderOwner QIs. r=smaug
The FrameLoaderOwner interface has been implemented in WebIDL for several
years now, so these QIs are simply unnecessary overhead.

MozReview-Commit-ID: LAzvfm5Qhy0
2017-08-19 13:32:58 -07:00
Kris Maglione
d3d0a0694d Bug 1391158: Optimize checkLoadURL for the common case of extension URLs. r=mixedpuppy
MozReview-Commit-ID: KGFFcHxQSvZ
2017-08-16 23:03:15 -07:00
Kris Maglione
2a4bb89f82 Bug 1389856: Optimize EventEmitter.emit for the common case. r=zombie
MozReview-Commit-ID: 3dbgZfG7l8T
2017-08-13 12:07:01 -07:00
Kris Maglione
56d9c98838 Bug 1389381: Part 3 - Loop over the entire set iterator when truncating a LimitedSet. r=aswan
MozReview-Commit-ID: 3imHF9IRI2N
2017-08-11 14:46:44 -07:00
Kris Maglione
6fd7447dea Bug 1389381: Part 2 - Add slop to the maximum size of a LimitedSet. r=aswan
Truncating a Set can be relatively expensive, so truncating only after several
excessive entries have been added can save some cycles.

MozReview-Commit-ID: DIAXQ3ow2fa
2017-08-12 11:08:35 -07:00
Kris Maglione
04604d9ff9 Bug 1388208: Stop using FileUtils.getFile. r=zombie
This performs main thread IO to make sure that directories exist, which is not
something we should be doing on the startup path.

MozReview-Commit-ID: 2NrgRgY5ua6
2017-08-07 17:42:13 -07:00
Kris Maglione
c4d42444e0 Remove unused lazy imports. r=trivial (no bug)
MozReview-Commit-ID: rqUFJw7Wsb
2017-08-02 21:09:38 -07:00
Kris Maglione
a0b352e6de Bug 1364768: Part 4 - Switch to a compressed, binary flat file for startup cache. r=aswan
IndexedDB helped where we needed to decrease main thread CPU, but it also took
so long to inialize during startup (over 500ms on a fast machine) that it
delayed extension startup more than was acceptable.

Using a structured clone flat file solves the same issues that IndexedDB did,
but with much less startup overhead.

MozReview-Commit-ID: 1Of7uxKCfkg
2017-07-10 22:51:28 -07:00
Andrew Swan
3358f38632 Bug 1369577 Part 2 Propagate isHandlingUserInput for browserAction, pageAction, and menus r=kmag
The implementations of browserAction, pageAction, and menu onClick
handlers now stash the current <browser> until we get a reply from
the extension process indicating that the handler has finished running.
We also have to take care to keep that <browser> around even if the
permissions api has to be loaded asynchronously.

MozReview-Commit-ID: BYJaiwdj40u
2017-06-15 12:48:40 -07:00
Sebastian Hengst
c48d1b793d Backed out changeset dfb376de5c23 (bug 1369577) 2017-06-30 00:59:59 +02:00
Andrew Swan
e77019e2bd Bug 1369577 Part 2 Propagate isHandlingUserInput for browserAction, pageAction, and menus r=kmag
The implementations of browserAction, pageAction, and menu onClick
handlers now stash the current <browser> until we get a reply from
the extension process indicating that the handler has finished running.
We also have to take care to keep that <browser> around even if the
permissions api has to be loaded asynchronously.

MozReview-Commit-ID: BYJaiwdj40u
2017-06-15 12:48:40 -07:00
Kris Maglione
db3ec327d2 Bug 1368189: Move more code out of ExtensionUtils.jsm. r=mixedpuppy
Also removes some dead code.

A lot of the code in ExtensionUtils.jsm is not needed in all processes, and a
lot of the rest isn't needed until extension code runs. Most of it winds up
being loaded into all processes way earlier than necessary.

MozReview-Commit-ID: CMRjCPOjRF2
2017-05-26 15:44:41 -07:00
Kris Maglione
972b1073af Bug 1368152: Part 4 - Remove ExtensionManagement.jsm. r=aswan
MozReview-Commit-ID: Apbi1QYeb2x
2017-06-03 17:18:18 -07:00
Matthew Wein
95bd4ed601 Bug 1330369 - Part 1 - Share the extension stylesheets between sidebar, popups, and options r=mixedpuppy
MozReview-Commit-ID: EquM6hSQ8pH
2017-05-19 15:48:44 -04:00
Mark Banner
cd26ab051f Bug 1367232 - Clean up various ESLint global definitions in toolkit/. r=mossop
MozReview-Commit-ID: Hhm4YBansg1
2017-05-19 09:22:48 +01:00
Kris Maglione
a394878505 Bug 1362224: Cached normalized object for simple icon URLs. r=aswan
MozReview-Commit-ID: ErFFdfKAtuz
2017-05-05 12:53:30 -07:00
Kris Maglione
da08b6926c Bug 1317697: Remove things from ExtensionUtils that don't belong there. r=mixedpuppy
MozReview-Commit-ID: CTX0TckLqoV
2017-04-07 13:39:06 -07:00
Florian Queze
d3c36892fa Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
42670ceca0 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze
9b4f73599f Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Kris Maglione
65308c79f2 Bug 1354941: Pre-load all cached schema data in one DB operation. r=aswan
MozReview-Commit-ID: JyBOcR2Ea15
2017-04-11 16:08:45 -07:00
Kris Maglione
dccaa03b3d Bug 1350522: Part 1 - Allow lazily loading and instantiating API modules. r=aswan
MozReview-Commit-ID: 7ETOJL6ERkg
2017-03-31 17:16:39 -07:00
Luca Greco
e4109d58b1 Bug 1345992 - Fix pageAction icon size on Android. r=kmag
MozReview-Commit-ID: LRECvCvTmEy
2017-03-16 17:09:27 +01:00
Zibi Braniecki
f4aa49939d Bug 1347272 - Move ChromeRegistry::IsLocaleRTL to LocaleService::IsAppLocaleRTL. r=jfkthame
MozReview-Commit-ID: BDhgIKNSOEL
2017-03-14 12:35:06 -07:00
Iris Hsiao
bc568366eb Backed out changeset c7174ac72d14 (bug 1347272) for build bustage 2017-03-28 18:16:33 +08:00
Zibi Braniecki
f1060ac666 Bug 1347272 - Move ChromeRegistry::IsLocaleRTL to LocaleService::IsAppLocaleRTL. r=jfkthame
MozReview-Commit-ID: BDhgIKNSOEL
2017-03-14 12:35:06 -07:00