Граф коммитов

8242 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 9602fc8b5c Bug 1695162 - Use ordinary range iteration instead of IterHash. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D106641
2021-03-04 18:52:19 +00:00
Brindusan Cristian b926d96be6 Backed out 3 changesets (bug 1360715) for mochitest failures at test_WebCrypto.html. CLOSED TREE
Backed out changeset b4a14c42313d (bug 1360715)
Backed out changeset 0e4b1b65fcbe (bug 1360715)
Backed out changeset fb8b9841d82b (bug 1360715)
2021-03-04 21:15:16 +02:00
Simon Giesecke e41d350c04 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 17:30:48 +00:00
Noemi Erli 11891059f7 Backed out changeset 06452c4c828c (bug 1676361) for causing bustages CLOSED TREE 2021-03-04 19:13:56 +02:00
Simon Giesecke 6c371fcc1c Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 16:14:44 +00:00
Kagami Sascha Rosylight 7bec866ac5 Bug 1360715 - Part 3: Remove remaining cross-context instanceof from tests r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106663
2021-03-04 15:05:27 +00:00
Kagami Sascha Rosylight 73ec445d30 Bug 1360715 - Part 2: Modify instanceofs in tests to non-cross-context r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106662
2021-03-04 15:05:26 +00:00
smolnar 9f8b74a18d Backed out changeset 9062e17fe15c (bug 1676361) on devs request. CLOSED TREE 2021-03-04 16:51:21 +02:00
Simon Giesecke e1330cc8f0 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 14:32:15 +00:00
Jan-Erik Rediger 4a219f294b Bug 1695197 - Remove MOZ_GLEAN constant, introduce MOZ_GLEAN_ANDROID. r=chutten,emilio
We enable compilation of FOG/Glean on _all_ platforms.
We disable Glean initialization and metric recording on Android (GeckoView) by respecting MOZ_GLEAN_ANDROID.
This way GeckoView just works, consumers don't need to think about it (except in tests, these need to be disabled for Android builds).

Stubbing out the metric implementations will happen in the commits after
this one.

Differential Revision: https://phabricator.services.mozilla.com/D106766
2021-03-04 11:15:12 +00:00
Matthew Gaudet 5d1ab7641a Bug 1693594 - Acquire monitor before setting script for mainthread decode r=kmag
This can race with ScriptPreloader::WriteCache on the mScript field.

Differential Revision: https://phabricator.services.mozilla.com/D105828
2021-03-03 20:30:17 +00:00
Simon Giesecke d9f1e7e67d Bug 1695162 - Delete nsBaseHashtable::Iterator move constructor as it's almost unused. r=xpcom-reviewers,nika
The only place using it is HashElemIter, which unnecessarily wraps Iterator in a
Maybe. This wrapping is removed.

Differential Revision: https://phabricator.services.mozilla.com/D106639
2021-03-03 08:58:53 +00:00
Simon Giesecke b5855b89fc Bug 1634281 - Remove unused nsDataHashtable.h includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106007
2021-03-03 08:58:52 +00:00
Paul Bone 017a947912 Bug 1688120 - Remove UB due to unnecessary integer conversion r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D106577
2021-03-01 01:16:36 +00:00
Paul Bone 412e4af403 Bug 1688120 - Move some variable declarations closer to their uses r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D106388
2021-03-01 01:16:36 +00:00
Paul Bone 734f44ec45 Bug 1688120 - Improve control-flow XPCNativeInterface::NewInstance r=peterv
Improve the control flow for early exits in NewInstance().

Differential Revision: https://phabricator.services.mozilla.com/D106387
2021-03-01 01:16:35 +00:00
Doug Thayer 3e030acee5 Bug 1694229 - Show slow script warning only when critical input is pending r=smaug
We want to restrict the slow script warning to cases where the user is actually
trying to interact with the browser.

Differential Revision: https://phabricator.services.mozilla.com/D106017
2021-02-27 18:22:33 +00:00
Jens Stutte 1e19379853 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-27 14:38:14 +00:00
Butkovits Atila bb3fe218a4 Backed out changeset be43a81b35f9 (bug 1689953) for causing failure at test_terminator_record.js. CLOSED TREE 2021-02-27 05:03:11 +02:00
Jens Stutte f6d52040b9 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-26 21:33:29 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Bogdan Tara d53cfe7369 Backed out 5 changesets (bug 1694229) by flod's request, lint failures CLOSED TREE
Backed out changeset cb3d9e8d32e6 (bug 1694229)
Backed out changeset 877471a44509 (bug 1694229)
Backed out changeset 286b311d32b2 (bug 1694229)
Backed out changeset 42cb688eae03 (bug 1694229)
Backed out changeset d082f53d882e (bug 1694229)
2021-02-25 22:43:33 +02:00
Doug Thayer 8195515eec Bug 1694229 - Show slow script warning only when critical input is pending r=smaug
We want to restrict the slow script warning to cases where the user is actually
trying to interact with the browser.

Differential Revision: https://phabricator.services.mozilla.com/D106017
2021-02-25 19:59:15 +00:00
Brindusan Cristian 6f8f3d0e90 Backed out 5 changesets (bug 1694229) for geckoview failures. CLOSED TREE
Backed out changeset 5ce24c91b0c1 (bug 1694229)
Backed out changeset 7fef19f47442 (bug 1694229)
Backed out changeset a70e27ec7747 (bug 1694229)
Backed out changeset 6a5d472e1b05 (bug 1694229)
Backed out changeset d32085239f92 (bug 1694229)
2021-02-25 09:27:50 +02:00
Doug Thayer 7cada2b622 Bug 1694229 - Show slow script warning only when critical input is pending r=smaug
We want to restrict the slow script warning to cases where the user is actually
trying to interact with the browser.

Differential Revision: https://phabricator.services.mozilla.com/D106017
2021-02-25 04:14:13 +00:00
Nick Alexander 20e71161ca Bug 1687553 - Make more `dump` implementations log to MOZ_LOG system under module "Dump". r=xpcom-reviewers,nika
This is an extension of the existing implementations added by Bug
1059469.

By extension, this makes `console.log` and friends log to the MOZ_LOG
system when `browser.dom.window.dump.enabled` is true.

My immediate use case is capturing cumulative logs for the new
`--backgroundtask ...` mode that will be used to invoke maintenance
tasks when Firefox itself is not running.

This will lead to duplicate messages (from both the MOZ_LOG system and
`fputs`) when the MOZ_LOG system is not redirected but there's no
particular harm in that.  In the future, we could not `fputs` when the
MOZ_LOG system will log the given message, but it seems better to
actually do the work to connect the `Log.jsm` and `ConsoleAPI.jsm`
systems to MOZ_LOG rather than continue to add work arounds.

Differential Revision: https://phabricator.services.mozilla.com/D104636
2021-02-25 04:13:33 +00:00
Aaron Klotz 004362bf3e Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium
We know that some GV installations (particularly but not exlcusively Focus) are
failing to load `libxul.so` during early Gecko bootstrapping. Unfortunately
a boolean pass/fail result is not giving us sufficient information to be able to
properly troubleshoot this problem.

This patch adds `mozilla::Result`-based return values to `XPCOMGlueLoad` and
`GetBootstrap` in an effort to produce more actionable information about these
failures.

We include either a `nsresult` or, if the failure is rooted in a dynamic linker
failure, appropriate platform-specific error information:

* On Unix-based platforms, a `UniqueFreePtr<char>` containing the string from `dlerror(3)`;
* On Windows, the Win32 `DWORD` error code from `GetLastError()`.

For non-Android platforms, I updated them to handle the new return type, but
otherwise did not make any further changes.

For Android, we include the error information in the message string that we pass
into the Java `Exception` that is subsequently thrown.

Differential Revision: https://phabricator.services.mozilla.com/D104263
2021-02-23 23:25:22 +00:00
Kris Maglione f508b30e41 Bug 1403348: Follow-up: Remove crash annotations for AsyncShutdown load failures. r=mccr8
They've done their job. It's clear at this point that these failures are
happening because of omni.ja corruption.

Differential Revision: https://phabricator.services.mozilla.com/D105834
2021-02-23 20:18:13 +00:00
smolnar c245e071f7 Backed out changeset 7c67e3cb1ded (bug 1403348) for causing xpc failures in AsyncShutdown. CLOSED TREE 2021-02-23 02:17:08 +02:00
Kris Maglione 9e57d6f966 Bug 1403348: Follow-up: Remove crash annotations for AsyncShutdown load failures. r=mccr8
They've done their job. It's clear at this point that these failures are
happening because of omni.ja corruption.

Differential Revision: https://phabricator.services.mozilla.com/D105834
2021-02-22 21:37:28 +00:00
Simon Giesecke c5f7800f35 Bug 1691913 - Rename nsClassHashtable::LookupOrAdd to GetOrInsertNew. r=xpcom-reviewers,nika
It should be called "Get" rather than "Lookup" because it returns
UserDataType. "Add" is called "Insert" in the other methods.

Differential Revision: https://phabricator.services.mozilla.com/D105470
2021-02-22 12:07:47 +00:00
Matthew Gaudet c4c40771a1 Bug 1693027 - Convert TranscodeResult to a strongly typed enum r=arai,kmag
Differential Revision: https://phabricator.services.mozilla.com/D105304
2021-02-18 13:55:19 +00:00
Matthew Gaudet 8532b9fbfb Bug 1693027 - Explicitly check for JS::TranscodeResult_Ok r=kmag
JS::TranscodeResult_Ok is defined to be zero; this means that during synchronous decode
of a script, regardless of if we succeed or fail we ultimately return a nullptr script.

Differential Revision: https://phabricator.services.mozilla.com/D105303
2021-02-18 13:55:18 +00:00
Magnus Melin 0c4e76213a Bug 1689562 - mozJSComponentLoader::Import should not store locations that failed to resolve. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105367
2021-02-18 07:04:18 +00:00
smolnar d65394b9d6 Backed out changeset 8063ff05e5b1 (bug 1678487) for causing windows widget xpc failures. CLOSED TREE 2021-02-17 15:09:23 +02:00
Emilio Cobos Álvarez d0560f6a2e Bug 1678487 - Initialize gfxPlatform explicitly in xpcshell / gtest. r=jrmuizel
Otherwise CMS might not get initialized and some of the image decoding
tests or such may assert.

