Commit Graph

110 Commits

Author SHA1 Message Date
Kris Maglione
12cba737fa Bug 1391310: Optimize runSafe/wrapPromise to avoid wrapper/spread arg/rest arg overhead. r=zombie
Lots of little bits of overhead add up to a significant amount of overhead
over the many, many times this function is called.

MozReview-Commit-ID: BYTWxqc8rH9
2017-08-18 11:53:25 -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
Julian Descottes
ef916b7121 Bug 1374735 - stop exposing devtools require to extensions ext-* files;r=kmag CLOSED TREE
There is no longer any file in components/extensions/ext-* that use require().
Therefore it should be ok to stop exposing it.

MozReview-Commit-ID: EgZYBludlcy
2017-06-22 21:04:02 +02:00
Ryan VanderMeulen
f40c0d4a06 Backed out 4 changesets (bug 1374735) for test_ext_i18n.js failures on a CLOSED TREE.
Backed out changeset 50a36fb7c7f9 (bug 1374735)
Backed out changeset da075933f7bc (bug 1374735)
Backed out changeset b7435cd66ce3 (bug 1374735)
Backed out changeset 22baf4e67730 (bug 1374735)
2017-08-18 12:34:22 -04:00
Julian Descottes
4f93f65273 Bug 1374735 - stop exposing devtools require to extensions ext-* files;r=kmag
There is no longer any file in components/extensions/ext-* that use require().
Therefore it should be ok to stop exposing it.

MozReview-Commit-ID: EgZYBludlcy
2017-06-22 21:04:02 +02:00
Kris Maglione
b4fd636ed8 Bug 1391099: Avoid using checkLoadURIStrWithPrincipal. r=mixedpuppy
checkLoadURIStrWithPrincipal runs URLs through the URI fixup services and
checks against each of the results. This is both expensive and unnecessary for
our purposes.

MozReview-Commit-ID: 4L2Z4KuMZhQ
2017-08-16 16:29:06 -07:00
Kris Maglione
f8d9014f9b Bug 1390010: Part 3 - Limit the amount of schema data sent to web content processes. r=zombie
Web contetnt processes only need access to a small amount of schema data, but
we currently send them the approximately 600K of full schema data that is
mostly useless to them.

This patch limits the schema data sent to web content processes to what they
actually need, and sends the rest only to extension content processes.

MozReview-Commit-ID: 6G0LThNTOu1
2017-08-13 19:00:24 -07:00
Kris Maglione
fde4821f1e Bug 1389847: Don't add caller location to sandbox name if an explicit name is provided. r=krizsa
MozReview-Commit-ID: KOGrrMurs6X
2017-08-12 16:01:00 -07:00
Kris Maglione
15c01aabb8 Bug 1388211: Fold ExtensionAPI.jsm into ExtensionCommon.jsm. r=mixedpuppy
We always load one when we load the other, so there's no need for the overhead
of a separate JSM.

MozReview-Commit-ID: 8u4OhJJEN3b
2017-08-07 17:58:14 -07:00
Kris Maglione
0fb6b2e73c Bug 1388215: Part 3 - Use JIT-friendly defineLazy*Getters methods when defining many lazy imports. r=florian
MozReview-Commit-ID: APoFwUhDFdj
2017-08-09 13:03:36 -07:00
Kris Maglione
ab61453747 Bug 1387907: Part 2 - Store computed module data in the startup cache. r=mixedpuppy
MozReview-Commit-ID: 4PV4z870GTb
2017-08-06 18:04:28 -07:00
Andrew Swan
702d75aac5 Bug 1350151 Part 1: Add requireUserInput property for functions in webextension schemas r=kmag
MozReview-Commit-ID: BrMAwbwEu8b
2017-07-25 22:45:47 -07:00
Kris Maglione
debd2ac908 Bug 1357902 - Use improved locale service APIs for localization. r=gandalf
MozReview-Commit-ID: 6Aj0SZkCJwg
2017-05-04 18:28:05 -07:00
Kris Maglione
ee30da7682 Bug 1370752: Part 3 - Use structured clone rather than JSON to sanitize storage values. r=aswan
This gives us performance wins in sevaral areas:

