Commit Graph

88 Commits

Author SHA1 Message Date
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
8cc3381663 Bug 1381687: Follow-up: Fix bustage where theme code is touching raw schema JSON that it shouldn't be.
MozReview-Commit-ID: 9Uwfbml0Ria
2017-07-19 22:28:09 -07:00
Kris Maglione
497bcba4b3 Bug 1382501: Don't use NetUtil to parse URIs. r=trivial
MozReview-Commit-ID: BepyXBOOuv2
2017-07-19 18:26:41 -07:00
Mark Striemer
3ba601e9c7 Bug 1330732 - Show install warnings in about:debugging r=aswan,jdescottes
MozReview-Commit-ID: 8SFcYuln8w8
2017-06-29 11:11:21 -07:00
Sebastian Hengst
4b7fa3c5ad Backed out changeset 1d1b993bfea6 (bug 1330732) for failing chrome's test_chrome_ext_contentscript_unrecognizedprop_warning.html and test_chrome_ext_eventpage_warning.html. r=backout 2017-07-17 20:46:06 +02:00
Mark Striemer
36eb2b03fc Bug 1330732 - Show install warnings in about:debugging r=aswan,jdescottes
MozReview-Commit-ID: 8SFcYuln8w8
2017-06-29 11:11:21 -07:00
Wes Kocher
7c8f1a68cf Merge inbound to central, a=merge
MozReview-Commit-ID: 8nlqm5dHCUQ
2017-07-14 17:14:43 -07:00
Kris Maglione
ef10d12084 Bug 1381023: Follow-up: Fix xpcshell failure.
MozReview-Commit-ID: BB8ItETtRMb
2017-07-14 10:50:54 -07:00
Kris Maglione
83d403d84c Bug 1380290: Use correct message manager when communicating with inline options browsers. r=aswan
MozReview-Commit-ID: HpxXG3S2zgp
2017-07-12 17:41:12 -07:00
Kris Maglione
7a0ed314bc Bug 1381023: Don't treat no response as an error in hybrid extension message handling. r=trivial
MozReview-Commit-ID: FukWQcLwFOT
2017-07-14 09:40:10 -07:00
Yoshi Huang
6d7b8c9224 Bug 1377523 - Part 1: add dummy.xul. r=smaug
ExtensionParent.jsm uses a data: URI window, and will cause this XUL
window as a cross-origin window, so we replace it with a dummy.xul
2017-07-13 12:27:30 +08:00
Kris Maglione
b44716ecfc Bug 1364768: Part 6 - Use startup cache for initial extension permission data. r=aswan
Reading the extension permissions DB at startup takes several hundred
milliseconds, largely from the overhead of initializing OS.File. We can avoid
that somewhat by using the stream APIs to read the files, and beginning the
read very early. But the eager initialization gets complicated, and we still
add extra IO to startup.

After this change, the permissions JSON file still remains the primary source
of truth, but the state as of the last session is cached in the volatile
extension startup cache to decrease the overhead of reading it at startup.

MozReview-Commit-ID: HGDt5kSsdzX
2017-05-14 16:12:33 -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
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
Kris Maglione
74e871a71b Bug 1357486: Part 0g - Run remote debugger host browser in same TabGroup as extension pages. r=me
MozReview-Commit-ID: BPqf0X1hwV6
2017-07-08 15:56:10 -07:00
Kris Maglione
2bd10b5257 Bug 1357486: Part 0e - Support legacy extensions in OOP mode. r=aswan
MozReview-Commit-ID: 4JHxX78HNRV
2017-07-07 15:12:45 -07:00
Sebastian Hengst
2df512392d Backed out changeset 44ab0cca4956 (bug 1357486) 2017-07-08 11:23:32 +02:00
Kris Maglione
46ac905ec6 Bug 1357486: Part 0e - Support legacy extensions in OOP mode. r=aswan
MozReview-Commit-ID: 4JHxX78HNRV
2017-07-07 15:12:45 -07:00
Andrew Swan
18ffd89c2b Bug 1378990 Preserve pending browser across async API loads r=kmag
The code that saves the pending browser across an asynchronous
API load was accidentally broken as a result of some overzelous
cleanup.  Fix it here.

MozReview-Commit-ID: 3ED95YJAHL2
2017-07-03 16:32:26 -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
Matthew Wein
c7a81cb41f Bug 1329242 - Add support for browser_action.theme_icons r=mixedpuppy
MozReview-Commit-ID: HvfUQZzBQWq
2017-06-27 15:23:35 -07:00
Kris Maglione
4d8065e240 Bug 1373293: Follow-up: Bump StartupCache schema version. r=trivial
MozReview-Commit-ID: JR1ZP9ByRFb
2017-06-23 10:55:48 -07:00
Ian Bicking
df9f192d56 Bug 1372310 - bump ExtensionStartupCache SCHEMA_VERSION r=aswan,mossop
This avoids an issue described in https://github.com/mozilla-services/screenshots/issues/3027 Bug 1372750 and Bug 1373749 where a cached version of Screenshot's manifest.json is retained after upgrade
r?aswan

