Commit Graph

15 Commits

Author SHA1 Message Date
Tomislav Jovanovic
f2f7b0ad4c Bug 1368669 - Support explicit null callback for runtime.sendMessage r=aswan
MozReview-Commit-ID: Lauyk877pIQ
2017-06-07 23:43:25 +02:00
Andrew Swan
3e9f8ffba5 Bug 1259944 Fix runtime.sendMessage() handling of 2 arguments r=zombie
MozReview-Commit-ID: AefmoEfy12j
2017-05-01 10:08:56 -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
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
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
89a4aa4c82 Bug 1309906 - part2: provide existent APIs to the devtools contexts. r=kmag
MozReview-Commit-ID: L6YOpnMPVFf
2016-11-04 12:41:12 +01:00
Kris Maglione
9f122d3ac9 Bug 1316396: Part 3 - Clean up the native messaging Port logic. r=aswan
MozReview-Commit-ID: E7ns3ZQl6FN
2016-11-09 12:28:09 -08: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
91820391f9 Bug 1298979 - Add ProxyMessenger, change message managers and getSender r=billm
- Introduce a proxy for IPC messages to allow the following APIs
  to be run out-of-process (ProxyMessenger):

    * runtime.connect
    * runtime.sendMessage
    * tabs.connect
    * tabs.sendMessage
    * runtime.onConnect
    * runtime.onMessage

- Update getSender in ext-tabs, make it independent of the context
  (in particular do not throw an error when a message is received while
  the tab is gone), and move it from MessageChannel to ProxyMessenger to
  make sure that it works in webext-oop. MessageChannel lives in a child
  process, whereas the TabManager (used by getSender) requires data from
  the main process.

- Set the third parameter of `addMessageListener` to true in some places
  to make sure that messages get delivered even after unloading the
  context. This is needed for the next two points.

- Put the `messageManager` property in BaseContext, and let it be set by
  `setContentWindow` - runtime.sendMessage/connect and tabs.sendMessage/
  connect depends on this property, and using the frame message manager
  makes sense.

- Unconditionally use the frame message manager in
  runtime.sendMessage/connect instead of sometimes the cpmm.

MozReview-Commit-ID: 4QkPnlMOkjS
2016-08-25 17:08:08 -07:00
Rob Wu
0167c8c6a2 Bug 1287010, 1286712 - Use schema-generated runtime API, split ext-runtime.js r=billm
- Use schema-generated runtime API for content scripts instead of
  untyped API.
- Move logic that cannot be run in the main process to a new file.

Together with the previous patch that migrated the i18n API, this
concludes the fix for bug 1286712.

MozReview-Commit-ID: A3yG0x1kjwx
2016-08-18 18:15:37 -07:00