- Creating a structured clone blob of storage data directly from the source
  compartment allows us to avoid X-ray and JSON serialization overhead when
  storing new values.

- Storing the intermediate StructuredCloneBlob, rather than JSON values,
  in-memory saves us additional JSON and structured clone overhead when
  passing the values to listeners and API callers, and saves us a fair amount
  of memory to boot.

- Serializing storage values before sending them over a message manager allows
  us to deserialize them directly into an extension scope on the other side,
  saving us a lot of additional structured clone overhead and intermediate
  garbage generation.

- Using JSONFile.jsm for storage lets us consolidate multiple storage file
  write operations, rather than performing a separate JSON serialization for
  each individual storage write.

- Additionally, this paves the way for us to transition to IndexedDB as a
  storage backend, with full support for arbitrary structured-clone-compatible
  data structures.

MozReview-Commit-ID: JiRE7EFMYxn
2017-07-10 18:24:11 -07:00
Wes Kocher
a0b015fa22 Backed out 2 changesets (bug 1370752) for failures in test_ext_storage.js a=backout
Backed out changeset 42d3c1599af5 (bug 1370752)
Backed out changeset 9c4bf59ab966 (bug 1370752)

MozReview-Commit-ID: 4M6DsJvJ6RI
2017-07-10 14:34:56 -07:00
Kris Maglione
5c0bb13dcc Bug 1370752: Part 3 - Use structured clone rather than JSON to sanitize storage values. r=aswan
This gives us performance wins in sevaral areas:

- Creating a structured clone blob of storage data directly from the source
  compartment allows us to avoid X-ray and JSON serialization overhead when
  storing new values.

- Storing the intermediate StructuredCloneBlob, rather than JSON values,
  in-memory saves us additional JSON and structured clone overhead when
  passing the values to listeners and API callers, and saves us a fair amount
  of memory to boot.

- Serializing storage values before sending them over a message manager allows
  us to deserialize them directly into an extension scope on the other side,
  saving us a lot of additional structured clone overhead and intermediate
  garbage generation.

- Using JSONFile.jsm for storage lets us consolidate multiple storage file
  write operations, rather than performing a separate JSON serialization for
  each individual storage write.

- Additionally, this paves the way for us to transition to IndexedDB as a
  storage backend, with full support for arbitrary structured-clone-compatible
  data structures.

MozReview-Commit-ID: JiRE7EFMYxn
2017-06-29 14:11:05 -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
Andrew Swan
3d501bbfd5 Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG
2017-06-09 13:49:07 -07:00
Sebastian Hengst
8642712c2a Backed out changeset 26fd6d0a1254 (bug 1369577) for failing xpcshell's test_ext_simple.js and test_ext_startup_cache.js on Android. r=backout 2017-06-30 01:01:13 +02: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
Andrew Swan
c140bd9d12 Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG
2017-06-09 13:49:07 -07:00
Tomislav Jovanovic
8542af1e2d Bug 1333403 - Part 3: Fix using browser.menus from multiple contexts r=kmag
MozReview-Commit-ID: XlP72cr0VT
2017-04-25 23:51:26 +02:00
Tomislav Jovanovic
a00ccaaac6 Bug 1333403 - Part 2: Implement browser.menus as alias for contextMenus r=kmag
MozReview-Commit-ID: JPaKsOyavDb
2017-06-10 16:43:20 +02:00
Sebastian Hengst
4bc880baf0 Backed out changeset cfc47df74537 (bug 1333403) 2017-06-10 16:06:44 +02:00
Sebastian Hengst
0fcb1d642b Backed out changeset d842c744941e (bug 1333403) 2017-06-10 16:06:12 +02:00
Tomislav Jovanovic
d65d26e7e6 Bug 1333403 - Part 3: Fix using browser.menus from multiple contexts r=kmag
MozReview-Commit-ID: XlP72cr0VT
2017-04-25 23:51:26 +02:00
Tomislav Jovanovic
82cdece9f1 Bug 1333403 - Part 2: Implement browser.menus as alias for contextMenus r=kmag
MozReview-Commit-ID: JPaKsOyavDb
2017-06-06 23:25:06 +02:00
Kris Maglione
8ff587711f Bug 1356546: Part 4 - Use StructuredCloneHolder as transport for proxied method return values. r=aswan
MozReview-Commit-ID: LZ3XkamgkeF
2017-06-04 20:39:28 -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
4f623b6890 Bug 1322235: Part 3 - Use MatchPatternSet for whiteListedHosts and webRequest. r=aswan,zombie
This is the second step to migrating the policy service to pure native code,
with similar impacts and reasoning to the previous patch.