Differential Revision: https://phabricator.services.mozilla.com/D105088
2021-02-17 10:39:36 +00:00
Butkovits Atila 3f9e8bcf24 Backed out changeset b2536c2f1f97 (bug 1678487) for causing failures on test_crashreporter_crash.js. 2021-02-17 00:10:42 +02:00
Emilio Cobos Álvarez 9ff8284160 Bug 1678487 - Initialize gfxPlatform explicitly in xpcshell / gtest. r=jrmuizel
Otherwise CMS might not get initialized and some of the image decoding
tests or such may assert.

Differential Revision: https://phabricator.services.mozilla.com/D105088
2021-02-16 21:07:21 +00:00
Simon Giesecke 661e25bf09 Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
Gerald Squelart 2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
smolnar 1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke 3c29a68440 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Lars T Hansen cda3e5d212 Bug 1686652 - Generalize the SIMD wormhole. r=yury
Generalize the SIMD wormhole to both x86 and x64, and both baseline
and Ion, so that we can start experimenting with it on a broader
scale.

Change the config so that the feature will ride the trains,
preffed-off by default (the current setting).  The pref disappears
from view in late betas, though the feature remains; it can be
requested by another means (later patch) from privileged content only.

Differential Revision: https://phabricator.services.mozilla.com/D101709
2021-02-12 08:44:08 +00:00
Chris Peterson 2b2bd12de6 Bug 1684092 - Part 1: Replace MOZ_MUST_USE with [[nodiscard]] in js/src/. r=jandem
The MOZ_MUST_USE macro is defined as clang's and gcc's nonstandard __attribute__((warn_unused_result)). Now that we compile as C++17 by default (bug 1560664), we can replace MOZ_MUST_USE with C++17's standard [[nodiscard]] attribute.

Differential Revision: https://phabricator.services.mozilla.com/D100412
2021-02-12 04:09:22 +00:00
Jan de Mooij 0006dbabb4 Bug 1674777 part 12 - Add test for XPConnect array conversions involving large typed arrays. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D104052
2021-02-10 11:23:00 +00:00
Jan de Mooij df5c2e2c5e Bug 1674777 part 10 - Fix XPConnect callers for JS_GetTypedArrayLength returning size_t. r=kmag
For enumerateNames on Xrays, throw an OOM exception upfront. This matches what we do
inside the JS engine when enumerating large typed arrays.

Differential Revision: https://phabricator.services.mozilla.com/D103902
2021-02-10 11:22:59 +00:00
Andrew McCreight 64add637bd Bug 1624705 - Let Xray waiver nuking for local window proxies ride the trains. r=kmag
This has been on Nightly for almost a year and I don't think we've
seen any breakage, so I think it is time to let it ride the trains.

Differential Revision: https://phabricator.services.mozilla.com/D104555
2021-02-09 20:09:05 +00:00
Jan Varga 89ca2a95fb Bug 1690515 - Add missing do_get_profile calls to appropriate tests; r=dom-workers-and-storage-reviewers,necko-reviewers,sg,valentin
Differential Revision: https://phabricator.services.mozilla.com/D103886
2021-02-09 05:30:57 +00:00
Kris Maglione ee5e228113 Bug 1662846: Add memory reporter for loaded JS modules and components. r=mccr8
This makes it much easier to determine which modules and components are loaded
in which processes now that they no longer each have their own compartments.

Differential Revision: https://phabricator.services.mozilla.com/D99717
2021-02-08 23:36:14 +00:00
Kershaw Chang 22a60154b9 Bug 1685942 - Only fallback to original conn info when network error happens r=necko-reviewers,valentin,dragana
Differential Revision: https://phabricator.services.mozilla.com/D102703
2021-02-08 11:46:51 +00:00
Ryan Hunt 481e12d80f Bug 1689273 - Remove expiring JS and wasm probes. r=lth
This commit removes the expiring probes:
 * wasm.compile_time_baseline_us
 * wasm.compile_time_cranelift_us
 * wasm.compile_time_ion_us
 * js.run_time_us

Execution runtime is still measured in the JS interpreter for still
active probes.

Differential Revision: https://phabricator.services.mozilla.com/D104143
2021-02-05 15:04:14 +00:00
Oleg Skoromnik cd2514ec74 Bug 1428742 - use Value::toGCCellPtr and delegating ctr of GCCellPtr. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D103589
2021-02-03 20:13:10 +00:00
Matthew Gaudet d5c7f81a2c Bug 1690115 - Remove off_thread_parse_global preference r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D103718
2021-02-02 03:24:31 +00:00
Jan de Mooij 6b0004f4f5 Bug 1688616 part 1 - Add a browser pref for large ArrayBuffers. r=lth
The pref is only checked on startup and sets a process-wide flag, so that we
don't have to worry about the value changing from under us.

Differential Revision: https://phabricator.services.mozilla.com/D102911
2021-01-30 16:14:30 +00:00
Butkovits Atila 80ba5dd933 Backed out 2 changesets (bug 1688616) for casing failures on test_large_arraybuffers.html. CLOSED TREE
Backed out changeset 560718ce8d2c (bug 1688616)
Backed out changeset 7985fd012bc7 (bug 1688616)
2021-01-30 18:10:09 +02:00
Jan de Mooij 950369e123 Bug 1688616 part 1 - Add a browser pref for large ArrayBuffers. r=lth
The pref is only checked on startup and sets a process-wide flag, so that we
don't have to worry about the value changing from under us.

Differential Revision: https://phabricator.services.mozilla.com/D102911
2021-01-27 11:53:23 +00:00
Ted Campbell f5fafb46ce Bug 1689734 - Further restrict ScriptPreloader use of CompileOptions. r=kmag,arai
The JS CompileOptions used to load cache entries must be consistent with
eachother to avoid subtle and serious bugs. This adds additional checks and
makes more consistent use of `FillCompileOptionsForCachedScript`.

This patch is a refactoring and should not change any behaviour.

Depends on D103515

Differential Revision: https://phabricator.services.mozilla.com/D103516
2021-01-29 22:54:59 +00:00
Nick Alexander 6629e8cc0c Bug 1688861 - Fix test_categoryBackgroundTaskRegistration when !MOZ_BACKGROUNDTASK. r=nika
This was an oversight: as the commit series progressed, I didn't
re-test with !MOZ_BACKGROUNDTASK defined.

Differential Revision: https://phabricator.services.mozilla.com/D103081
2021-01-26 21:37:52 +00:00
Nick Alexander 4803fb7c62 Bug 1675848 - Post: In tests, camelCase for mutable variables and reasons for assertions. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D100821
2021-01-25 23:48:17 +00:00
Nick Alexander dc4f42262e Bug 1675848 - Part 1: Add "backgroundtask" filter to chrome manifest parsing. r=mossop,kmag
This allows to filter chrome manifest registration by the current
background task(s, in the future).  Filtration behaves just like
filtering by "application":

* filter with `backgroundtask=` means disable for all background
  tasks, since no background task will match ""

* filter with `backgroundtask!=` means enable for all background task,
  since every background task will not match ""

Differential Revision: https://phabricator.services.mozilla.com/D96482
2021-01-25 23:44:46 +00:00
Tooru Fujisawa 51226a3690 Bug 1688190 - Part 6: Make JS::RealmBehaviorsRef return const reference. r=tcampbell
Depends on D102761

Differential Revision: https://phabricator.services.mozilla.com/D102762
2021-01-22 21:52:30 +00:00
Nika Layzell 588666a81d Bug 1686825 - Don't perform PropertyKey::fromPinnedString if the string creation failed, r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D102483
2021-01-21 23:36:36 +00:00
Gijs Kruitbosch 208fdcb45f Bug 1686816 - use AppendFloat to fix floating point separator issues with the slow script warning probe in localized environments, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101852
2021-01-15 03:11:34 +00:00
Shane Caraveo 6a2b434485 Bug 1594234 remove extensions.content_script_csp preferences in favor of extensions.manifestV3.enabled r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D101212
2021-01-19 19:43:09 +00:00
Shane Caraveo 4a14410028 Bug 1594234 manifest v3 content security policy support r=robwu,geckoview-reviewers,agi
Implement manifest v3 CSP that is compatible with the current chrome implementation.

Support for content_security_policy.isolated_world (a.k.a. content_security_policy.content_scripts)
has been removed for consistency with
345390adf6%5E%21/

Differential Revision: https://phabricator.services.mozilla.com/D100573
2021-01-07 14:53:18 +00:00
Luke Wagner 96147a3ab6 Bug 1647791 - WebAssembly: add telemetry for duplicate imports r=lth
Differential Revision: https://phabricator.services.mozilla.com/D100555
2021-01-07 23:50:38 +00:00
Steve Fink 67527b7f14 Bug 1685420 - ~nsCOMPtr and related hazard fixes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D100966
2021-01-12 22:25:07 +00:00
Jan de Mooij 3e48042164 Bug 1682767 part 48 - Remove Ion optimization levels. r=iain
Warp doesn't use this and there's a lot of complexity to support recompiling
an IonScript while continuing to use the current one.

It might make sense to add a similar hot tier to Warp at some point, but because
Warp uses trial inlining the implementation would likely be pretty different:
we could invalidate, flag the JitScript as supporting different inlining thresholds,
and go back to Baseline to gather information.

Differential Revision: https://phabricator.services.mozilla.com/D101457
2021-01-13 12:05:30 +00:00
Christoph Kerschbaumer a560a97624 Bug 1686003: Use different origin in test test_sandbox_fetch.html to comply with Principal based vetting in ContentParent. r=mt
Differential Revision: https://phabricator.services.mozilla.com/D101336
2021-01-12 11:05:28 +00:00
yulia 0ff486bf16 Bug 1681664 - Allow Top-level await modules which fail to evaluate due to user action to fail without crashing. r=jonco,mconley
Differential Revision: https://phabricator.services.mozilla.com/D99809
2021-01-11 17:08:59 +00:00
Brindusan Cristian 26d3d1cbc4 Backed out changeset 748d8c28435d (bug 1662846) for mochitest failures at test_memoryReporters.xhtml. CLOSED TREE 2021-01-09 01:03:12 +02:00
Kris Maglione 874e9acf8e Bug 1662846: Add memory reporter for loaded JS modules and components. r=mccr8
This makes it much easier to determine which modules and components are loaded
in which processes now that they no longer each have their own compartments.

