Commit Graph

238 Commits

Author SHA1 Message Date
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
Kris Maglione
c421d23abb Bug 1344616: Support running content script tests in xpcshell. r=mixedpuppy
MozReview-Commit-ID: 57yhjZxVl90
2017-03-06 13:09:40 -08:00
Shane Caraveo
1f656159fc Bug 1208596 implement sidebar api for webextensions, f?kmag, gijs r=Gijs,kmag
MozReview-Commit-ID: 6GMdU5kcrFR
2017-02-09 15:32:50 -08:00
Kris Maglione
14194a39c5 Bug 1260548: Part 8 - Cut down on unnecessary console warnings during test runs. r=aswan
This isn't strictly related to the rest of the changes, but was helpful in the
course of debugging them.

MozReview-Commit-ID: 2nvccYYVXfR
2017-01-29 00:58:25 -08:00
Andrew Swan
e034c4e908 Bug 1203330 Part 3 Remove EventManager r=kmag
Also clean up some test warnings related to event listener IPC
along the way.

MozReview-Commit-ID: KOBQX3TynV
2017-01-26 11:27:31 -08:00
Andrew Swan
1ac8741081 Bug 1203330 Part 1 Fix SingletonEventManager r=kmag
This patch adds the ability to run SingletonEventManager handlers in
different modes: sync, async, raw (no exception handling, arg cloning,
or asynchrony), or asyncWithoutClone. When you call the handler,
you're required to specify which variant you want.

Existing uses of SingletonEventManager are all converted to async calls.
Note that some of them were previously synchronous, but it didn't appear
to be necessary.

Also added a callOnClose for SingletonEventManager when the last listener
is removed.

MozReview-Commit-ID: ATHO97dWf3X
2017-01-26 20:00:33 -08:00
Phil Ringnalda
5781d2a09e Backed out 3 changesets (bug 1203330) for failures in test_delay_update_webextension.js
CLOSED TREE

Backed out changeset 2d42350d209a (bug 1203330)
Backed out changeset 3a12c51c3eca (bug 1203330)
Backed out changeset 31fac390e15d (bug 1203330)
2017-01-26 19:13:11 -08:00
Andrew Swan
a77193283e Bug 1203330 Part 3 Remove EventManager r=kmag
Also clean up some test warnings related to event listener IPC
along the way.

MozReview-Commit-ID: KOBQX3TynV
2017-01-26 11:27:31 -08:00
Andrew Swan
8e5ca9edb5 Bug 1203330 Part 1 Fix SingletonEventManager r=kmag
This patch adds the ability to run SingletonEventManager handlers in
different modes: sync, async, raw (no exception handling, arg cloning,
or asynchrony), or asyncWithoutClone. When you call the handler,
you're required to specify which variant you want.

Existing uses of SingletonEventManager are all converted to async calls.
Note that some of them were previously synchronous, but it didn't appear
to be necessary.

Also added a callOnClose for SingletonEventManager when the last listener
is removed.

