Commit Graph

49 Commits

Author SHA1 Message Date
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
Matthew Wein
7c3aae7284 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
Kris Maglione
4c12719b3a Bug 1258360: Implement onMessageExternal and onConnectExternal. r=mixedpuppy
MozReview-Commit-ID: 7NTrgyWpXbv
2017-02-11 13:28:18 -08:00
Luca Greco
6a52aa7f33 Bug 1309906 - part1: adapt webext-oop internals for devtools contexts and APIs. r=kmag
MozReview-Commit-ID: E0gxV271N31
2016-11-14 21:38:20 +01:00
Kris Maglione
b4e56ef41e Bug 1316784: Kill PseudoChildAPIManager. r=aswan
MozReview-Commit-ID: CIRltzhWWAJ
2016-11-11 15:50:29 -08:00
Kris Maglione
bab75b7f08 Add getUniqueId helper function to ExtensionUtils. (no bug) r=me
MozReview-Commit-ID: BXi3Yse5jFt
2016-11-10 21:44:05 -08:00
Sebastian Hengst
4247074d30 Backed out changeset 6790d8962ad9 to make ESlint happy. r=backout 2016-11-12 17:07:10 +01:00
Sebastian Hengst
fed6b9490d Backed out changeset 888815bca14c (bug 1316784) 2016-11-12 13:43:23 +01:00
Kris Maglione
7ee67562ed Bug 1316784: Kill PseudoChildAPIManager. r=aswan
MozReview-Commit-ID: CIRltzhWWAJ
2016-11-11 15:50:29 -08:00
Kris Maglione
1596e24307 Add getUniqueId helper function to ExtensionUtils. (no bug) r=me
MozReview-Commit-ID: BXi3Yse5jFt
2016-11-10 21:44:05 -08:00
Kris Maglione
d25b4ecf0f Bug 1316396: Part 1 - Reorganize parent, child, common, and test code into more appropriate modules. r=aswan
MozReview-Commit-ID: 5WMt69GoN3K
2016-11-10 12:35:22 -08:00