MozReview-Commit-ID: 9RMKTFN1ugI
2017-06-16 15:24:06 -05:00
Kris Maglione
01d769d2fb Bug 1368289: Simplify frameloader global metadata tagging. r=mixedpuppy
MozReview-Commit-ID: 1hgTtWysmya
2017-05-27 17:30:53 -07:00
Sebastian Hengst
104346b202 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-06-05 11:08:00 +02:00
Sebastian Hengst
a7d2475436 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: G0dLvIdtcAi
2017-06-05 11:05:49 +02:00
Jared Hirsch
1372b2c6dd Bug 1366827 - Enable WebExtension experiments in Beta and Release. r=aswan
MozReview-Commit-ID: 1Z5p4AoelPu
2017-06-02 12:04:01 -07: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
b546affc93 Bug 1356546: Part 3 - Use StructuredCloneHolder as transport for proxied message listeners. r=aswan
MozReview-Commit-ID: 2YeNuGkmY3k
2017-05-06 21:21:37 -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
88befd774d Bug 1368152: Part 3 - Remove ExtensionManagement.getURLForExtension. r=aswan
MozReview-Commit-ID: 4KalPWYQeks
2017-06-03 22:29:27 -07:00
Matthew Wein
947bca800c Bug 1266012 - Add identity indication for the moz-extensions scheme r=mixedpuppy
MozReview-Commit-ID: BtbRGPJbsHs
2017-05-10 15:14:15 -04:00
Luca Greco
43da730071 Bug 1302702 - Provide a DebugUtils object from ExtensionParent.jsm. r=kmag
This change prepare the WebExtensions internals to the changes applied to the
addon debugging facilities in the other patches from this queue.

In ExtensionParent.jsm, a HiddenXULWindow helper class has been refactored out
of the HiddenExtensionPage and then reused by both HiddenExtensionPage and
the new DebugUtils object.

The DebugUtils object provides the utility methods used by the
devtools actors related to the addon debugging, which are used to retrieve
an "extension process browser XUL element" (a XUL browser element that has been
configured by DebugUtils to be used to connect the devtools parent
actor to the process where the target extension is running), and then release it
when it is not needed anymore (because the developer toolbox has been closed and
all the devtools actors destroyed).

The DebugUtils object used the HiddenXULWindow class to lazily create
an hidden XUL window to contain the "extension process browser XUL elements"
described above (and the HiddenXULWindow istance is then destroyed when there
is no devtools actor that is using it anymore).

MozReview-Commit-ID: 31RYQk1DMvE
2017-03-21 16:24:13 +01:00
Sebastian Hengst
46e381af15 Backed out changeset 5c8ee0487056 (bug 1302702) for failing xpcshell's toolkit/components/extensions/test/xpcshell/test_ext_shutdown_cleanup.js and more on Android. r=backout 2017-05-17 20:02:30 +02:00
Luca Greco
866efc931e Bug 1302702 - Provide a DebugUtils object from ExtensionParent.jsm. r=kmag
This change prepare the WebExtensions internals to the changes applied to the
addon debugging facilities in the other patches from this queue.

In ExtensionParent.jsm, a HiddenXULWindow helper class has been refactored out
of the HiddenExtensionPage and then reused by both HiddenExtensionPage and
the new DebugUtils object.

The DebugUtils object provides the utility methods used by the
devtools actors related to the addon debugging, which are used to retrieve
an "extension process browser XUL element" (a XUL browser element that has been
configured by DebugUtils to be used to connect the devtools parent
actor to the process where the target extension is running), and then release it
when it is not needed anymore (because the developer toolbox has been closed and
all the devtools actors destroyed).

The DebugUtils object used the HiddenXULWindow class to lazily create
an hidden XUL window to contain the "extension process browser XUL elements"
described above (and the HiddenXULWindow istance is then destroyed when there
is no devtools actor that is using it anymore).

MozReview-Commit-ID: 31RYQk1DMvE
2017-03-21 16:24:13 +01:00
Florian Quèze
ff53eb9a63 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Kris Maglione
bdb8ae3dfd Bug 1317697: Split ExtensionContent.jsm into a stub process script. r=mixedpuppy
MozReview-Commit-ID: 4vn0ERZiBQd
2017-04-14 17:00:51 -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
9e1d79362b Bug 1350522: Part 5 - Remove registerSchemaAPI(). r=aswan
MozReview-Commit-ID: 5yK2wUms86G
2017-03-25 13:59:14 -07:00
Kris Maglione
884009911d Bug 1350522: Part 2 - Convert toolkit APIs to lazy loading. r=aswan
MozReview-Commit-ID: 8TbTIM4WX2d
2017-03-31 19:36:00 -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
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
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