Differential Revision: https://phabricator.services.mozilla.com/D99717
2020-12-14 23:05:03 +00:00
Gerald Squelart 0048130855 Bug 1684389 - Move profiler_init/shutdown from shared XRE_XPCShellMain to xpcshell.cpp's main - r=canaltinova
XRE_XPCShellMain is called from either nsBrowserApp.cpp's main (Firefox app) and xpcshell.cpp's main (XPCShell stand-alone app).
Since bug 1673623, XRE_XPCShellMain calls profiler_init and profiler_shutdown, as needed by some other code.
Unfortunately nsBrowserApp.cpp's main already calls profiler_init, the new calls are nested, which is not allowed and triggers an assertion when running `firefox -xpcshell`.

So the calls to profiler_init/shutdown are now moved out of XRE_XPCShellMain, and up into xpcshell.cpp's main; this way the Base Profiler will be properly initialized&shutdown once in both the Firefox and XPCShell apps.

Differential Revision: https://phabricator.services.mozilla.com/D100754
2021-01-06 13:17:08 +00:00
Razvan Maries 47f941747c Backed out changeset 540c9159c3c6 (bug 1681664) for perma failures on test_bug1681664.html. 2020-12-18 22:00:52 +02:00
yulia a1a1c495ea Bug 1681664 - Allow Top-level await modules which fail to evaluate due to user action to fail without crashing. r=jonco,mconley
Differential Revision: https://phabricator.services.mozilla.com/D99809
2020-12-18 12:37:36 +00:00
Steve Fink a1215827bb Bug 1673756 - Add GCCC subcategories for several phases of CC r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D99737
2020-12-15 16:48:23 +00:00
Lars T Hansen 810305d3e2 Bug 1672160 - SIMD wormhole. r=rhunt
Introduce a mechanism for experimenting with unary and binary SIMD
instructions (x64 + ion only, nightly only, and behind flags).
Basically this is useful for performance experiments.

A specific pattern of the first 15 bytes of the mask of the shuffle
opcode is recognized as a trigger; the last byte has the opcode 0..31.
For unary operations the two input values should be the same; the lhs
will always be chosen.  The pattern is recognized during lowering and
translated to specific machine instructions.

This mechanism is preferable to custom opcodes because it allows
existing tools (emscripten/llvm/binaryen/linkers) to be used without
change.

To trigger this, use --wasm-compiler=ion --wasm-simd-wormhole in the
shell or set javascript.options.wasm_baselinejit=false and
javascript.options.wasm_simd_wormhole=true in about:config.

This patch is mostly infrastructure but also introduces three
experimental opcodes: one to test for the presence and operation of
the wormhole, one to invoke the Intel PMADDUBSW instruction, and one
to invoke the Intel PMADDWD instruction.

Differential Revision: https://phabricator.services.mozilla.com/D94101
2020-12-15 09:49:35 +00:00
Butkovits Atila 5f456b2985 Backed out changeset ab835b3d50f9 (bug 1672160) for causing bustage on codegen-x64-test.js. CLOSED TREE 2020-12-15 10:43:44 +02:00
Lars T Hansen e67a161e57 Bug 1672160 - SIMD wormhole. r=rhunt
Introduce a mechanism for experimenting with unary and binary SIMD
instructions (x64 + ion only, nightly only, and behind flags).
Basically this is useful for performance experiments.

A specific pattern of the first 15 bytes of the mask of the shuffle
opcode is recognized as a trigger; the last byte has the opcode 0..31.
For unary operations the two input values should be the same; the lhs
will always be chosen.  The pattern is recognized during lowering and
translated to specific machine instructions.

This mechanism is preferable to custom opcodes because it allows
existing tools (emscripten/llvm/binaryen/linkers) to be used without
change.

To trigger this, use --wasm-compiler=ion --wasm-simd-wormhole in the
shell or set javascript.options.wasm_baselinejit=false and
javascript.options.wasm_simd_wormhole=true in about:config.

This patch is mostly infrastructure but also introduces three
experimental opcodes: one to test for the presence and operation of
the wormhole, one to invoke the Intel PMADDUBSW instruction, and one
to invoke the Intel PMADDWD instruction.

Differential Revision: https://phabricator.services.mozilla.com/D94101
2020-12-15 07:39:15 +00:00
Chris H-C a0efcbcf74 Bug 1673660 - C++ and JS API for Glean Custom Pings r=janerik,webidl,smaug
Covers adding the new JS global `GleanPings` for JS, the new structs for C++ at
mozilla::glean_pings, ping-id and string-table-index codegen, the usual
boilerplate for JS and C++ stuff, and tests.