MozReview-Commit-ID: L5XdPzWNZXM
2017-06-03 22:11:20 -07:00
Kris Maglione
40dc39087e Bug 1362225 - Speed up i18n.getMessage. r=aswan
MozReview-Commit-ID: EcadiurI7tu
2017-05-04 16:38:18 -07:00
Doug Thayer
c8eb3cc7f1 Bug 1326572 - Provide an API for nsIProfiler r=kmag,mstange
In order to rewrite the Gecko Profiler add-on as a WebExtension,
we need an API for the profiler which allows us to control the
nsIProfiler, and symbolicate the stacks that it provides. This
is the implementation of the simpler parts of that API.

TODO:
- Support profiling of remote targets through a new devtools
  API.
- Support the dump_syms breakpad code which was asm.js in the
  old extension by directly calling into native code.
- Figure out a faster way to send the large volume of data from
  getSymbols all the way from our extension down to the content
  process and then into the page's context.

MozReview-Commit-ID: JzDbV4l2eXd
2017-04-11 09:03:40 -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
Kris Maglione
9e1d79362b Bug 1350522: Part 5 - Remove registerSchemaAPI(). r=aswan
MozReview-Commit-ID: 5yK2wUms86G
2017-03-25 13:59:14 -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
Andrew Swan
b96180cff0 Bug 1197420 Part 4 Apply dynamic permission changes r=kmag
MozReview-Commit-ID: 6TdcUv1fHPh
2017-03-23 17:28:52 -07:00
Sebastian Hengst
f7e31023c0 Backed out changeset f4fbd8e60288 (bug 1197420) 2017-03-25 17:39:34 +01:00
Andrew Swan
dd2572ae7d Bug 1197420 Part 4 Apply dynamic permission changes r=kmag
MozReview-Commit-ID: 6TdcUv1fHPh
2017-03-23 17:28:52 -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
43dbe20442 Bug 1197420 Part 4 Apply dynamic permission changes r=kmag
MozReview-Commit-ID: 6TdcUv1fHPh
2017-03-23 17:28:52 -07:00
Sebastian Hengst
07e3b9be93 Backed out changeset cb352ddee812 (bug 1197420) 2017-03-24 20:56:05 +01:00
Andrew Swan
df98c5adb3 Bug 1197420 Part 4 Apply dynamic permission changes r=kmag
MozReview-Commit-ID: 6TdcUv1fHPh
2017-03-23 17:28:52 -07:00
Tomislav Jovanovic
251163ad61 Bug 1339559 - Enable no-mixed-operators ESLint rule r=kmag
MozReview-Commit-ID: LjuiizBh1OK
2017-03-17 14:28:14 +01:00
Tomislav Jovanovic
d4b3c25736 Bug 1339559 - Identify script that resulted in non-structured-clonable data r=kmag
MozReview-Commit-ID: AURB4Qpwimh
2017-03-13 09:04:45 +01: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
Matthew Wein
18e5cb2f76 Part 1: Bug 1295807 - Add a Javascript Module for registering proxy scripts. r=kmag,robwu
MozReview-Commit-ID: HLokEivMpmp
2017-03-06 17:04:46 -05:00
Ryan VanderMeulen
57a4b61c72 Backed out changeset 7a576717126b (bug 1295807) for unresolved review issues. DONTBUILD 2017-03-06 16:47:49 -05:00
Matthew Wein
4a9f157e28 Part 1: Bug 1295807 - Add a Javascript Module for registering proxy scripts. r=kmag,robwu
MozReview-Commit-ID: HLokEivMpmp
2017-03-03 23:25:57 +00:00
Sebastian Hengst
2d1fc2a660 Backed out changeset 488acde695af (bug 1295807) for formatting failure in extensions-toolkit.manifest and eslint failure. r=backout 2017-03-05 20:18:41 +01:00