- 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
Added 2 probes:
1. Breakup by language of initilizations and available voice support for that language.
2. Speak time of narrate.
MozReview-Commit-ID: AGD8nON2m7N
--HG--
extra : rebase_source : 2bbd483bf48b92e290e726cea4f16c6ff5155b58
This removes the obsolete toolkit directory. A few references to dialogOverlay
have been updated to just used <dialog> directly. The InlineSpellCheckerUI var
has also been moved directly to browser.js and defined as lazy getter.
MozReview-Commit-ID: JZfi0W2wqCL
There is a timing-sensitive bug in window.create and/or cookies API.
I haven't figured out the exact details, but created a minimal
test case and reported it at bugzil.la/1309637
Without this patch, the test will fail as described in that bug report.
MozReview-Commit-ID: DiJOao8h8Q7
--HG--
extra : rebase_source : 6a24f2570799cf113e544c68ef3d69645991e4a3
We need to advertise this to the update server to avoid downloading
updates which won't run because of unsupported cpu features on
the recipient's hardware.
MozReview-Commit-ID: H36VXnD3TnW
--HG--
extra : rebase_source : ec382626f96f4f863b9ed44c5aec529d541815b9
Bug 1293365 fixed the query in `Bookmarks.reorder` to leave missing
entries in place, instead of moving them to the end of the folder. It
also correctly ignores nonexistent children, so we can
remove all the extra logic in `PlacesSyncUtils`.
We can also use a map instead of two linear searches to look up
indices in the `Bookmarks.reorder` sorting function. This reduces the
time to sort an array of 10k children from 30 seconds to less than a
second on my dev machine.
MozReview-Commit-ID: G9vuC12JXq4
--HG--
extra : rebase_source : 402e55b44f43a672d847f1f457bcb3538819e341
The onUpdateAvailable listener is asynchronously notified, so the caller
(i.e. the test) cannot assume that a message sent immediately after
triggering an update would trigger the `browser.test.onMessage` listener
that was added in the onUpdateAvailable event handler.
MozReview-Commit-ID: 12n64f5l3RA
--HG--
extra : rebase_source : 6ba7923359786c4ccd7f4d29664a8567e253e0cd
The test logic was broken by design: Two tests uninstall the addon,
but only one uninstall observer was used. Consequently, the second
test resumes the test before the addon was actually uninstalled.
It is probably sheer luck that the test worked before.
MozReview-Commit-ID: DcT48ZQ2bRp
--HG--
extra : rebase_source : 6ab304eab2c306106b5383726fbdf73775c5060a
Main thing: Making contextMenus implementation webext-oop compatible.
Preparation:
- Add getParentEvent to ChildAPIManager to allow use of remote events.
- Introduce `addon_parent_only` to "allowedContexts" to only generate a
schema API in the main process.
- Do not fill in `null` for missing keys if the schema declares a key as
`"optional": "omit-key-if-missing"`. This is needed for the second
point in the next list.
Drive-by fixes:
- Ensure that the "onclick" handler is erased when a context closes.
- Do not clear the "onclick" handler in `contextMenus.update` if the
onclick key has been omitted (parity with Chrome).
- Remove some unnecessary `Promise.resolve()`
- Add extensive set of tests that check the behavior of the contextMenus
APIs with regards to the onclick attribute in various scenarios.
MozReview-Commit-ID: A5f3AUQzU8T
--HG--
extra : rebase_source : 0464a1aa2387343a6f1d0fcd8fbabfdd1a68b1bb
And remove redundant `Promise.resolve()` because it is the default
for async functions.
setIcon is not supported on Android, so there was no need to change
mobile/android/components/extensions/ext-pageAction.js.
MozReview-Commit-ID: 94ebaJFxLAi
--HG--
extra : rebase_source : 20466181501b264ba33fc8ab61fdf2bed20f9eef
This is only to help with migration. This change allows all APIs to
behave identical regardless of whether the API is proxied.
Change cloneScope to be a getter because cloneScope is
`this.contentWindow`, which may be nulled when the context navigates away
(but stays in the bfcache).
Any API that is not proxied must have an identical clone scope to make
sure that properties such as toJSON (in the native messaging
stringifier) and ArrayBuffer (in webRequest as requestBody) are visible
to the caller.
MozReview-Commit-ID: 9aT3SUBieHK
--HG--
extra : rebase_source : f5e4eef52100e42b6fcdc3a43fa7676e7fc3dabc
Neither the message manager nor the XUL browser is guaranteed to be
constant during a ProxyContext's lifetime.
Add a new class to follow the `<browser>` belonging to the current
docshell and update the ProxyContext properties as needed.
NOTE: The `BrowserDocshellFollower` class assumes that docshells are
swapped using `newBrowser.swapDocShells(oldBrowser)`. If this
assumption turns out to be false, then the tracker will lose track of
the `<browser>`. See bugzil.la/1301837 for more details.
Also, renamed `messageManager` to `currentMessageManager` because the
`messageManager` property is overwritten by the `setContentWindow` hack
in WannabeChildAPIManager in ExtensionChild.jsm.
browser/components/extensions/test/browser/browser_ext_currentWindow.js
provides test coverage for this feature once the `test` API goes through
a ChildAPIManager instead of directly through a WannabeChildAPIManager.
Why? Because that test calls `test.onMessage.addListener` in the script
that is loaded in a popup page. Popups are loaded in two stages: First
the content is preloaded in a `<browser>`, and then when the popup is
shown a new `<browser>` is created and the docshells are swapped.
When the script runs while the popup script is being preloaded, the
`ParentAPIManager` receives the IPC message with the target set to the
`<browser>` used for preloading. When the API response is ready,
`target.messageManager.sendAsyncMessage` is called. Meanwhile the
docshells have been swapped, the message manager is gone and this fails.
With this patch, the message manager is correctly tracked and this test
passes.
MozReview-Commit-ID: C5Z0ZJRXKyw
--HG--
extra : rebase_source : 63e6c408d0e7f58dca81810771810cf6fe7b5d5b
Upload symbols when --enable-artifact-build-symbols is specified.
Add --enable-artifact-build-symbols to artifact config for linux, linux64,
win32, win64, macosx64.
MozReview-Commit-ID: LpuwfzWXPBH
--HG--
extra : rebase_source : 137466aa3c8c327cf1932e012927fceb451d82ab
This introduces LoginFormFactory which wraps FormLikeFactory for use with login-specific contexts.
MozReview-Commit-ID: 6rPz5JOy3Yp
--HG--
rename : toolkit/components/passwordmgr/LoginManagerContent.jsm => toolkit/modules/FormLikeFactory.jsm
extra : rebase_source : b2a28803def0dce3de4a01db5bdbc3217c5d0f83
Actually, we don't turn of xinput2 on content process. So, although chrome process cannot detect touch screen device, content process can detect it.
So if we turn off xinput2 on chrome process, content process should be turned off.
MozReview-Commit-ID: 1kfsDBpqhC1
--HG--
extra : rebase_source : 6fc8ccb1b15065fc9ba0a25ddd934adc3bf21c6b
Currently, we use the gzip default of 6. Our history with zlib tells
us that reducing the compression level to 5 or 4 often yields
significantly faster operations while only sacrificing a little
storage. Measurement here shows similar results.
On libxul.so.dbg:
level time compressed
6 21.0s 231,045,158
5 15.8s 232,926,435
4 12.2s 237,587,011
3 11.1s 245,104,157
Changing the level from 6 to 4 increases the size of the compressed
file by 6,541,853 bytes, or 2.83%. But it saves ~10s from the long
pole of builds in automation. And that's just from libxul.
When you factor in all compressed files, this change has a significant
impact on symbol generation.
Before: 221s wall; 150s CPU; 311,424,856 bytes
After: 192s wall; 130s CPU; 318,085,885 bytes
That's on my machine, which has a 4.0 GHz CPU. CPU time savings in
automation will likely be more significant.
MozReview-Commit-ID: 7CbRSZvUayj
--HG--
extra : rebase_source : 87c33d6bb57c9a43613800ca13d91a54f5a95317
`makeFilteringListener` uses the listener as a key for a WeakMap, so we
cannot blindly use the listener as a WeakMap key. addEventListener and
removeEventListeer only accept objects/functions (and undefined/null),
so not wrapping will lead to a descriptive error message from
addEventListener/removeEventListeer.
MozReview-Commit-ID: HF2WAyXDeD9
--HG--
extra : rebase_source : 5574c118cf0881ddc1477ceeb1b9c979814d67d6
In our current Rust world, we have the following dependency structure:
xul.so --------------------------+
|
xul-gtest.so -+--> xul.a --------+-> gkrust
|
+--> gkrust-gtest
This structure results in link errors with multiply-defined symbols
between gkrust-gtest and gkrust with newer Rust releases when linking
xul-gtest.so. So we have to do something different.
Our new structure is:
xul.so --------------------------+
|
xul-gtest.so -+--> xul.a --------+-> gkrust --+-> gkrust-shared
| |
+--> gkrust-gtest --------------+
and we enforce that a given shared library can only have at most one
Rust library that it depends on. Said Rust library is assumed to
include all significant Rust dependencies of the dependent static
libraries as well. (In the above structure, gkrust is simply a wrapper
around gkrust-shared, so gkrust-gtest doesn't have to include gkrust as
a dependency.)
This is useful for talos tests that record checkerboarding. In those tests, the
page might still be in a checkerboard state at the end of the test, so it may be
necessary to flush out the report for measurement.
MozReview-Commit-ID: CtafG4NAGHN
Adds a unit test for in-tree system add-ons, and then adds a update check denying system add-ons if they are not compatible.
MozReview-Commit-ID: KVcArBEPwfE
--HG--
extra : rebase_source : 0df04b4b80687251026bbcc310639dc8fa70377d
We'll ignore mouse events with the following properties:
1) a modifier key was pressed during the click,
2) an anchor element was clicked,
3) the 'selectstart' event fired earlier, indicating a text selection action
4) 'relatedTarget' is set, indicating a drag action or touch event.
MozReview-Commit-ID: 2hIBgcVXzp
--HG--
extra : rebase_source : dda32c495d5fe1e851db8e7376581e5b0e21b4a1
This actually accomplishes what was discussed in the bug and marks any file with the
relevant URI flags as WebDownload, and everything else as OtherDownload.
Note that I'm using DoGetProtocolFlags in order to deal with
nsIProtocolHandlerWithDynamicFlags correctly; while just getting protocol flags
from the IO service directly would be less work, it's technically less correct.
MozReview-Commit-ID: HgD1fV98IEc
--HG--
extra : rebase_source : f114532b48dbca5c83871e61c8d04c719e3b38d1
To validate the PSSH init data passed to EME, I'd like to reuse the same
PSSH parser that the ClearKey CDM shared library uses. So move the code
out of gmp-clearkey and into its own library, so we can link it statically
into code that needs to use it.
MozReview-Commit-ID: 7xSUSmCueJz
--HG--
rename : media/gmp-clearkey/0.1/ClearKeyCencParser.cpp => media/psshparser/PsshParser.cpp
rename : media/gmp-clearkey/0.1/ClearKeyCencParser.h => media/psshparser/PsshParser.h
extra : source : 78dcbc5d3c26547c63269eb14034a67863cf28de
- no change on default bookmarks for non-nightly builds
- replace firefox bookmarks by this list for Nightly:
- Link to the Firefox Nightly blog (https://blog.nightly.mozilla.org/)
- Link to Bugzilla https://bugzilla.mozilla.org/
- Link to MDN https://developer.mozilla.org/
- Link to Nightly Tester Tools addon https://addons.mozilla.org/en-US/firefox/addon/nightly-tester-tools/
- Link to about:crashes
- Link to Nightly IRC channel on irc.mozilla.org via mibbit
- Link to Planet Mozilla https://planet.mozilla.org/
The default bookmark in the bookmark toolbar which was a tour of Firefox feature is now a link to mozilla.org/contribute
This patch also:
- removes all rdf id references in links which are unused
- moves all the data-uri icons to replacement variables to avoid multiple copy-pastes and make the code easier to read
- removes the invalid mention that the file was automatically generated, it is not the case
- updates the meta charset line for a shorter one using HTML5 syntax
- uses lowercase html
- some of the links have keywords or tags defined
- update tests with specific values to test for the Nightly channel vs other channels
Right now the "already in print preview" case in printPreview() collapses
the print preview browser - but also clobbers its _sourceBrowser property,
which shouldn't point to the print preview browser but to the 'normal'
browser whose print preview is in the print preview browser.
This patch fixes the clobbering, and updates later code to not call
getSourceBrowser() repeatedly, as doing so can in some race conditions end up
print previewing the wrong page.
MozReview-Commit-ID: FlMRrPEkAJQ
--HG--
extra : rebase_source : 47f0aa065c45fce7d7a868394332c5d6d0e067fb