Unresolved:
* What happens if we call this on a non-parent process?
  (This isn't a supported mode of operation)

Differential Revision: https://phabricator.services.mozilla.com/D98671
2020-12-14 16:50:07 +00:00
Chris H-C 8a65ae0861 Bug 1673660 - Move FOG C++ and JS API scaffolding headers to subdir r=janerik
Headers we want our consumers to use remain in mozilla/glean,
but scaffolding now lives in mozilla/glean/bindings.

This will allow me to have a binding for the GleanPings global in GleanPings.h
AS WELL AS a GleanPings.h which is the C++ consumer API for custom pings.

Differential Revision: https://phabricator.services.mozilla.com/D98670
2020-12-14 16:49:43 +00:00
Ted Campbell c90491dbe9 Bug 1601632 - Cleanup ScriptPreloader Runnable behaviour. r=kmag,Gankro,decoder
Add `mWaitingForDecode` to indicate that main-thread is blocked on the
Monitor and should be woken. This avoids generating some of the unused
Runnables. Also ensure `mFinishDecodeRunnablePending` is only accessed while
holding the lock.

Depends on D99403

Differential Revision: https://phabricator.services.mozilla.com/D99404
2020-12-14 15:23:56 +00:00
Ted Campbell d8e3670c2f Bug 1601632 - Make ScriptPreloader::mToken updates Atomic. r=kmag,Gankro,decoder
The `mToken` is used across threads without full locking so it must be marked
as atomic. At the same time, we can use `exchange` operations to read or
write outside of the mMonitor lock.

Depends on D99402

Differential Revision: https://phabricator.services.mozilla.com/D99403
2020-12-14 15:23:48 +00:00
Ted Campbell 70f361ffe6 Bug 1608462 - Simplify locking for ScriptPreloader::MaybeFinishOffThreadDecode. r=kmag,Gankro,decoder
Be consistent about always calling `MaybeFinishOffThreadDecode` without
holding the lock to simplify code. This lets us remove a TSAN deadlock
exception.

Differential Revision: https://phabricator.services.mozilla.com/D99402
2020-12-14 15:23:34 +00:00
Andrew McCreight 215e494a20 Bug 1640445 - Avoid a race between the GC and WriteCache() with an extra field. r=kmag,decoder
See the comment on ScriptHolder for an explanation.

Differential Revision: https://phabricator.services.mozilla.com/D78711
2020-12-11 23:25:27 +00:00
Simon Giesecke e06a2d56fc Bug 1680269 - Fix build when building without MOZ_GECKO_PROFILER. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D99063
2020-12-09 08:58:06 +00:00
Dan Minor 0b1722fcb7 Bug 1635561 - Use RegionalPrefLocales rather than AppLocale in xpc_LocalizeRuntime; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D98390
2020-12-07 19:27:36 +00:00
Tom Schuster 738aaeb6e6 Bug 1658308 - Implement the .at() proposal. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D98743
2020-12-04 14:46:00 +00:00
Jan de Mooij fa7884fad8 Bug 1673553 part 79 - Remove now dead TI memory reporters. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D98583
2020-12-04 10:08:53 +00:00
yulia 21b5f80d1d Bug 1519100 - Add flag for experimental Top Level Await feature; r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D97180
2020-12-04 08:52:29 +00:00
Razvan Maries d1855adf59 Backed out 4 changesets (bug 1635561) for perma failures on test_intlUtils_getLocaleInfo.html. CLOSED TREE
Backed out changeset d4ef63a42094 (bug 1635561)
Backed out changeset 21d942cfc35d (bug 1635561)
Backed out changeset 562e4afa8a10 (bug 1635561)
Backed out changeset 05b8c9d0b50d (bug 1635561)
2020-12-03 23:07:09 +02:00
Dan Minor d30c3cd567 Bug 1635561 - Use RegionalPrefLocales rather than AppLocale in xpc_LocalizeRuntime; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D98390
2020-12-03 18:53:27 +00:00
Razvan Maries 8cbedc3a4d Backed out 15 changesets (bug 1519100) as per Yulia's request. CLOSED TREE
Backed out changeset 16dc37dadf05 (bug 1519100)
Backed out changeset 019b00c63941 (bug 1519100)
Backed out changeset 1155eecec034 (bug 1519100)
Backed out changeset 53a792431e11 (bug 1519100)
Backed out changeset 55918f941155 (bug 1519100)
Backed out changeset 683743bd0395 (bug 1519100)
Backed out changeset 63d506024693 (bug 1519100)
Backed out changeset 8b5244786634 (bug 1519100)
Backed out changeset 3a0a021acc08 (bug 1519100)
Backed out changeset d5bff6c95feb (bug 1519100)
Backed out changeset bab7e81a6c2c (bug 1519100)
Backed out changeset b521ccd694f8 (bug 1519100)
Backed out changeset 9f559a616909 (bug 1519100)
Backed out changeset 98146209da6f (bug 1519100)
Backed out changeset a3ea6c49dbf7 (bug 1519100)
2020-12-03 20:37:45 +02:00
yulia 517283f821 Bug 1519100 - Add flag for experimental Top Level Await feature; r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D97180
2020-12-03 15:24:22 +00:00
Jan de Mooij a24d6b0558 Bug 1673553 part 67 - Remove JS_NewObjectWithUniqueType. r=iain
We no longer need this API to create singleton objects. It was used to prevent
polluting type information.

Differential Revision: https://phabricator.services.mozilla.com/D98499
2020-12-03 07:54:00 +00:00
Bogdan Tara c1b7803fbd Backed out 15 changesets (bug 1519100) for wpt leaks CLOSED TREE
Backed out changeset 7302ebdbaa35 (bug 1519100)
Backed out changeset 5b89081f0f08 (bug 1519100)
Backed out changeset ee02050e3c97 (bug 1519100)
Backed out changeset 47cf4bde107e (bug 1519100)
Backed out changeset bfd96f55a3bd (bug 1519100)
Backed out changeset c9afefd66eb7 (bug 1519100)
Backed out changeset 90b61247d071 (bug 1519100)
Backed out changeset e0250e4cba61 (bug 1519100)
Backed out changeset 5f90543431cb (bug 1519100)
Backed out changeset d7f3440addc7 (bug 1519100)
Backed out changeset 10194540aff0 (bug 1519100)
Backed out changeset 880873b815a4 (bug 1519100)
Backed out changeset d99f0109da7a (bug 1519100)
Backed out changeset c723f6b16b67 (bug 1519100)
Backed out changeset da24af409d92 (bug 1519100)
2020-12-02 21:14:35 +02:00
yulia 521140ab44 Bug 1519100 - Add flag for experimental Top Level Await feature; r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D97180
2020-12-02 12:38:17 +00:00
Nick Alexander 97a692a97b Bug 1679583 - Make "JS XPCOM" and "SubScript" marker stacks include helpful labels. r=mstange
We need to have the label in place before placing the marker and
capturing the accompanying stack to be able to identify the loaded JS.

Differential Revision: https://phabricator.services.mozilla.com/D98094
2020-12-01 17:20:02 +00:00
Simon Giesecke feb7572bff Bug 1678374 - Avoid including jsapi.h from header files. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D97620

Depends on D97618
2020-11-23 16:12:34 +00:00
Simon Giesecke ee949b8e10 Bug 1678374 - Reduce dependencies on js, in particular on jsfriendapi.h. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D97617

Depends on D97616
2020-11-23 16:12:19 +00:00
Simon Giesecke 39a3d6263c Bug 1677541 - Remove unnecessary includes from xpcpublic.h. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D94867

Depends on D94763
2020-11-23 16:07:06 +00:00
Simon Giesecke 5b3084384e Bug 1660470 - Move void_t/null_t to a new IPCCore.h header. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93546

Depends on D93544
2020-11-23 16:05:20 +00:00
Simon Giesecke c077183836 Bug 1660470 - Avoid including IPCMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93235

Depends on D93234
2020-11-23 16:03:47 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Gerald Squelart cc0abcfaee Bug 1675409 - Migrated TextMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96052
2020-11-18 21:54:13 +00:00
Razvan Maries b7eeb731df Backed out 23 changesets (bug 1675409) for build bustages on Preferences.cpp. CLOSED TREE
Backed out changeset c1a131a55767 (bug 1675409)
Backed out changeset 47d210802a5d (bug 1675409)
Backed out changeset e8ebb1c58d30 (bug 1675409)
Backed out changeset 69a1e9aeff2a (bug 1675409)
Backed out changeset 68f330b387a8 (bug 1675409)
Backed out changeset e4750d9ef5a1 (bug 1675409)
Backed out changeset bb6bb71e5ab3 (bug 1675409)
Backed out changeset 988d7f4716df (bug 1675409)
Backed out changeset ca41382e891c (bug 1675409)
Backed out changeset 90f3fbbbbeda (bug 1675409)
Backed out changeset 9b109d61a6f6 (bug 1675409)
Backed out changeset 3dd66abfdaa2 (bug 1675409)
Backed out changeset 44181df5f0db (bug 1675409)
Backed out changeset bb2603d947fc (bug 1675409)
Backed out changeset 97055cf20a56 (bug 1675409)
Backed out changeset f88fcf09de0d (bug 1675409)
Backed out changeset 7963e1c49786 (bug 1675409)
Backed out changeset 4c379c1061c3 (bug 1675409)
Backed out changeset b8be8ae7da63 (bug 1675409)
Backed out changeset 0b90aa89421e (bug 1675409)
Backed out changeset c10fb46467c9 (bug 1675409)
Backed out changeset 894ac233b290 (bug 1675409)
Backed out changeset 075d1d8e34c2 (bug 1675409)
2020-11-18 20:06:28 +02:00
Jan de Mooij 0b27ac66e5 Bug 1673553 part 12 - Remove TypeNewScript, PreliminaryObjectArray. r=iain
ObjectGroup::finalize is now an empty function so define it in the header.

The objectGroupsMallocHeap memory reporter can also be removed.

Differential Revision: https://phabricator.services.mozilla.com/D97292
2020-11-18 15:46:52 +00:00
Sylvestre Ledru bebb9f9181 Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp
It is bringing some minor changes

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90795
2020-11-18 09:05:59 +00:00
Gerald Squelart 786dd07114 Bug 1675409 - Migrated TextMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96052
2020-11-17 22:23:38 +00:00
Mihai Alexandru Michis c0d25b01b2 Backed out 24 changesets (bug 1666566, bug 1675409) for causing hazard failures in profiler/core/platform.cpp
CLOSED TREE

Backed out changeset 4d8af8533fd4 (bug 1666566)
Backed out changeset f031a3a8a20f (bug 1675409)
Backed out changeset 2b7e1a031921 (bug 1675409)
Backed out changeset bda5a24b2d0a (bug 1675409)
Backed out changeset 4282e2284314 (bug 1675409)
Backed out changeset 0637f1b26e9f (bug 1675409)
Backed out changeset 67ae04c8f607 (bug 1675409)
Backed out changeset 6c7b3f3618ef (bug 1675409)
Backed out changeset 2f325c22d169 (bug 1675409)
Backed out changeset 1e48ff70ad8f (bug 1675409)
Backed out changeset 1dfc32d6871d (bug 1675409)
Backed out changeset 4f1f218a777b (bug 1675409)
Backed out changeset e6ac8722b38e (bug 1675409)
Backed out changeset cf132e15fb57 (bug 1675409)
Backed out changeset a126e6b00ba9 (bug 1675409)
Backed out changeset fbc7fbb04f33 (bug 1675409)
Backed out changeset 554c69681474 (bug 1675409)
Backed out changeset 44d0521c701f (bug 1675409)
Backed out changeset 04653dfe4720 (bug 1675409)
Backed out changeset 41ca2c043a00 (bug 1675409)
Backed out changeset 264ae4c805d4 (bug 1675409)
Backed out changeset 5f3bbdac0d52 (bug 1675409)
Backed out changeset 11311c11a6e8 (bug 1675409)
Backed out changeset 0355fbc44baf (bug 1675409)
2020-11-17 19:31:28 +02:00
Gerald Squelart 7e40dbb3c5 Bug 1675409 - Migrated TextMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96052
2020-11-17 11:38:06 +00:00
Jan de Mooij a7b38d6598 Bug 1673553 part 3 - Remove Warp browser pref. r=iain,preferences-reviewers
Depends on D96988

Differential Revision: https://phabricator.services.mozilla.com/D96989
2020-11-16 14:00:04 +00:00
Lars T Hansen adf086b335 Bug 1674722 - Fix prefs, switches, and selection for cranelift. r=rhunt
This patch makes cranelift and ion exclusive of each other: enabling
cranelift on a platform will effectively disable Ion on that platform.

Specifically there's a change at the pref/switch level that does not
go terribly deep:

- the new about:config option is javascript.options.wasm_optimizingjit,
  the old wasm_cranelift and wasm_ionjit are no more
- new values of X in --wasm-compiler=X in the js shell are 'optimizing'
  and 'baseline+optimizing', the old values 'cranelift', 'ion',
  'baseline+ion' and 'baseline+optimizing' are still accepted but only
  when ion or cranelift is available
- we keep the separate prefs internally in the code for ion and cranelift
  but if ENABLE_WASM_CRANELIFT is defined then we never set the ion
  pref to true, and if it is not defined then we never set the cranelift
  pref to true

The trickiest changes are in testWasm.cpp and in the JIT compiler option
processing in jsapi.cpp.

People who will suffer as a result of this are those who are working
on ports of cranelift to new platforms in Firefox.  As of now we have
no such work going on.

In the longer term the exclusive-or situation can be alleviated by a
switch that lets cranelift override ion when cranelift is present and
the switch is on.  Patches welcome.

Differential Revision: https://phabricator.services.mozilla.com/D96059
2020-11-11 09:20:13 +00:00
Alexis Beingessner 2507488d07 Bug 1506812 - Wrap all accesses to URLPreloader's mReaderThread in a mutex. r=decoder,nika
The shutdown code of BackgroundReadFiles races with BeginBackgroundRead.
This is paritally obfuscated by the usage of the initialEvent convenience
of NS_NewNamedThread, so this change also removes that in favour of explicit
dispatch. (xpcom devs want to remove the convenience anyway)

Differential Revision: https://phabricator.services.mozilla.com/D94877
2020-11-02 23:26:05 +00:00
Dragana Damjanovic 5dc542764f Bug 1673611 - Improve Http3Stream state machine and add a test for a protocol error r=necko-reviewers,valentin
- We have an assumption that SetResponseHeaders will be called before WriteSegments is called for the first time. I would like to make it more structural add add a new state BEFORE_HEADERS
 - mDataReceived was never set, which is wrong.
 - Almost any error that occurs during ReadResponseData is a connection error and neqo will handle it internally by closing the session. This will be read by necko as ConnectionState change event. Therefore ignore errors received from mHttp3Connection->ReadResponseData and let the ConnectionChange event close the stream.
 - This also adds a test. Because the stream has received some data already the transaction will br closed with the NS_ERROR_NET_PARTIAL_TRANSFER error.

Differential Revision: https://phabricator.services.mozilla.com/D94951
2020-11-01 13:54:02 +00:00
Jeff Walden ecdf88a72e Bug 1502355 - Rename |JS::InitAbortSignalHandling| to |JS::InitPipeToHandling|, because this embedder interface is going to get a lot more pipeTo-specific shortly... r=arai
Differential Revision: https://phabricator.services.mozilla.com/D92351
2020-10-30 21:22:04 +00:00
Greg Tatum c66aecf287 Bug 1673623 - Initialize the baseprofiler in xpcshell tests; r=gerald
The baseprofiler is required to be in place first for features that are only
implemented in the baseprofiler, such as the MarkerThreadId::MainThread().
This patch adds the initialization, and upates the ProfilerIOInterposeObserver
to use baseprofiler-only features.

The issue before, was that the base profiler was not initialized, and the
mozilla::baseprofiler::profiler_main_thread_id() was incorrectly reporting that
the main thread index was 0.

No tests were changed in this patch, but it does have coverage with:

tools/profiler/tests/xpcshell/test_feature_fileioall.js

This test would fail with just the interposer changes.

Differential Revision: https://phabricator.services.mozilla.com/D94839
2020-10-27 21:42:20 +00:00
Andrew McCreight 1982467281 Bug 1673435 - Don't print out nsISupports in XPCWrappedNative::ToString() unless it is the only interface. r=nika
The first interface is always nsISupports, so there's no need
for the check here. This lets me remove the cx argument.

Differential Revision: https://phabricator.services.mozilla.com/D94756
2020-10-26 21:25:29 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Gijs Kruitbosch af15d01659 Bug 1666221 - cope with not having a working directory, r=robwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D91221
2020-10-22 19:44:46 +00:00
Jan-Erik Rediger eeb5f1a8c2 Bug 1646165 - Implement FOG's JavaScript API via WebIDL. r=chutten,webidl,emilio,smaug
This is only the basic outline.
It doesn't do anything yet, but compile.
As there are no metrics generated for it it can't look up anything.

To note: Actual metric types are implemented in XPIDL later.

The following (priviliged) JavaScript code will soon work (if the
corresponding metrics would be defined):

const { Glean } = ChromeUtils.import("resource://gre/modules/Glean.jsm");
Glean.shared.test_only.count_things.add(1);

Differential Revision: https://phabricator.services.mozilla.com/D92211
2020-10-21 11:36:46 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Nicolas B. Pierron b2484ec979 Bug 1582804 - Add JS Shell telemetry output. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D46782
2020-10-21 14:33:08 +00:00
smolnar 33b2be0f5e Backed out 2 changesets (bug 1583516, bug 1582804) for causing sm bustages on js. CLOSED TREE
Backed out changeset ecd87c380c0e (bug 1583516)
Backed out changeset db121b778773 (bug 1582804)
2020-10-21 17:28:55 +03:00
Nicolas B. Pierron 613b618170 Bug 1582804 - Add JS Shell telemetry output. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D46782
2020-10-20 14:27:07 +00:00
Andrew McCreight 540115aed5 Bug 1672075 - Don't collect MEMORY_UNIQUE_CONTENT_STARTUP for the privileged process. r=kmag
The value is higher in privileged processes because it is measured later,
which is making the value skewed when comparing Fission to non-Fission.

Differential Revision: https://phabricator.services.mozilla.com/D94059
2020-10-20 18:43:15 +00:00
Tom Schuster 436fcfbe71 Bug 1658308 - Backout Array.prototype.item and %TypedArray%.prototype.item.
There are too many web compatibility issues. Keeping this on Nightly is not going
to be useful.

Differential Revision: https://phabricator.services.mozilla.com/D92987
2020-10-08 19:34:08 +00:00
Gijs Kruitbosch 41e01e0273 Bug 1667245 - collect telemetry when we would have shown the slow script modal dialog for parent process hangs, r=mccr8,esmyth
Differential Revision: https://phabricator.services.mozilla.com/D91745
2020-10-07 22:49:43 +00:00
Bobby Holley daf490c526 Bug 1669556 - Remove nsIXPCScriptable enumerate hook. r=mccr8
NewEnumerate is used, but Enumerate isn't.

Differential Revision: https://phabricator.services.mozilla.com/D92685
2020-10-07 20:06:18 +00:00
Bobby Holley e3c690c7da Bug 1669556 - Miscellaneous dead code removal. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D92684
2020-10-07 20:06:16 +00:00
Bobby Holley 80dc7d0169 Bug 1669556 - Simplify FilteringWrapper. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D92683
2020-10-07 20:06:13 +00:00
Bobby Holley ca99f17aad Bug 1669556 - Simplify PreCreate handling WrapperFactory. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D92682
2020-10-07 20:06:06 +00:00
Bobby Holley 347101914e Bug 1669556 - Remove XrayUtils::HasNativeProperty. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D92681
2020-10-07 20:06:03 +00:00
Tooru Fujisawa 12a7a5ef4b Bug 1666683 - Part 12: Add JS::CheckCompileOptionsMatch and check options in ScriptPreloader. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92414
2020-10-06 21:18:30 +00:00
Tooru Fujisawa eeec119a7e Bug 1666683 - Part 10: Check CompileOptions when decoding XDR. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D92412
2020-10-06 21:17:23 +00:00
Tooru Fujisawa 6ab3eef906 Bug 1666683 - Part 6: Add ScriptPreloader::FillCompileOptionsForCachedScript. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92408
2020-10-06 21:16:57 +00:00
Tooru Fujisawa 436f86f9a2 Bug 1666683 - Part 5: Add options parameter to nsXPConnect::ReadScript. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92407
2020-10-07 04:46:55 +00:00
Tooru Fujisawa cecfd1a80f Bug 1666683 - Part 4: Add options parameter to ReadCachedScript in mozJSLoaderUtils. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92406
2020-10-06 21:16:42 +00:00
Tooru Fujisawa f1c1132d55 Bug 1666683 - Part 3: Add options parameter to ScriptPreloader::GetCachedScript. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92405
2020-10-06 21:16:35 +00:00
Tooru Fujisawa 1bbf424a35 Bug 1666683 - Part 2: Add CompileOptions parameter to JS::DecodeScript, as a placeholder. r=tcampbell
This adds the parameter, without using it, also without passing the correct
value.
The later patch will change the consumer of those API to pass the correct value,
and then use the passed parameter.

Differential Revision: https://phabricator.services.mozilla.com/D92404
2020-10-06 21:16:22 +00:00
Kris Maglione 14b628d060 Bug 1664547: Hold mSaveMonitor while changing mCacheInvalidated. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D91985
2020-09-30 21:30:39 +00:00
Kris Maglione 9feb23a7d6 Bug 1610246: Don't spawn a second save thread when one already exists. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D91990
2020-09-30 22:30:13 +00:00
André Bargull 7e04b39310 Bug 1668785: Remove using declarations from namespace level in Proxy.h. r=mgaudet
The `using` declarations in "Proxy.h" make it act like a second
"NamespaceImports.h", introducing names from `JS` into the `js` namespace.

Remove the `using` declarations from "Proxy.h" and then fix up the breakage by:
- Prepend `JS::` in various header files.
- Add "NamespaceImports.h" in cpp files.
- Add `PropertyDescriptor` to "NamespaceImports.h". There are many unqualified
  references to `PropertyDescriptor`, making it a prime candidate for
  "NamespaceImports.h".

Drive-by changes:
- Use local variables in `CheckProxyFlags()` to make the `static_assert`
  conditions more readable.

Differential Revision: https://phabricator.services.mozilla.com/D92207
2020-10-02 12:51:03 +00:00
Gerald Squelart ee701f64d7 Bug 1667915 - Separate marker category from marker options - r=gregtatum
The `category.WithOptions(...)` syntax was a bit strange and difficult to explain.

Now the category and options are separate parameters. Default options can be specified with `MarkerOptions{}` or just `{}`.

As a special case, defaulted-NoPayload functions don't need `<>`, and defaulted-NoPayload functions and macros don't even need `{}` for default options, e.g.:
`profiler_add_marker("name", OTHER); PROFILER_MARKER_UNTYPED("name", OTHER);`

Differential Revision: https://phabricator.services.mozilla.com/D91680
2020-10-01 11:02:23 +00:00
Bogdan Tara ababae891b Backed out 2 changesets (bug 1667915) for platform related bustage CLOSED TREE
Backed out changeset e7a0788a1741 (bug 1667915)
Backed out changeset d34505b2d81b (bug 1667915)
2020-10-01 12:34:39 +03:00
Gerald Squelart e07ae06a1d Bug 1667915 - Separate marker category from marker options - r=gregtatum
The `category.WithOptions(...)` syntax was a bit strange and difficult to explain.

Now the category and options are separate parameters. Default options can be specified with `MarkerOptions{}` or just `{}`.

As a special case, defaulted-NoPayload functions don't need `<>`, and defaulted-NoPayload functions and macros don't even need `{}` for default options, e.g.:
`profiler_add_marker("name", OTHER); PROFILER_MARKER_UNTYPED("name", OTHER);`

Differential Revision: https://phabricator.services.mozilla.com/D91680
2020-10-01 01:44:47 +00:00
Ryan Hunt 33b1e95109 Bug 1664361 - wasm: Add function-references configuration option and runtime flag. r=lth
This commit adds the boilerplate machinery for the function-references proposal. The
interesting piece is that the GC proposal is moved to require the function-references
proposal to be enabled.

The configuration machinery for features is refactored in this commit to avoid passing
6 different booleans around as parameters to functions.
 * A FeatureArgs struct is added with values for all 'feature' configuration options
   - A feature is defined as an option that affects validation or semantics
   - Essentially everything besides 'debug', 'mode', 'tier'
 * All feature configuration responsibility is removed from CompilerEnvironment
 * ModuleEnvironment is modified to accept a FeatureArgs in addition to a
   CompilerEnvironment
   - The CompilerEnvironment field may eventually be removed, as it's not needed
     within function validation, and is only used by the compilers later

Differential Revision: https://phabricator.services.mozilla.com/D89857
2020-09-28 19:18:48 +00:00
Florian Quèze 55e7194f29 Bug 1667272 - Add profiler markers when Services are loaded, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D91459
2020-09-28 15:12:14 +00:00
Christoph Kerschbaumer 359ca7017e Bug 1666419: Assert IsSafeToRunScript. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D91391
2020-09-28 06:29:44 +00:00
Tom Schuster 4859a3db51 Bug 1658308 - Implement Array.prototype.item and %TypedArray%.prototype.item in Nightly. r=anba
We don't implement String.prototype.item: https://github.com/tc39/proposal-item-method/issues/20

Differential Revision: https://phabricator.services.mozilla.com/D90732
2020-09-26 20:54:59 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Kris Maglione 6315798344 Bug 1663747: Part 2 - Use PastShutdownPhase() in component loader shutdown checks. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89810
2020-09-22 00:58:02 +00:00
Mihai Alexandru Michis a9f468308c Backed out 2 changesets (bug 1663747) for causing xpcshell failures in ThrottledEventQueue.
CLOSED TREE

Backed out changeset 643aa6baf458 (bug 1663747)
Backed out changeset 491472fe44f4 (bug 1663747)
2020-09-22 03:54:59 +03:00
Kris Maglione 230ad04844 Bug 1663747: Part 2 - Use PastShutdownPhase() in component loader shutdown checks. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89810
2020-09-21 19:20:42 +00:00
Sylvestre Ledru ec8859e69e Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90793
2020-09-20 10:14:09 +00:00
Doug Thayer 025f5fb9f0 Bug 1656261 - Back out all recent StartupCache work r=RyanVM
This backs out all work from bug 1627075 as well as all of its
descendents. There were a few conflicts when backing this out but
overall it was pretty clean, so I would say it's a fairly mild
level of risk. Historically Nathan Froyd has reviewed these patches,
but he is no longer at Mozilla, and no one else is particularly
familiar with the code, so I am passing this off to RyanVM who has
at least been familiar with the history of the bug.

Differential Revision: https://phabricator.services.mozilla.com/D90096
2020-09-14 17:00:53 +00:00
Gerald Squelart a087b2df35 Bug 1663554 - Convert AUTO_PROFILER_TEXT_MARKER_... to new AUTO_PROFILER_MARKER_TEXT - r=gregtatum
The name `AUTO_PROFILER_MARKER_TEXT` is more consistent with the equivalent non-`AUTO` macro, and similarly arguments have been re-ordered to be the same, i.e.: Name, category&options, text.

The different macros with different argument sets can now be collapsed into one macro, and the optional arguments (timing, inner window id, backtrace) can easily be added to the `MarkerOptions` where needed.

As a bonus, a specific start time can optionally be provided at construction time.

Differential Revision: https://phabricator.services.mozilla.com/D89588
2020-09-11 00:42:51 +00:00
Tooru Fujisawa 0a00eddff0 Bug 1664182 - Add JS::SetUseOffThreadParseGlobal and js::UseOffThreadParseGlobal, replacing JS::ContextOptions::setUseOffThreadParseGlobal. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D89784
2020-09-10 16:05:39 +00:00
Tooru Fujisawa 68d7cb31bf Bug 1663889 - Remove JS::CompileForNonSyntacticScope and set CompileOptions in caller. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D89688
2020-09-10 15:00:36 +00:00
Simon Giesecke 254c759317 Bug 1663924 - Create single-element arrays in-place. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D89601
2020-09-10 10:15:05 +00:00
Andrew McCreight bff4fd6721 Bug 1663690, part 2 - Inline mozJSComponentLoader::ReallyInit(). r=kmag
This method only asserts that mInitialized is false, then sets
mInitialized to true. All call sites check that the flag is false,
so the assertion is redundant, so this method can be inlined
and simplified.

Differential Revision: https://phabricator.services.mozilla.com/D89480
2020-09-09 19:03:51 +00:00
Andrew McCreight 33ddd4eb56 Bug 1663690, part 1 - Remove ComponentLoaderInfo::EnsureKey(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D89479
2020-09-09 19:03:49 +00:00
Razvan Maries c20f78dd7e Backed out 2 changesets (bug 1663690) for build bustages on mozJSComponentLoader.cpp. CLOSED TREE
Backed out changeset 04236fadb4cc (bug 1663690)
Backed out changeset 3def11143e6c (bug 1663690)
2020-09-09 21:05:54 +03:00
Andrew McCreight dbaf62267d Bug 1663690, part 2 - Inline mozJSComponentLoader::ReallyInit(). r=kmag
This method only asserts that mInitialized is false, then sets
mInitialized to true. All call sites check that the flag is false,
so the assertion is redundant, so this method can be inlined
and simplified.

Differential Revision: https://phabricator.services.mozilla.com/D89480
2020-09-08 18:43:22 +00:00
Andrew McCreight 02d01fc48b Bug 1663690, part 1 - Remove ComponentLoaderInfo::EnsureKey(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D89479
2020-09-08 18:41:39 +00:00
Jeff Walden 45d8047ca9 Bug 1663365 - Move JSM environment-related functionality to its own header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89335
2020-09-08 22:57:01 +00:00
Jeff Walden 5c5e824b56 Bug 1663365 - Move allocation-logging functions and |JS_COUNT_{CTOR,DTOR}| into a separate header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89334
2020-09-08 22:56:56 +00:00
Jeff Walden 6d5beafab1 Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +00:00
Jeff Walden 5608660da2 Bug 1663365 - Move |XrayJitInfo| functionality to its own friend header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89331
2020-09-08 22:51:10 +00:00
Jeff Walden b5ec4c7eba Bug 1663365 - Create a new js/public/String.h header seeded with the inline string functions previously found in jsfriendapi.h. (More functions ought be added/moved here, but these make a good start.) r=jandem,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D89330
2020-09-08 22:50:52 +00:00
Andrew McCreight ff2f7c0866 Bug 1663315 - Don't load new JSMs during shutdown. r=kmag
Under unknown circumstances, we can end up running chrome
JS during thread manager shutdown. Sometimes this ends up
trying to load new JSMs, but gJarHandler has already been
cleared, leading to a crash.

To avoid this and other issues, this patch forbids the
importing of new JSMs after we're late enough in shutdown
to have cleared the ClearOnShutdown pointers. I allow the
importing of JSMs that have already been loaded, as that
seems like it should be okay.

Differential Revision: https://phabricator.services.mozilla.com/D89477
2020-09-08 19:36:27 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Olli Pettay b163d0ab51 Bug 1661812 - Consider to use longer timeout for slow script warning if there isn't any important user input pending r=mccr8,geckoview-reviewers,snorp
The patch converts the relevant prefs to use StaticPrefList and let's content JS in child processes to run longer if there
aren't mousedown/ups or keyevents or such. mousemove or wheel aren't considered as important events.

Differential Revision: https://phabricator.services.mozilla.com/D88668
2020-09-01 07:21:26 +00:00
Jan de Mooij 46f865b1a5 Bug 1661930 - Add GetScriptTranscodingBuildId and use it for both XDR and bytecode cache MIME type. r=nbp,tcampbell
This lets us include some extra flags in the MIME type that's used by the bytecode
cache. It also simplifies the XDR code a bit.

The approach is similar to Wasm's GetOptimizedEncodingBuildId.

Differential Revision: https://phabricator.services.mozilla.com/D88726
2020-08-31 19:38:31 +00:00
Tooru Fujisawa 6eecdba324 Bug 1662140 - Add javascript.options.off_thread_parse_global pref and --no-off-thread-parse-global shell option. r=tcampbell
This adds the preference, JS shell option, and {ContextOptions,CompileOptions} fields,
but the value isn't read and the code always acts as it's set to true.

Differential Revision: https://phabricator.services.mozilla.com/D88922
2020-08-31 23:32:14 +00:00
Simon Giesecke ff85972891 Bug 1661476 - Prevent Result<const V, E> or Result<V, const E> from being instantiated. r=froydnj
Also, remove the existing uses of Result<const nsCString, nsresult> in URLPreloader
and Result<CryptoScheme, const nsCString> in SampleIterator.

Differential Revision: https://phabricator.services.mozilla.com/D88419
2020-08-28 14:16:35 +00:00
Jan de Mooij d5d87317dc Bug 1661426 part 2 - Add a browser pref for Warp. r=iain
The TI flag is only defined on Nightly (non-Nightly hardcodes to true) so for now
the pref is Nightly-only too.

Differential Revision: https://phabricator.services.mozilla.com/D88406
2020-08-28 03:09:28 +00:00
Mike Hommey 790f20eebd Bug 1659902 - Account for the larger page size on arm64 mac for ReadOnlyPage. r=mccr8
Eventually we'll have to adjust on x86_64 mac too if we want to be able
to run some tests under Rosetta, but let's leave that for another day.

Differential Revision: https://phabricator.services.mozilla.com/D87549
2020-08-19 18:06:49 +00:00
Jeff Walden 0136cc322d Bug 1502355 - Recognize already-aborted signals passed to |ReadableStreamPipeTo| and don't pipe in this case. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D87380
2020-08-18 20:50:24 +00:00
Jeff Walden a5cfe7db08 Bug 1502355 - Correctly detect AbortSignal instances using a |const JSClass*| supplied by the embedding. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D87379
2020-08-18 20:50:21 +00:00
Kris Maglione 0c976d908a Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-08-17 20:22:12 +00:00
Kris Maglione 3af8c4138c Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-08-17 20:20:50 +00:00
Adam Vandolder 0ebdab674a Bug 1659261 - Declare privateMethodsEnabled outside of just nightly. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D87282
2020-08-17 14:06:36 +00:00
Adam Vandolder c9aad0c1b1 Bug 1435826 - Add pref for private methods. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D86556
2020-08-14 14:11:02 +00:00
Tooru Fujisawa 39f40e654c Bug 1658621 - Remove JS_WEB_PARSER_COMPILE_LAZY_AFTER_MS/JS_PRIVILEGED_PARSER_COMPILE_LAZY_AFTER_MS probes. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D86751
2020-08-11 20:19:51 +00:00
Matthew Gaudet f1e25e9043 Bug 1654851 - Correctly handle transplanting objects with private fields r=jorendorff,extension-reviewers,zombie
As part of DOM node adoption they are transplanted, and their expando chains are copied over.

This copying uses JS_CopyPropertiesFrom, which until this patch, cannot see
private fields as they are excluded from property iteration. This patch adds
property iteration for private fields, and renames JS_CopyPropertiesFrom to
JS_CopyOwnPropertiesAndPrivateFields which is more accurate.

The users of this method are all doing object manipulation in ways where
preserving the copied private field is the better default.

In addition to testing DOM nodes explicitly, this patch also adds a jit-test
which uses transplantableObject to test similar things with FakeDOMObjects.

Differential Revision: https://phabricator.services.mozilla.com/D84737
2020-08-11 21:35:40 +00:00
Matthew Gaudet d17334a69d Bug 1655563 - Ensure Private Fields are enabled in workers, following the preference setting r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D85866
2020-08-11 19:12:49 +00:00
Matthew Gaudet 365a6221f5 Bug 1655729 - Correct merge to beta error for private fields r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D85164
2020-08-11 19:13:26 +00:00
Andrew McCreight 2215280cca Bug 1657231, part 4 - Don't allow using the URL preloader in the child. r=kmag
It never gets initialized there anyways, so assert and clean up
a bit of dead code.

Differential Revision: https://phabricator.services.mozilla.com/D86032
2020-08-07 22:58:58 +00:00
Andrew McCreight 5a8ee67dd8 Bug 1657231, part 3 - Fail if add observer fails. r=kmag
This can cause the URL preloader to think that initialization has succeeded
when it hasn't. This add observer call can fail if we're late in shutdown,
because the observer service still exists, but it isn't taking new
observers. I'm not sure how much it matters that we're failing to listen for
an observer that can't possibly fire at this stage, but a failure to check
for this seems to have contributed to the crash in bug 1656973, so we
might as well just fail.

Differential Revision: https://phabricator.services.mozilla.com/D86031
2020-08-07 22:58:55 +00:00
Andrew McCreight eccbaefffc Bug 1657231, part 2 - Clear sInitialized when we destroy the singleton url preloader. r=kmag
Some of the entry points into the URL preloader check sInitialized, and only
use it if it is true. However, if we're late in shutdown and we've already
cleared the singleton for the preloader then our failure to clear the
sInitialized flag means we'll recreate the preloader, which is going
to fail in various ways.

I think this won't help in the case of bug 1656973, because that seems
to go through AutoBeginReading, which unconditionally creates a new
singleton if one does not exist.

Differential Revision: https://phabricator.services.mozilla.com/D86030
2020-08-07 22:58:53 +00:00
Andrew McCreight 1f620cc4a1 Bug 1657231, part 1 - Only register the URL preloader as a reporter after it has been addrefed. r=kmag
Normally this happens during initialization because we add the preloader
as an observer, but that seems fragile.

Differential Revision: https://phabricator.services.mozilla.com/D86029
2020-08-07 22:58:51 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Mike Hommey 0853045118 Bug 1656141 - Remove rc include files that only add a manifest. r=firefox-build-system-reviewers,rstewart
That was redundant with the manifest being added with MT (although useful
for mingw builds, that don't use MT), but is also now handled by the
automatic creation of rc files.

Differential Revision: https://phabricator.services.mozilla.com/D86156
2020-08-06 22:51:54 +00:00
Mihai Alexandru Michis b88c487681 Backed out 4 changesets (bug 1657231) for causing multiple xpcshell failures.
CLOSED TREE

Backed out changeset caa4f187b037 (bug 1657231)
Backed out changeset 73418f013a61 (bug 1657231)
Backed out changeset e196f9cc2bb2 (bug 1657231)
Backed out changeset 5f4aab0ad04a (bug 1657231)
2020-08-07 02:49:49 +03:00
Andrew McCreight 953004415b Bug 1657231, part 4 - Don't allow using the URL preloader in the child. r=kmag
It never gets initialized there anyways, so assert and clean up
a bit of dead code.

Differential Revision: https://phabricator.services.mozilla.com/D86032
2020-08-06 22:35:14 +00:00
Andrew McCreight 36b266e999 Bug 1657231, part 3 - Fail if add observer fails. r=kmag
This can cause the URL preloader to think that initialization has succeeded
when it hasn't. This add observer call can fail if we're late in shutdown,
because the observer service still exists, but it isn't taking new
observers. I'm not sure how much it matters that we're failing to listen for
an observer that can't possibly fire at this stage, but a failure to check
for this seems to have contributed to the crash in bug 1656973, so we
might as well just fail.

Differential Revision: https://phabricator.services.mozilla.com/D86031
2020-08-06 22:35:12 +00:00
Andrew McCreight e6886b3c16 Bug 1657231, part 2 - Clear sInitialized when we destroy the singleton url preloader. r=kmag
Some of the entry points into the URL preloader check sInitialized, and only
use it if it is true. However, if we're late in shutdown and we've already
cleared the singleton for the preloader then our failure to clear the
sInitialized flag means we'll recreate the preloader, which is going
to fail in various ways.

I think this won't help in the case of bug 1656973, because that seems
to go through AutoBeginReading, which unconditionally creates a new
singleton if one does not exist.

Differential Revision: https://phabricator.services.mozilla.com/D86030
2020-08-06 22:35:10 +00:00
Andrew McCreight 8b026394da Bug 1657231, part 1 - Only register the URL preloader as a reporter after it has been addrefed. r=kmag
Normally this happens during initialization because we add the preloader
as an observer, but that seems fragile.

Differential Revision: https://phabricator.services.mozilla.com/D86029
2020-08-06 22:35:07 +00:00
Mihai Alexandru Michis c4e805857f Backed out 9 changesets (bug 1656141) for causing multiple failures.
CLOSED TREE

Backed out changeset 9033b0400339 (bug 1656141)
Backed out changeset e43dd57dc61a (bug 1656141)
Backed out changeset eb450457a9b7 (bug 1656141)
Backed out changeset 194a994cf9c9 (bug 1656141)
Backed out changeset ce6831acb5e3 (bug 1656141)
Backed out changeset 29653ea85d49 (bug 1656141)
Backed out changeset 704f28486bda (bug 1656141)
Backed out changeset de8899453150 (bug 1656141)
Backed out changeset 4b133eda46aa (bug 1656141)
2020-08-07 01:48:45 +03:00
Mike Hommey 9145b89e14 Bug 1656141 - Remove rc include files that only add a manifest. r=firefox-build-system-reviewers,rstewart
That was redundant with the manifest being added with MT (although useful
for mingw builds, that don't use MT), but is also now handled by the
automatic creation of rc files.

Differential Revision: https://phabricator.services.mozilla.com/D86156
2020-08-06 15:56:41 +00:00
Chris Fallin d53b8b620f Bug 1656638: Add Wasm compile- and run-time telemetry to track Wasm compiler performance. r=lth
This patch adds telemetry to measure the time spent in Wasm compilers
and in the code that they generate (actually, all JS and Wasm code).

For simplicity, it measures wallclock time as a proxy for CPU time.
Furthermore, it measures runtime for all JS and Wasm code, and all
native functions invoked by the JS or Wasm code, by timing from
top-level entry to exit. This is for efficiency reasons: we do not want
to add a VM call in the transition stubs between native and JS or JS and
Wasm; that would be a Very Bad Thing for performance, even for a Nightly
build instrumented with telemetry. Because of that, it's difficult to
separate JITted JS and JITted Wasm runtime, but observing their sum
should still be useful when making comparisons across compiler changes
because absolute reductions will still be visible.

The plumbing is somewhat awkward, given that Wasm compilers can run on
background threads. It appears that the telemetry-callback API that
SpiderMonkey includes to avoid a direct dependency on the Gecko
embedding had artificially limited the callback to main-thread use only.
This patch removes that limitation, which is safe at least for Gecko;
the telemetry hooks in Gecko are thread-safe (they take a global mutex).
That way, the background threads performing compilation can directly add
telemetry incrementally, without having to pass this up through the main
thread somehow.

Finally, I have chosen to add the relevant metrics as Scalar telemetry
values rather than Histograms. This is because what we are really
interested in is the sum of all these values (all CPU time spent in
compilation + running Wasm code); if this value goes down as a result of
a Wasm compiler change, then that Wasm compiler change is good because
it reduces CPU time on the user's machine. It is difficult to add two
Histograms together because the bins may have different boundaries. If
we instead need to use a binned histogram for other reasons, then we
could simply report the sum (of all compiler time plus run time) as
another histogram.

Differential Revision: https://phabricator.services.mozilla.com/D85654
2020-08-06 01:28:45 +00:00
Butkovits Atila 26b13464c2 Backed out changeset c8123a3e4249 (bug 1656638) for build bustages at Runtime.h. CLOSED TREE 2020-08-06 02:49:14 +03:00
Chris Fallin b7326dbb31 Bug 1656638: Add Wasm compile- and run-time telemetry to track Wasm compiler performance. r=lth
This patch adds telemetry to measure the time spent in Wasm compilers
and in the code that they generate (actually, all JS and Wasm code).

For simplicity, it measures wallclock time as a proxy for CPU time.
Furthermore, it measures runtime for all JS and Wasm code, and all
native functions invoked by the JS or Wasm code, by timing from
top-level entry to exit. This is for efficiency reasons: we do not want
to add a VM call in the transition stubs between native and JS or JS and
Wasm; that would be a Very Bad Thing for performance, even for a Nightly
build instrumented with telemetry. Because of that, it's difficult to
separate JITted JS and JITted Wasm runtime, but observing their sum
should still be useful when making comparisons across compiler changes
because absolute reductions will still be visible.

The plumbing is somewhat awkward, given that Wasm compilers can run on
background threads. It appears that the telemetry-callback API that
SpiderMonkey includes to avoid a direct dependency on the Gecko
embedding had artificially limited the callback to main-thread use only.
This patch removes that limitation, which is safe at least for Gecko;
the telemetry hooks in Gecko are thread-safe (they take a global mutex).
That way, the background threads performing compilation can directly add
telemetry incrementally, without having to pass this up through the main
thread somehow.

Finally, I have chosen to add the relevant metrics as Scalar telemetry
values rather than Histograms. This is because what we are really
interested in is the sum of all these values (all CPU time spent in
compilation + running Wasm code); if this value goes down as a result of
a Wasm compiler change, then that Wasm compiler change is good because
it reduces CPU time on the user's machine. It is difficult to add two
Histograms together because the bins may have different boundaries. If
we instead need to use a binned histogram for other reasons, then we
could simply report the sum (of all compiler time plus run time) as
another histogram.

Differential Revision: https://phabricator.services.mozilla.com/D85654
2020-08-05 23:18:33 +00:00
ssengupta 2ff0322440 Bug 1619953 - P7 - mozJSSubScriptLoader::ReadScript() now attempts reading from input stream even if content length is not already known r=baku
If reading succeeds, it is checked that the length is known from that point on (this check is debug only).

Differential Revision: https://phabricator.services.mozilla.com/D81718
2020-08-05 17:06:06 +00:00
Sebastian Streich bf58055b03 Bug 1633710 - Move uri.spec calls to nsIPrincipal r=necko-reviewers,geckoview-reviewers,preferences-reviewers,ckerschb,ntim,snorp,valentin
Differential Revision: https://phabricator.services.mozilla.com/D82911
2020-08-04 11:10:41 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Sylvestre Ledru 843f943758 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D85678
2020-08-02 15:29:15 +00:00
Jeff Walden e8f3f74ef6 Bug 1656411 - Move typed array, ArrayBuffer, and dataview-related functions out of jsfriendapi.h to two new headers. r=mgaudet,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D85524
2020-07-31 16:37:27 +00:00
Jeff Walden 15d7edd1cc Bug 1656411 - Move various stack limit-related functions (including reporting overrecursion) out of jsfriendapi.h to a new header. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D85523
2020-07-31 16:33:40 +00:00
Jeff Walden 598c0ab898 Bug 1656411 - Move various dumping functions out of jsfriendapi.h to a new header. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D85522
2020-07-31 16:20:19 +00:00
Jeff Walden c9ab0ce005 Bug 1656411 - Move WindowProxy-related functions out of jsfriendapi.h to their own header. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D85521
2020-07-31 16:11:36 +00:00
Jeff Walden 13b6689684 Bug 1656411 - Move telemetry and use counter APIs out of jsfriendapi.h to their own header. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D85520
2020-07-31 15:34:56 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Noemi Erli 5cebe61c77 Backed out changeset 4ed7b13fb7a5 (bug 1633710) for causing failures in browser_amosigned_url.js CLOSED TREE 2020-07-29 22:34:42 +03:00
Sebastian Streich ea482d8e73 Bug 1633710 - Move uri.spec calls to nsIPrincipal r=necko-reviewers,geckoview-reviewers,preferences-reviewers,ckerschb,ntim,snorp,valentin
Differential Revision: https://phabricator.services.mozilla.com/D82911
2020-07-29 17:33:10 +00:00
Jeff Walden 1de5dca426 Bug 1654927 - Move js.msg and js::GetErrorMessage into a new js/public/friend directory so users of them don't have to depend on all of jsfriendapi.h. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D84756
2020-07-29 04:44:50 +00:00
Matthew Gaudet 25fd6df2e9 Bug 1644160 - Add test cases for various DOM related classes r=jorendorff
- CrossOriginWrappers
- A variety DOM objects (including window, and window's prototype chain)
- Xray wrappers

Differential Revision: https://phabricator.services.mozilla.com/D83555
2020-07-28 21:29:17 +00:00
Dave Townsend c34eafa597 Bug 1651318: XPCShell should inform nsIAppStartup when startup is complete and when shutdown begins. r=froydnj
Since we don't go through the normal nsAppRunner startup process this just sends
the appropriate startup and shutdown signals to nsAppStartup at what look to be
roughly the right positions.

Differential Revision: https://phabricator.services.mozilla.com/D85073
2020-07-28 18:31:17 +00:00
Olli Pettay 98ffeb4bc5 Bug 1655778 - Properly clear WrappedJSRoots during shutdown, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D85172
2020-07-28 15:37:52 +00:00
Matthew Gaudet f337f90b04 Bug 1654286 - Convert private fields option to a JSContext option r=jandem
This avoids the issue where xpcshell appears to startup, create a realm, then
read preferences. Prior to this patch, by the time the prefs were read, it was
too late for the realm creation option to take effect. This way, we update the
realm option.

Differential Revision: https://phabricator.services.mozilla.com/D84426
2020-07-27 20:24:20 +00:00
Frederik Braun 887dadabf0 Bug 1648764 - map chromescripts into their own internal contentpolicytype r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D81336
2020-07-24 11:52:02 +00:00
Gijs Kruitbosch 90ef37ddc1 Bug 1652613 - report slow script hang durations and only clear hang data after the observer notification, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D83989
2020-07-24 00:01:57 +00:00
Gijs Kruitbosch 8aebfa2d70 Bug 1652613 - correct hang duration event measuring for slow script hangs, r=mccr8
The hang duration numbers were bogus. It seems that the code in
XPCJSContext::InterruptCallback establishes the duration by continuously
comparing 'now' with the last timestamp in mSlowScriptCheckpoint - but it
stops writing to the latter after the second time the interrupt callback
fires. So if the slow script runtime limit is N, the timer fires every N/2
seconds, but we increment the duration by N the third time it fires, 1.5N the
fourth time, 2N the fifth time, etc.

This patch fixes the issue by always resetting the timestamp against which we
compare when establishing the duration and incrementing mSlowScriptActualWait.

Differential Revision: https://phabricator.services.mozilla.com/D84660
2020-07-24 00:01:53 +00:00
Dorel Luca 54d5f1c9ed Backed out 4 changesets (bug 1652613) for Browser-chrome failures in browser/browser_ProcessHangNotifications.js. CLOSED TREE
Backed out changeset 76b5a5d243d1 (bug 1652613)
Backed out changeset 6f98c9b01920 (bug 1652613)
Backed out changeset 1255237ce2e7 (bug 1652613)
Backed out changeset bdf59854c900 (bug 1652613)
2020-07-24 02:58:22 +03:00
Jason Orendorff c41fb31adb Bug 1654636 - Enable baseline interpreter in safe mode. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D84582
2020-07-23 15:09:46 +00:00
Gijs Kruitbosch a75ccccec2 Bug 1652613 - report slow script hang durations and only clear hang data after the observer notification, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D83989
2020-07-23 22:12:16 +00:00
Gijs Kruitbosch 8cc4eea7b7 Bug 1652613 - correct hang duration event measuring for slow script hangs, r=mccr8
The hang duration numbers were bogus. It seems that the code in
XPCJSContext::InterruptCallback establishes the duration by continuously
comparing 'now' with the last timestamp in mSlowScriptCheckpoint - but it
stops writing to the latter after the second time the interrupt callback
fires. So if the slow script runtime limit is N, the timer fires every N/2
seconds, but we increment the duration by N the third time it fires, 1.5N the
fourth time, 2N the fifth time, etc.

This patch fixes the issue by always resetting the timestamp against which we
compare when establishing the duration and incrementing mSlowScriptActualWait.

Differential Revision: https://phabricator.services.mozilla.com/D84660
2020-07-23 22:12:16 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Jon Coppeard f47569e9d9 Bug 1654523 - Insist that iteration callbacks don't GC r=sfink,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D84500
2020-07-23 02:31:57 +00:00
Doug Thayer c4dd1705c3 Bug 1651941 - Use shared buffer for Content Process StartupCache keys r=froydnj
Keys can take up a nontrivial chunk of memory. This change ensures that the
memory cost is not per-process. In order to do this we had to switch from
nsCStrings to MaybeOwnedCharPtrs pointing to null-terminated char sequences.
This meant fiddling around with the code that loads / stores to disk and
making it a little bit uglier, rather than adding another method to the
IOBuffers classes to support our weird maybe-shared string type.

Differential Revision: https://phabricator.services.mozilla.com/D83398
2020-07-22 20:30:24 +00:00
Dorel Luca 990d081d9f Backed out 2 changesets (bug 1651519) for WPT failures in webdriver/tests/switch_to_frame/switch.py. CLOSED TREE
Backed out changeset 7b973a0e7be9 (bug 1651519)
Backed out changeset 55e9184c5617 (bug 1651519)
2020-07-22 02:47:34 +03:00
Kris Maglione d182c95351 Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-07-21 22:19:19 +00:00
Kris Maglione e7d942c77f Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-07-21 19:02:27 +00:00
Dorel Luca d91c6dc40b Backed out 2 changesets (bug 1651519) for wpt failures in webdriver/tests/switch_to_frame/switch.py. CLOSED TREE
Backed out changeset 52317abc5c68 (bug 1651519)
Backed out changeset 45448dca59a4 (bug 1651519)
2020-07-21 21:55:57 +03:00
Kris Maglione 4a25531b4a Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-07-21 16:59:33 +00:00
Kris Maglione 9c2c147159 Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-07-21 16:59:28 +00:00
Matthew Gaudet b56bdc1e4b Bug 1652744 - Add browser pref for private fields support r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D83511
2020-07-20 13:49:14 +00:00
Butkovits Atila 77046ebd2b Backed out 6 changesets (bug 1644160, bug 1652744) for failure at proxy-ccw.js CLOSED TREE
Backed out changeset ce53b1934083 (bug 1644160)
Backed out changeset 36ea51123a56 (bug 1652744)
Backed out changeset bc43898badcd (bug 1644160)
Backed out changeset 09df89442319 (bug 1644160)
Backed out changeset 3c88625982cf (bug 1644160)
Backed out changeset 598d65b8afb5 (bug 1644160)
2020-07-20 16:46:17 +03:00
Matthew Gaudet dea4a801a1 Bug 1652744 - Add browser pref for private fields support r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D83511
2020-07-17 21:21:57 +00:00
Jon Coppeard 3cd1ede76a Bug 1648453 - Fix build errors caused by MacOS headers defining check macro r=smaug
These patches have triggered a case where a MacOS header defines 'check' as a macro which then conflicts with use of 'check' as a method name in AccessCheck.h, probably due to unified builds.

This was fixed independently in a couple of places before, but I think it makes sense to move the fix to AccessCheck.h itself.

Differential Revision: https://phabricator.services.mozilla.com/D83796
2020-07-17 17:36:04 +00:00
Jon Coppeard 1d1648a98c Bug 1648453 - Add tests to check that FinalizationRegistry sets the incumbent global correctly when calling the callback r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83615
2020-07-17 17:35:01 +00:00
Agi Sferro 489dd44cdd Bug 1651838 - Remove unused --appomni on Android. r=glandium,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83195
2020-07-17 16:58:29 +00:00