Commit Graph

222 Commits

Author SHA1 Message Date
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
Andrew Swan
fc72911ff3 Bug 1197420 Part 3 Initial browser.permissions api support r=kmag
With this patch, permissions are not actually applied,
but the permissions api is in place.

MozReview-Commit-ID: CTaXz5sa1xy
2017-03-24 13:55:09 -07:00
Sebastian Hengst
e33b75e3f1 Backed out changeset d1628b66e5f8 (bug 1197420) 2017-03-25 17:39:38 +01:00
Andrew Swan
a151659a43 Bug 1197420 Part 3 Initial browser.permissions api support r=kmag
With this patch, permissions are not actually applied,
but the permissions api is in place.

MozReview-Commit-ID: CTaXz5sa1xy
2017-03-24 13:55:09 -07:00
Phil Ringnalda
bb0cc6a131 Backed out 5 changesets (bug 1197420) for test_ext_permissions.js and test_chrome_ext_permissions.html timeouts on Fennec
CLOSED TREE

Backed out changeset 8a0125e00903 (bug 1197420)
Backed out changeset 925e3a9499ee (bug 1197420)
Backed out changeset 46e135035f10 (bug 1197420)
Backed out changeset 440bab141509 (bug 1197420)
Backed out changeset 3e690bbe8b5a (bug 1197420)
2017-03-24 20:43:24 -07:00
Andrew Swan
1ab93c4095 Bug 1197420 Part 3 Initial browser.permissions api support r=kmag
With this patch, permissions are not actually applied,
but the permissions api is in place.

MozReview-Commit-ID: CTaXz5sa1xy
2017-03-24 13:55:09 -07:00
Sebastian Hengst
7b11b686c6 Backed out changeset 7df6cc66a2eb (bug 1197420) 2017-03-24 20:56:10 +01:00
Andrew Swan
925ea0071d Bug 1197420 Part 3 Initial browser.permissions api support r=kmag
With this patch, permissions are not actually applied,
but the permissions api is in place.

MozReview-Commit-ID: CTaXz5sa1xy
2017-03-23 21:48:03 -07:00
Kris Maglione
d06b5048db Bug 1348442: Part 2b - Add getWinUtils helper. r=aswan
MozReview-Commit-ID: 9vvCbYovyoN
2017-03-18 15:16:16 -07:00
Kris Maglione
a48a112588 Bug 1346607: Begin speculative preload of popups on hover. r=mixedpuppy
Ideally we'd try to detect hover intent here, but the preload is relatively
cheap, so I don't think we have much to lose by starting out simple.

MozReview-Commit-ID: 7pjiohGMJVc
2017-03-11 19:05:09 -08:00
Matthew Wein
57d753fc0f Bug 1338525 - Add schema validation for webextension themes r=mikedeboer,mossop
MozReview-Commit-ID: 3QjDrTeMKH0
2017-03-17 18:17:14 -04:00
Sebastian Hengst
07de254e04 Backed out changeset 8f55090db9e6 (bug 1338525) for eslint failure in toolkit/components/extensions/ExtensionUtils.jsm. r=backout 2017-03-16 20:53:09 +01:00
Matthew Wein
cd3cbaa6f3 Bug 1338525 - Add schema validation for webextension themes r=mikedeboer,mossop
MozReview-Commit-ID: 3QjDrTeMKH0
2017-03-10 14:45:50 -05:00
Kris Maglione
2aa5ab63cc Backed out changeset 2ad68bdfb2ed (bug 1344590) for mochitest bustage
MozReview-Commit-ID: 7lUtSXTsmnT
2017-03-12 19:20:10 -07:00
Kris Maglione
ec5fb4a3c6 Bug 1344590: Follow-up: Fix changes that got lost in rebase.
MozReview-Commit-ID: 7V9FoZXaizK
2017-03-12 16:54:03 -07:00
Kris Maglione
115e1d5fce Bug 1344590: Part 4 - Store parsed and normalized extension data in indexedDB. r=aswan
MozReview-Commit-ID: HA0PJfbGa9w
2017-03-08 09:16:01 -08:00
Kris Maglione
9ac789da88 Bug 1333477: Part 3 - Support dynamically injecting and revoking schema properties based on permissions. r=aswan
MozReview-Commit-ID: C2pQpsD18W0
2017-03-04 16:43:21 -08:00