This causes consumers managing defaults themselves to fail to find a default
subsuite for tests, because the manifestparser will have provided a blank
default value by the time they incorporate defaults into a test definition.
This patch removes the provided defaults and updates a number of places assuming
the 'subsuite' field is always present.
MozReview-Commit-ID: 1jPy52VmEPr
--HG--
extra : rebase_source : be7a2504af6853abb1bc532a058738f33d8dcbee
- Combine the errors for a non-existing app and lacking permissions to
avoid information leakage.
- Do not treat normal application exit as an error.
- Create errors in the right context.
- Add tests that check the error messages.
MozReview-Commit-ID: HxBpeCSyyGN
--HG--
extra : rebase_source : f9406cec6bddd4ab740f5042dd7cc64d4a63e447
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
--HG--
extra : rebase_source : be44523ca1b6555f5c356f12790c896e781d809f
This communicates more clearly that we expect only one message/event.
MozReview-Commit-ID: 8jDYBVwqQtz
--HG--
extra : rebase_source : acae1570537b17027901253afc2344ffabd7a9ee
The extension is always available as `context.extension`, so do not
unnecessarily pass the extension as a separate parameter.
MozReview-Commit-ID: 9OaestUAGVk
--HG--
extra : rebase_source : b1f408d3750152477195655c5a777e1ff4682a09
Serialization of the message should happen in the same process as the
extension context, whereas sending the message should be in the same
process as the owner of the native messaging host.
With webext-oop, the former is an addon process and the latter the
main process. Therefore it is necessary to separate the two roles.
MozReview-Commit-ID: 8BJZmn2QjLJ
--HG--
extra : rebase_source : d0665885c304b45c2f44e82f29c1a8260fe454c5
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
--HG--
extra : rebase_source : 16687b2acfccaecec0b39a4a3d9f86e91431ee55
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
--HG--
extra : rebase_source : 341c0dfa2531dd6137976eb8dfaed16edc5bbd51
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
--HG--
extra : rebase_source : b91d701bba21f376935961a6eeb1a8489ac5591b
Decoupled the API from the implementation. From now on it is possible
to create Port instances without generating an API. This allows us to
internally use Ports to pass around messages with minimal overhead
(in the form of unnecessary clones of messages).
This will be used by native messaging.
This commit has no behavioral change, it is mostly moving around some
code and storing the internal message listener in a set.
MozReview-Commit-ID: 4h0LNJvTH9R
--HG--
extra : rebase_source : ef12309acc2060b9a2b2bc55be72b95d0f4f450e
Handle object created from a constructor function, like `new Boolean(true)`,
`new Number(42)` or `new String("foo")`.
It displays the wrapped value using Rep so the primitives are displayed like
expected.
MozReview-Commit-ID: JrJVeV0C0wO
--HG--
extra : rebase_source : 03d01ee1bfcbc0cd303a1a91a585d61ccdeae8c3
Note that this does not affect task.extra.chainOfTrust, and thus has no impact
on the generated task JSON.
MozReview-Commit-ID: ERSVZlQUMpK
--HG--
extra : rebase_source : 5cee34de62138535eceb4cec7bcb860d45442938
I haven't seen a case of this happening in the wild, but I believe it is possible for a test to dump "TEST-UNEXPECTED-FAIL"
directly to the log and mozharness using the StructuredOutputParser would not pick it up. This patch is just me being extra
careful to flag potential errors like that. I'm not sure they even exist.
This patch also purposefully uses substr to avoid requiring said string to show up at the beginning, which should avoid
certain prefix issues we've run into in the past.
MozReview-Commit-ID: 99n9YizlEDH
--HG--
extra : rebase_source : 2063f2fc4ca109a4ac24ccdbc0672e4e1b4c0fb6
We were previously logging these at the info level as a really hacky way to make sure that the mozharness
output parser was able to detect them. Since bug 1261194 switched mochitests to use the StructuredOutputParser,
we now need to log them at the error level or they won't get picked up anymore.
MozReview-Commit-ID: 99n9YizlEDH
--HG--
extra : rebase_source : a3495ac3c3d770f1eabadca42fd4c2f789e83617