MozReview-Commit-ID: ATHO97dWf3X
2017-01-26 13:43:12 -08:00
Florian Quèze
91f7a2ef3a Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws. 2017-01-25 07:01:52 +01:00
Kris Maglione
0bbe39a4f0 Bug 1322869: Part 2 - Memoize some relatively expensive-to-compute tab attributes. r=bsilverberg
MozReview-Commit-ID: EpjsLhlNzvG
2016-12-19 12:34:50 -08:00
Kris Maglione
8758dd16e8 Bug 1318371: Flush jar caches by path rather than creating a nsIFile in the content process. r=billm
MozReview-Commit-ID: 4J88w5lxEsP
2016-11-17 20:00:30 -08:00
Kris Maglione
179fc5815b Bug 1317447: Provide better error messages when browser is removed before we can send replies. r=aswan
MozReview-Commit-ID: 19Qmi220qOt
2016-11-18 13:06:00 -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
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
d71a646d1c Bug 1316396: Part 5 - Move MessageManagerProxy to ExtensionUtils, and add support for proxied listeners. r=aswan
MozReview-Commit-ID: KhinS46k0yW
2016-11-10 10:50:36 -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
Kris Maglione
b73015d895 Bug 1315872: Refactor tests that check for promise rejection to use assertRejects. r=aswan
MozReview-Commit-ID: 1fBE7B2OdH7
2016-11-07 22:04:49 -08:00
Wes Kocher
1aa5b280a6 Merge inbound to central, a=merge 2016-11-08 13:58:20 -08:00
Phil Ringnalda
ef3560aa59 Merge m-c to m-i
MozReview-Commit-ID: 8cFOopE3aHd
2016-11-07 20:40:30 -08:00
Kris Maglione
1aa2783d54 Bug 1303798: Correctly propagate addListener errors from WebRequest.jsm to extension. r=mixedpuppy
MozReview-Commit-ID: BTTNaaAdBs5
2016-11-06 18:08:46 -08:00
Matthew Wein
bb3fd3b5a2 Bug 1247435 - Fix context.incognito (this completes part of bug 1309610) r=kmag
MozReview-Commit-ID: IFW8SfNymbE
2016-11-04 14:37:09 +00:00
Kris Maglione
569fb0cb43 Bug 1315575: Part 3 - Convert ImageData objects at the binding layer, and remove unnecessary content bindings. r=aswan
MozReview-Commit-ID: CjqXRiFcMWp
2016-11-06 17:35:07 -08:00
Kris Maglione
4bd88237a3 Bug 1315575: Part 2 - Stop generating multiple sets of schema bindings for proxy contexts. r=aswan
MozReview-Commit-ID: 2VqYscQAAF6
2016-11-07 22:21:01 -08:00
Kris Maglione
89425f013c Bug 1315575: Part 1 - More cleanup. r=aswan
MozReview-Commit-ID: KdAplJGH9Hy
2016-11-06 17:28:16 -08:00
Wes Kocher
ffa634077a Backed out changeset 045ce2ca1b7d (bug 1303798) for test_ext_webrequest_upload.html failures a=backout 2016-11-07 12:00:28 -08:00
Kris Maglione
59d8645f01 Bug 1303798: Correctly propagate addListener errors from WebRequest.jsm to extension. r=mixedpuppy
MozReview-Commit-ID: BTTNaaAdBs5
2016-11-06 18:08:46 -08:00
Kris Maglione
bec1b361f5 Bug 1312690: Lazily initialize extension APIs. r=aswan
MozReview-Commit-ID: 2ofzT6wPvus
2016-11-02 19:21:04 -07:00
Kris Maglione
e10c4436dc Bug 1312690: Lazily initialize schema bindings. r=aswan
MozReview-Commit-ID: GoVUlANCgHg
2016-11-02 19:09:04 -07:00
Kris Maglione
6fd3e7cc09 Bug 1312690: Cleanup. r=aswan
MozReview-Commit-ID: IorfzVPKyIE
2016-10-30 19:54:23 -07:00
Rob Wu
21eaf53406 Bug 1299411 - Move native messaging to child process r=kmag
Move `runtime.connectNative` and `runtime.sendNativeMessage` to
`addon_child`. Note: This does not change the behavior for launching the
native app, it is still launched from the main process.

Now ExtensionUtils's Port is also used for native messaging ports. Now
the behavior of `runtime.connect` and `runtime.connectNative` are
identical from the extension's perspective.
In particular:
- `disconnect()` does not throw when called again (bug 1287229).
- `onDisconnect` is called with error messages (tests will be added in
  the next commit).

MozReview-Commit-ID: AyU9amiLeoL
2016-09-24 13:25:56 +02:00
Rob Wu
185ab2435d Bug 1299411 - Propagate errors to port.onDisconnect via port.error r=kmag
In Chrome, runtime.lastError is set when the port is disconnected
due to an error.
Here in Firefox we choose to set a new property "error" on the port
if the port disconnected due to an error.
Since onDisconnect fires at most once, port.error is set only once.

MozReview-Commit-ID: EPaVtV4WkcQ
2016-09-30 22:42:28 +02:00
Rob Wu
cf86efcccd Bug 1299411 - Unify fire and fireWithoutClone. r=kmag
Unify implementation of fire and fireWithoutClone. `fireWithoutClone`
was running the callbacks synchronously.  After this commit the callback
is run asynchronously. This is safe because the only user of this method
is `Port`'s `onDisconnect`.

MozReview-Commit-ID: 1kiYavsu3e7
2016-09-24 11:48:43 +02:00
Rob Wu
1a903f50f2 Bug 1299411 - Pass port parameter to port.onMessage r=kmag
This should have been a part of bug 1298810, but that only set the
argument for native messaging ports, which does not use Port from
ExtensionUtils. The port parameter must also be included in runtime's
Port.onMessage to avoid regressions when the port implementations are
unified and native messaging starts using runtime's Port.

Note that starting from this commit, multiple onMessage listeners
receive the same (cloned) message instead of a new clone per listener.
This is a side effect of using `fire.withoutClone` instead of `fire`:
`fire` clones all parameters, but ports are not cloneable so we have
to use `fire.withoutClone` instead. This change with regards to message
cloning is fully compatible with Chrome's messaging API (which also
passes the same message object to all `port.onMessage` calls).

MozReview-Commit-ID: AUDuUKHkXCM
2016-09-24 11:34:26 +02:00