This change automatically evicts content scripts 5 minutes after their last
use, and flushes the entire cache whenever a memory-pressure event is
received.
In the case of memory-pressure events other than heap-minimize, we only evict
scripts that have been in the cache for longer than 3 seconds (which is a
fairly arbitrary number) in order to prevent pre-loads from being evicted and
then immediately re-loaded.
MozReview-Commit-ID: LCXkI9qVMxS
--HG--
extra : rebase_source : b81ed3b9962346154fa18eaee58a7411244a1936
This uses the http-on-opening-request observer that's dispatched in the child
process to begin preloading matching content scripts as early in the load
cycle as possible. Ideally we would use the network predictor for this, but
most of its prediction work happens in the parent process, and there are no
simple ways for us to hook into it.
This currently does not do any pre-loading in the parent process, mainly
because there isn't a good way to distinguish top-level document loads that
are happening directly in the parent versus those that are being proxied from
the child.
MozReview-Commit-ID: dIQW68HtxZ
--HG--
extra : rebase_source : b36f6c8516d0550a0d5bb0df895ce6db76ab3538
Removed the probe in Histogram.json and the code related to it in nsKeygenHandler.cpp
MozReview-Commit-ID: E8lGbx19e2C
--HG--
extra : rebase_source : ef958749e6ad2e2b617fd1efdd09cdd3185bef18
nsTArray::AppendElement may cause memory reallocation if out of capacity.
In nsUrlClassifierStreamUpdater::FetchNextRequest(), we take the reference of
the first element of mPendingRequests and pass its member as reference to
DownloadUpdate(), where mPendingRequests.AppendElement will be called.
If the AppendElement in DownloadUpdate() causes realloc, the reference
becomes dangling.
The most efficient fix is to "move" the reference's (i.e. request)
member variables to DownloadUpdate() but I think in this case we can just
take the value from the array and pass it around with no given that the
array element contains simply a couple of strings and pointers.
MozReview-Commit-ID: KEZ5d3l3HoI
--HG--
extra : rebase_source : 4bf61a8a6f6bc57523dfbb7e5b0b40b7ce77a57a
This problem only occurs when optgroups are involved since they introduce recursion in to the menu-building code and we weren't correctly passing state through
the recursion.
MozReview-Commit-ID: 514zcjgXbIY
--HG--
extra : rebase_source : fdb9309ec8b08f5ab8ca77d901065d5e7db1617f
This problem only occurs when optgroups are involved since they introduce recursion in to the menu-building code and we weren't correctly passing state through
the recursion.
MozReview-Commit-ID: 514zcjgXbIY
--HG--
extra : rebase_source : fdb9309ec8b08f5ab8ca77d901065d5e7db1617f
This patch enables flake8 rule E502:
"the backslash is redundant between brackets" in toolkit/components/telemetry
by removing the relative E502 entry from toolkit/components/telemetry/.flake8
and fixing the files for which the E502 error was reported.
Precisely 8 errors violating E502 rule were found and solved.
MozReview-Commit-ID: 1z8f3JjJ2gt
--HG--
extra : rebase_source : de0622506a4a5a074ea5afa739b8537832aa4096
Replaced all Task occurence by an async function
MozReview-Commit-ID: 1HjHtPRTkl7
--HG--
extra : rebase_source : a08ac1030ef93e97ed4228c129f6f4905d99ba42
This patch enables flake8 rule E111: "indentation is not a multiple of four"
in toolkit/components/telemetry by removing the relative E111 entry from
toolkit/components/telemetry/.flake8 and fixing the files for which the E111
error was reported.
MozReview-Commit-ID: EOVcsllJNJK
--HG--
extra : rebase_source : 9cadb7d9214ed8f242bf6e6a30769c009a502b40
Because we weren't waiting for the first, "about:blank" page to load, the first
`waitForLoad` could trigger for about:blank. Rather than add an additional
`waitForLoad` it's easier (and probably more future-proof) to just wait for
the right page to load.
MozReview-Commit-ID: DZsMnlgRTa
--HG--
extra : rebase_source : c0fc74368e744fb3e111f310ec98a0b964c23edd
The Intl API is not being immediately enabled on Android Beta/Release after all, so we have to keep these fallbacks for the time being.
MozReview-Commit-ID: 1uWfTy58x3I
--HG--
extra : rebase_source : 5db81579d2ed1ab30487d2c5c401c55098862282
In bug 1335309, FileFinder was made to default to not find executables,
and zip.py was made to use the default instead. Which made sense for
most uses of zip.py, except for the jsshell package.
So we add a flag to make zip.py able to strip executable (which happens
when the FileFinder is made to find them), and use that flag for the
jsshell package only.
--HG--
extra : rebase_source : 0202f9acd5e6175d3790aaef026e18c6913cf0c6
The previous implementation regarding to the Flash Blocking Subdocument list blocked all subdocuments that matched the list. This patch changes that so that subdocuments are only blocked if they are on the Subdocument Block List and also are loaded in a Third-Party context.
The changes to cert8.db and key3.db add the https certificate for subdocument.example.com so that testing can verify that a scheme mismatch between the document and its parent results in a third-party classification.
MozReview-Commit-ID: IXnA4iPzB4y
--HG--
extra : rebase_source : 103c1e184d4219e6db9d00da1ea54674a0e216dd
Use entities declared in DTD files so that lozalizers can fill in appropiate
placeholders for each locale.
MozReview-Commit-ID: 9KODExaDnDe
--HG--
extra : rebase_source : e6a9f27c68907aded0483028aee3a17744491a56
This adds back a MOZ_ENABLE_WEBRENDER define, which only controls whether or
not WebRender is enabled at runtime. The default behaviour is changed so that:
- if the user specifies --disable-webrender in the mozconfig, WebRender is
neither built nor enabled
- if the user specifies --enable-webrender in the mozconfig, WebRender is
built and enabled
- if the user specifies --enable-webrender=build in the mozconfig, WebRender is
built but not enabled, except on Android where it is neither built nor enabled
- if the user doesn't specify any of the above, the default behaviour is:
- on nightly/local builds, the same as --enable-webrender=build
- on other channels (e.g. aurora), the same as --disable-webrender
The net effect is that local/Nightly-automation builds will have WebRender
built-in but not enabled where possible (i.e. not Android). However the user
can override this behaviour via mozconfig options to either not build WebRender
at all, or to enable it in addition to building it.
MozReview-Commit-ID: IM7DdSHkIB
This patch changes the crashreporter client code as well as the crash service
code to compute a SHA256 hash of a crash' minidump file and add it to the
crash ping. The crash service code computes the hash on the fly before handing
over the crash to the crash manager; the crash manager will then add it to the
crash ping. The crashreporter client on the other hand sends the hash via the
ping it generates but it also adds it to the event file so that the crash
manager can pick it up and send it along with its own crash ping. On Fennec
the crashreporter activity takes care of computing the hash.
SHA256 hash computation uses nsICryptoHash in the crash service, the
java.security.MessageDigest class in Fennec, the bundled NSS library in the
crashreporter when running on Windows and Mac and the system-provided NSS
library under Linux. The latter is required because the crashreporter client
uses the system curl library which is linked to NSS and which would thus clash
with the bundled one if used together.
This patch introduces two new methods for the nsICrashService interface:
|getMinidumpForID()| and |getExtraFileForID()|, these reliably retrieve the
.dmp and .extra files associated with a crash and ensure the files exist
before returning. These new methods are used in the CrashService for
processing and will become the only way to reliably retrieve those files
from a crash ID.
MozReview-Commit-ID: 8BKvqj6URcO
--HG--
extra : source : a4d8291c56fcde00238ab3166bbe6af6dd602340
To gauge the impact of bug 1343995 on perceived shutdown times, we want to measure how long sanitising actually takes in practice on Android.
MozReview-Commit-ID: 3gSfT8IoO70
--HG--
extra : rebase_source : 19ffdfbf1005ae4beebaa0c9d8befea31e1aa01f
This patch measures the time from an input event creation, to it been
dispatched to PresShell, but just before any handler been executed.
MozReview-Commit-ID: 6ZYra7YYICY
--HG--
extra : rebase_source : fb864ab2ec7af3d59f4a4ccf52667f34dcd588d6
Also, avoid two entirely unused imports.
This avoids loading the various osfile jsms at startup.
The additional shim method for sysinfo is needed in
test_TelemetryEnvironment.js because delaying the intialization of
osfile results in loading osfile_shared_allthreads.jsm after the shim
sysinfo has been added, which initializes
Ci.nsIOSFileConstantsService, which calls into sysinfo in
InitOSFileConstants().
MozReview-Commit-ID: D7IWk20TRt1
--HG--
extra : rebase_source : cf820b1ed72a78ff34e99d2129401c4806a68175
This patch measures the time from an input event creation, to it been
dispatched to PresShell, but just before any handler been executed.
MozReview-Commit-ID: 6ZYra7YYICY
--HG--
extra : rebase_source : 019521545132e72113a87c06cfbe562a9915522d
Undo incorrect change from bug 1341029, and tell ESLint about how Utils is 'global' to some of the videocontrols.xml event listeners.
MozReview-Commit-ID: 9ItMIzwYhEj
--HG--
extra : rebase_source : 4ea996771c00e25e7e33063cfb56cf19c2cf059a
This matches parity with Google Chrome Canary Version 59.0.3046.0 (Official Build) canary (64-bit).
MozReview-Commit-ID: 3rkhiFv8ezX
--HG--
extra : rebase_source : 3cb05e6c1e048bab4c7573bd050ea7477fc128fb
We're adding histograms for both animated tab closing and non-animated tab closing to
avoid a needlessly bi-modal histogram.
MozReview-Commit-ID: J4MzsiwaLcT
--HG--
extra : rebase_source : 82433a160ec8b0e3810758146113f7d0b770857b
Running eslint with --fix didn't fix many of the issues. The majority here had to be fixed by hand but a significant majority of the issues were related to a few files that I was able to use find-and-replace with. I regret not making this in to separate commits of the hand-fixes and the fixes from --fix but I don't recall --fix fixing any of the issues.
MozReview-Commit-ID: ANyg2qfo3Qx
--HG--
extra : rebase_source : 61d2aa91bf9474af3d72a5dea41b25dca442c1b7
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.
This allows us to remove a lot of calls for the app locale.
The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.
MozReview-Commit-ID: DzmFEUvMq3N
--HG--
extra : rebase_source : 513ed31d995864939aa893e73c81ffdf591a6617
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.
This allows us to remove a lot of calls for the app locale.
The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.
MozReview-Commit-ID: DzmFEUvMq3N
--HG--
extra : rebase_source : 13fa4c397ba4c79303a2cd76684b5b8c4bd17331
We're adding histograms for both animated tab closing and non-animated tab closing to
avoid a needlessly bi-modal histogram.
MozReview-Commit-ID: J4MzsiwaLcT
--HG--
extra : rebase_source : 8e5de38c9687f0645e04713de2c95e0f3e2e8eb5
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
--HG--
extra : rebase_source : 90659e21d5165fef69735d1f746fd89b9d792365
The following functions all call NS_LogInit() (either directly or via
ScopedLogging) and then call LogModule::Init() very shortly after:
XRE_InitChildProcess(), NS_InitXPCOM2(), NS_InitMinimalXPCOM(),
XRE_XPCShellMain().
XREMain::XRE_main() does not, however. This prevents us from using MOZ_LOG
easily in the profiler, because the profiler starts up earlier than logging in
the browser.
This patch adds an early LogModule::Init() to XRE_main(), just after the
NS_LogInit().
--HG--
extra : rebase_source : c25fc891da78755e2f38f4dc672d503734990c47
* replace use of @focusRingShadow@ with the CSS variable in toolkit osx theme and browser theme files
* remove redundant @media blocks as --focus-ring-box-shadow is already mac-theme specific
* fix focus style for tabprompt buttons (alert buttons)
* fix focus style for notification anchor icons
MozReview-Commit-ID: EFAMwSbwdGX
--HG--
extra : rebase_source : 9b33c5dc2d2e0c00e983f2c64a9f902f9947cfd6
This flag wasn't used in the build system anyways. It was used to hide early builds of the
new Activity Stream UI. However this is now going to be controlled by Switchboard experiments.
MozReview-Commit-ID: Dfzw9YGgHkN
--HG--
extra : rebase_source : 2ecd3fb18a237f0de8e7d4752d69de568c062310
2017-03-20 14:31:33 +01:00
Marco Bonardo ext:(%20%3Cmbonardo%40mozilla.com%3E)
URLCLASSIFIER_PREFIX_MATCH is replaced by URLCLASSIFIER_FULL_MATCH(Bug 1311931)
so it should be removed.
MozReview-Commit-ID: 4F1B07bGwRP
--HG--
extra : rebase_source : 2d3e5cda14df4e874bf31145ccb5330acec369f7
Fixed various issues related to webextension install prompts in tests:
- Some existing tests install extensions from the about:addons search
page, but when about:addons is run in its own top level window, these
tests fail since there is no location bar to anchor notifications to.
Given the mostly unsupported nature of running about:addons in its
own top level window, this patch just takes the easy way out and skips
running those tests in window mode.
- Fix tests that might generate prompts to acknowledge them if they
are enabled.
- Update the test for mozAddonManager.permissionPromptsEnabled to properly
handle the case where prompts are on by default.
MozReview-Commit-ID: AdPmhGfB33o
--HG--
extra : rebase_source : e6de243272ce59489ff2dc2f8811202d97371607
Previously we were respecting the webpages request to show a translucent background on popups, though it now seems that content didn't actually
want a translucent background. After comparing with Chrome, I see that they remove the alpha channel and always show the background color as
fully opaque. This patch also fixes a related bug where the background-color may have been set to a transparent color (not rgba(0, 0, 0, 0)) and
we would show the popup as transparent. This is now fixed with this patch as well.
MozReview-Commit-ID: KqDtvI0zwqP
--HG--
extra : rebase_source : 865bbcd9890997cb0c21f20132a0f033c5c365e4
When calling SessionHistory.collect(), we can indicate that we're not interested in the first N (where N = aFromIdx + 1) session history entries, with N potentially being a very big number if we don't want any SHEntries at all and are just interested in updating the value of the current history index.
Currently, we always serialise all available SHEntries and then throw away the first N entries, which is wasteful - instead, we should just skip them right away.
We still need to keep track how many entries we actually skipped and how many we could have collected if we wanted to, so
- we can correctly clamp data.index
- if we end up with no entries, figure out whether we simply skipped all of them or else need to create a fallback entry.
MozReview-Commit-ID: DjHnnhK0M9L
--HG--
extra : rebase_source : 510027ecbc18b921c7a7fa5824466113b04057a5
Styles defined by the pages were getting applied to the dummy option and select, causing the wrong colors to be reported as the user-agent defaults.
MozReview-Commit-ID: 6rQy71hwzy6
--HG--
extra : rebase_source : 0e474bc25303af7b481a559a688932aa50b1c891
This also adds a 'Date' header and a custom version header for the pingsender.
It additionally makes sure that the Windows implementation fails when HTTP error
codes are returned from the server.
MozReview-Commit-ID: 4IekLyI2AnQ
--HG--
extra : rebase_source : 7d75cb90671804cb20a6648c44316c2bbe100fb1
The test cases should be ordered according to their alphabet order.
MozReview-Commit-ID: LmmyjcTf6Nd
--HG--
extra : rebase_source : e93da9fd41f312c6ce2bc59698597286e6dfc088
Add tests for non-in-tree media element, web-audio and plug-in.
MozReview-Commit-ID: 2BMzUHPjKWX
--HG--
extra : rebase_source : 93c836edb04dbb5cb8cb487e1d5face6ddefdd42
The test slow_timeout in test_searchSuggest.js was keeping a request open for 10s so the server wouldn't stop immediately.
MozReview-Commit-ID: EGFPRKMNa51
--HG--
extra : rebase_source : c22ddafaee9c4bf6142643782b53f3d4313531d8
Bug 1343075 - 1a. Add TextEventDispatcherListener::GetIMEUpdatePreference; r=masayuki
Add a GetIMEUpdatePreference method to TextEventDispatcherListener to
optionally control which IME notifications are received by NotifyIME.
This patch also makes nsBaseWidget forward its GetIMEUpdatePreference
call to the widget's native TextEventDispatcherListener.
Bug 1343075 - 1b. Implement GetIMEUpdatePreference for all TextEventDispatcherListener; r=masayuki
This patch implements GetIMEUpdatePreference for all
TextEventDispatcherListener implementations, by moving previous
implementations of nsIWidget::GetIMEUpdatePreference.
Bug 1343075 - 2. Allow setting a PuppetWidget's native TextEventDispatcherListener; r=masayuki
In PuppetWidget, add getter and setter for the widget's native
TextEventDispatcherListener. This allows overriding of PuppetWidget's
default IME handling. For example, on Android, the PuppetWidget's native
TextEventDispatcherListener will communicate directly with Java IME code
in the main process.
Bug 1343075 - 3. Add AIDL interface for main process; r=rbarker
Add AIDL definition and implementation for an interface for the main
process that child processes can access.
Bug 1343075 - 4. Set Gecko thread JNIEnv for child process; r=snorp
Add a JNIEnv* parameter to XRE_SetAndroidChildFds, which is used to set
the Gecko thread JNIEnv for child processes. XRE_SetAndroidChildFds is
the only Android-specific entry point for child processes, so I think
it's the most logical place to initialize JNI.
Bug 1343075 - 5. Support multiple remote GeckoEditableChild; r=esawin
Support remote GeckoEditableChild instances that are created in the
content processes and connect to the parent process GeckoEditableParent
through binders.
Support having multiple GeckoEditableChild instances in GeckoEditable by
keeping track of which child is currently focused, and only allow
calls to/from the focused child by using access tokens.
Bug 1343075 - 6. Add method to get GeckoEditableParent instance; r=esawin
Add IProcessManager.getEditableParent, which a content process can call
to get the GeckoEditableParent instance that corresponds to a given
content process tab, from the main process.
Bug 1343075 - 7. Support GeckoEditableSupport in content processes; r=esawin
Support creating and running GeckoEditableSupport attached to a
PuppetWidget in content processes.
Because we don't know PuppetWidget's lifetime as well as nsWindow's,
when attached to PuppetWidget, we need to attach/detach our native
object on focus/blur, respectively.
Bug 1343075 - 8. Connect GeckoEditableSupport on PuppetWidget creation; r=esawin
Listen to the "tab-child-created" notification and attach our content
process GeckoEditableSupport to the new PuppetWidget.
Bug 1343075 - 9. Update auto-generated bindings; r=me
Dropped the dataset() functions from keyed and plain histograms in file |toolkit/components/telemetry/TelemetryHistogram.cpp| to prevent their unnecessary exposure while getting histograms using the getHistogramById function (or its keyed counterpart).
Also removed the (now redundant) |internal_JSHistogram_Dataset()| and |internal_JSKeyedHistogram_Dataset()| functions from the same file and tests from the file |toolkit/components/telemetry/tests/unit/test_TelemetryHistograms.js| as the same tests are performed later on in that very file.
In many cases, to speed up start, compiling a ScriptSource will not
compile the functions themselves, but will rather syntax-parse them
(to check for syntax errors), leaving full compilation for
later. However, if we find ourselves in a case in which the function
is needed almost immediately, we need to full-parse the function
immediately after the syntax-parse, which is wasteful.
This changeset intends to measure how often this happens, by exporting
through Telemetry the duration between the end of the syntax-parse and
the start of the full-parse for each function.
As a memory optimization, instead of storing a timestamp for the
syntax-parse of each function, we store a single timestamp for an
entire ScriptSource. This assumes that all functions of the
ScriptSource are syntax-parsed at approximately the same instant,
which should be mostly true for everything except perhaps `eval` and
`new Function`. Then, when time comes to delazify a function, we
simply determine the time elapsed since the ScriptSource was compiled.
Histogram JS_PARSER_COMPILE_LAZY_AFTER_MS starts at 10ms (anything
smaller is often not measurable) and stops at 10s (anything larger can
safely be said to be not wasteful).
MozReview-Commit-ID: 6Ycy2OIIiAt
--HG--
extra : rebase_source : 0ccd6f51189b3ad8056e9f39e267235d68f6e2db