Commit Graph

2828 Commits

Author SHA1 Message Date
Jan de Mooij
72d7c72f56 Bug 1594054 - Move ExecutableAllocator from JitRuntime to JitZone. r=jonco,erahm
This matches the JitCode GC-thing lifetime and will hopefully help avoid
fragmentation.

Differential Revision: https://phabricator.services.mozilla.com/D52823

--HG--
extra : moz-landing-system : lando
2019-11-14 10:20:02 +00:00
Doug Thayer
97c5d40384 Bug 1586920 - Sometimes include dynamic string of label frames in BHR r=nika
This adds two AUTO_PROFILER_LABEL_DYNAMIC_... macros and updates select
usages of the old macros to use the new ones. These new macros cause
the dynamic string of the label to be included in BHR stacks.

We don't want to do this all of the time, as in many cases we may not
be interested enough in the dynamic string or it may be sensitive
information, but it is rather important information for certain cases.

This uses the same buffer that we use for the strings for JS frames,
and if we fail to fit into that buffer we just append the raw label.

If the string is too long for our static buffer (128 bytes), we just
leave it truncated, as it should be stable and we may be able to infer
from the truncated form what the full form would be.

Differential Revision: https://phabricator.services.mozilla.com/D51665

--HG--
extra : moz-landing-system : lando
2019-11-11 20:27:44 +00:00
Cosmin Sabou
a055b60f76 Backed out changeset 8daa186bd18b (bug 1593399) for causing crashes @js::gcstats::Statistics. CLOSED TREE 2019-11-13 07:00:37 +02:00
Philip Chimento
b90e70a466 Bug 1590907 - Remove obsolete macro JS_OOM_DO_BACKTRACES. r=sfink
This macro isn't defined anywhere and doesn't seem to do anything. It
affects the oom-backtraces property of the build configuration object in
the testing functions, but since the macro is never defined, it seems to
be always set to false anyway, so just hardcode it.

Differential Revision: https://phabricator.services.mozilla.com/D51769

--HG--
extra : moz-landing-system : lando
2019-11-12 22:01:06 +00:00
Philip Chimento
c6f2907808 Bug 1590907 - Remove obsolete macro ENABLE_SHARED_ARRAY_BUFFER. r=sfink
This macro is not defined anywhere and has no effect in the end whether
it's defined or not.

Differential Revision: https://phabricator.services.mozilla.com/D51767

--HG--
extra : moz-landing-system : lando
2019-11-12 21:58:55 +00:00
Steve Fink
3f8b1d909a Bug 1593399 - Rework how mark colors are handled in weakmap marking r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D51492

--HG--
extra : moz-landing-system : lando
2019-11-12 22:24:29 +00:00
Cosmin Sabou
f155bb6137 Backed out changeset de7a1a1b75f0 (bug 1593399) for build bustages on WeakMap-inl.h.
--HG--
extra : histedit_source : a6d4ee525d48086f5981f13d95eba2b2e3019262
2019-11-12 22:34:58 +02:00
Steve Fink
b3059609b0 Bug 1593399 - Rework how mark colors are handled in weakmap marking r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D51492

--HG--
extra : moz-landing-system : lando
2019-11-12 19:54:06 +00:00
André Bargull
a1298a12f9 Bug 1592992 - Part 19: Move jsutil.cpp to util/Utility.cpp. r=jonco
This file provides the implementation of js/Utility.h, so it should be renamed
to match the header name.

Differential Revision: https://phabricator.services.mozilla.com/D51378

--HG--
rename : js/src/jsutil.cpp => js/src/util/Utility.cpp
extra : moz-landing-system : lando
2019-11-08 13:24:15 +00:00
Jon Coppeard
72de7c7261 Bug 1593260 - Don't use remove_if for sweeping GCVector as the predicate can modify the elements r=anba
Differential Revision: https://phabricator.services.mozilla.com/D51786

--HG--
extra : moz-landing-system : lando
2019-11-05 15:42:19 +00:00
Jeff Walden
373e83663e Bug 1582348 - Make WritableStreamDefault{Controller,Writer} real classes, and resolve them only when writable streams have been enabled. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D51047

--HG--
extra : moz-landing-system : lando
2019-11-05 05:12:15 +00:00
André Bargull
11c3c57ab3 Bug 1531716 - Part 4: Replace jstypes macros with constexpr functions. r=jonco
JS_BIT and JS_BITMASK are only used in contexts where uint32_t is used, so these
two functions are now typed to accept and return uint32_t.

JS_HOWMANY and the three JS_ROUND functions are only used with size_t inputs,
so these four functions are now typed to accept and return size_t.

Differential Revision: https://phabricator.services.mozilla.com/D51142

--HG--
extra : moz-landing-system : lando
2019-11-04 14:04:35 +00:00
Jon Coppeard
f3b48418af Bug 1587096 - Part 3: Implmement FinalizationGroup r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D49946

--HG--
extra : moz-landing-system : lando
2019-11-01 10:37:47 +00:00
Jon Coppeard
b7b220ece8 Bug 1587096 - Part 2: Add an API to set the HostCleanupFinalizationGroup callback r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D49944

--HG--
extra : moz-landing-system : lando
2019-11-01 10:37:40 +00:00
Jon Coppeard
4dd3d1c903 Bug 1587096 - Part 1: Add JS FinalizationGroupObject and related data structures r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D49943

--HG--
extra : moz-landing-system : lando
2019-11-01 10:37:25 +00:00
Jon Coppeard
360fa579c4 Bug 1587098 - Add a shell option to enable support for weak references, off by default r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D49942

--HG--
extra : moz-landing-system : lando
2019-11-01 10:37:09 +00:00
Jeff Walden
5da49ed3d7 Bug 1582348 - Implement |WritableStreamDefaultControllerClose|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50099

--HG--
extra : moz-landing-system : lando
2019-10-30 22:35:28 +00:00
Gurzau Raul
6728c0b9a9 Backed out 7 changesets (bug 1582348) for spidermonkey bustage at WritableStream.cpp on a CLOSED TREE.
Backed out changeset 912867da0987 (bug 1582348)
Backed out changeset 7d5a91059cc9 (bug 1582348)
Backed out changeset 98fda09d6d39 (bug 1582348)
Backed out changeset 7e6bd57c4493 (bug 1582348)
Backed out changeset 62bbc891288f (bug 1582348)
Backed out changeset 17992c3dd43e (bug 1582348)
Backed out changeset 461556631684 (bug 1582348)
2019-10-30 07:46:31 +02:00
Jeff Walden
2f5c0aed74 Bug 1582348 - Implement |WritableStreamDefaultControllerClose|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50099

--HG--
extra : moz-landing-system : lando
2019-10-30 05:00:24 +00:00
Ted Campbell
2d736289c2 Bug 1592051 - Mark GCCellPtr as JS_HAZ_GC_POINTER. r=sfink
This also fixes two inconsequential hazards.

Differential Revision: https://phabricator.services.mozilla.com/D50836

--HG--
extra : moz-landing-system : lando
2019-10-28 18:22:42 +00:00
Philip Chimento
1fab6fc78e Bug 1426865 - Add default visibility to JSAPI symbols. r=sfink
Depends on D49098

Differential Revision: https://phabricator.services.mozilla.com/D49099

--HG--
extra : moz-landing-system : lando
2019-10-27 22:34:11 +00:00
Philip Chimento
fd8bc56c8d Bug 1426865 - Remove JS_BROKEN_GCC_ATTRIBUTE_WARNING. r=sfink
This macro makes any forward declarations unnecessarily verbose, and the
build system uses Clang by default anyway, except in the hazard analysis
which already specified -Wno-attributes.

Depends on D49097

Differential Revision: https://phabricator.services.mozilla.com/D49098

--HG--
extra : moz-landing-system : lando
2019-10-27 22:34:11 +00:00
Jeff Walden
3e64c882fe Bug 1591655 - Remove the unnecessary |proto| argument from |JS::NewPromiseObject| and its callers, seeing as all callers pass |nullptr| (and therefore uniformly request the default prototype). r=jandem,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50695

--HG--
extra : moz-landing-system : lando
2019-10-26 08:14:05 +00:00
Jon Coppeard
e9bd719e91 Bug 1591338 - Add a JS API to call a object's finalizer r=mccr8
This replaces a direct call of an object's finalizer with a more formal API. This adds some assertions and passes a valid FreeOp pointer to the finalizer rather than null.

Differential Revision: https://phabricator.services.mozilla.com/D50571

--HG--
extra : moz-landing-system : lando
2019-10-25 15:33:52 +00:00
Philip Chimento
81983bd6e5 Bug 1590845 - Add JS::MemoryUse::Embedding1 through 5. r=tcampbell,jonco
This makes JS::AddAssociatedMemory() and JS::RemoveAssociatedMemory()
more useful for embedders.

Differential Revision: https://phabricator.services.mozilla.com/D50347

--HG--
extra : moz-landing-system : lando
2019-10-24 16:50:59 +00:00
Jan de Mooij
7b85f15477 Bug 1590776 - Store the external-string-sizeOf callback with the finalize callback instead of per-runtime. r=jwalden,bzbarsky
This renames the JSStringFinalizer struct to JSExternalStringCallbacks,
makes it a virtual class, and adds a size-of callback to it (to replace
the per-runtime callback).

This will make it possible to implement this callback easily for the
NewExternalString testing function (which we want for bug 1590641)
without having to move this testing function to shell/js.cpp

Differential Revision: https://phabricator.services.mozilla.com/D50234

--HG--
extra : moz-landing-system : lando
2019-10-24 08:49:39 +00:00
Tom Tung
f24d6deaf7 Bug 1583251 - P3 - Check if it is okay to allow shared memory while deserializing; r=nika,lth
Differential Revision: https://phabricator.services.mozilla.com/D48349

--HG--
extra : moz-landing-system : lando
2019-10-23 07:20:18 +00:00
Tom Tung
a0d1f674b6 Bug 1583251 - P2 - Fix some format nits or naming nits for StructuredClone::Write; r=nika,lth
Differential Revision: https://phabricator.services.mozilla.com/D48348

--HG--
extra : moz-landing-system : lando
2019-10-23 07:20:05 +00:00
Jon Coppeard
d1664d884b Bug 1589717 - Simplify GCVector::sweep and allow use with element types that don't have barriers r=sfink
We can simplify this method by using std::remove_if, which does the shifting down of removed elements for us. We just need to make sure all our wrapper classes support moving assignment.

Differential Revision: https://phabricator.services.mozilla.com/D49769

--HG--
extra : moz-landing-system : lando
2019-10-22 04:58:53 +00:00
Jim Porter
9354dfda4a Bug 1557447 - Profiler support for IPC information; r=nika,smaug
This adds the ability to add profile markers for both the sender and recipient
sides of IPC messages. These can then be correlated with one another in the
profile visualization. For the UI component of this patch, see
<https://github.com/firefox-devtools/profiler/pull/2172>.

Differential Revision: https://phabricator.services.mozilla.com/D42226

--HG--
extra : moz-landing-system : lando
2019-10-21 20:51:07 +00:00
Logan Smyth
18146a6645 Bug 1564177 - Part 2: Move the DebuggerVector from GlobalObject to the Realm. r=jimb
The DebuggerVector has been associated with the GlobalObject via a private slot
referencing a wrapper JS object (DebugggerVectorHolder). Moving this data into
the JS::Realm instance removes complexity and avoids needing the holder.

Differential Revision: https://phabricator.services.mozilla.com/D49570

--HG--
extra : moz-landing-system : lando
2019-10-18 20:21:44 +00:00
Razvan Maries
f9d8db28af Backed out 5 changesets (bug 1583251) for rust build bustages. CLOSED TREE
Backed out changeset bfe390ad771b (bug 1583251)
Backed out changeset 0113c698b44d (bug 1583251)
Backed out changeset 248ad59168dd (bug 1583251)
Backed out changeset 5d5e3dc17118 (bug 1583251)
Backed out changeset 9e9eaa78c436 (bug 1583251)
2019-10-18 17:59:20 +03:00
Tom Tung
5ba65c0735 Bug 1583251 - P3 - Check if it is okay to allow shared memory while deserializing; r=nika,lth
Differential Revision: https://phabricator.services.mozilla.com/D48349

--HG--
extra : moz-landing-system : lando
2019-10-15 13:42:25 +00:00
Tom Tung
c291baa433 Bug 1583251 - P2 - Fix some format nits or naming nits for StructuredClone::Write; r=nika,lth
Differential Revision: https://phabricator.services.mozilla.com/D48348

--HG--
extra : moz-landing-system : lando
2019-10-15 13:49:26 +00:00
Daniel Varga
8fdca46bc7 Backed out changeset 2923afce519a (bug 1557447) for browser chrome failure at tools/profiler/tests/browser/browser_test_feature_preferencereads.js. On a CLOSED TREE 2019-10-18 07:54:09 +03:00
Jim Porter
80bfcd6e57 Bug 1557447 - Profiler support for IPC information; r=nika
This adds the ability to add profile markers for both the sender and recipient
sides of IPC messages. These can then be correlated with one another in the
profile visualization. For the UI component of this patch, see
<https://github.com/firefox-devtools/profiler/pull/2172>.

Differential Revision: https://phabricator.services.mozilla.com/D42226

--HG--
extra : moz-landing-system : lando
2019-10-18 02:56:02 +00:00
Dorel Luca
efd52379da Backed out changeset cd4dc0ae3364 (bug 1557447) for Browser-chrome failures in build/src/obj-firefox/dist/include/mozilla/BlocksRingBuffer.h 2019-10-18 03:59:06 +03:00
Jim Porter
641b95fb72 Bug 1557447 - Profiler support for IPC information; r=nika
This adds the ability to add profile markers for both the sender and recipient
sides of IPC messages. These can then be correlated with one another in the
profile visualization. For the UI component of this patch, see
<https://github.com/firefox-devtools/profiler/pull/2172>.

Differential Revision: https://phabricator.services.mozilla.com/D42226

--HG--
extra : moz-landing-system : lando
2019-10-17 23:39:42 +00:00
André Bargull
0b138ce1ee Bug 1433306 - Part 2: Implement Intl.ListFormat stage 3 proposal. r=jwalden
"disjunction" and "unit" types aren't yet supported, because ICU doesn't
provide a C-API for this functionality. "short" and "narrow" styles aren't
supported for the same reason.

Differential Revision: https://phabricator.services.mozilla.com/D40437

--HG--
extra : moz-landing-system : lando
2019-10-16 16:05:06 +00:00
André Bargull
7a5b5e0a24 Bug 1288457 - Part 15: Add JSProtoKey for AsyncGeneratorFunction. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42885

--HG--
extra : moz-landing-system : lando
2019-10-16 12:35:36 +00:00
André Bargull
d80c1ed430 Bug 1288457 - Part 14: Add JSProtoKey for GeneratorFunction. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42884

--HG--
extra : moz-landing-system : lando
2019-10-16 12:35:08 +00:00
André Bargull
966f19f7e0 Bug 1288457 - Part 13: Add JSProtoKey for AsyncFunction. r=mgaudet
In a follow-up bug this will be changed to use `ClassSpec`, along with the rest
of the JSProtoKey classes still using non-ClassSpec initialisation.

Differential Revision: https://phabricator.services.mozilla.com/D42883

--HG--
extra : moz-landing-system : lando
2019-10-16 12:34:46 +00:00
André Bargull
70066a6dde Bug 1288457 - Part 9: Assign an additional bit for CACHED_PROTO_KEY. r=mgaudet
Increase the CACHED_PROTO_KEY limit from 2⁶ to 2⁷ to allow that all current
JSProto classes can use JSCLASS_HAS_CACHED_PROTO.

Differential Revision: https://phabricator.services.mozilla.com/D42878

--HG--
extra : moz-landing-system : lando
2019-10-16 12:34:06 +00:00
André Bargull
d14b6d410a Bug 1288457 - Part 8: Use constexpr instead of #defines in js/Class. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42877

--HG--
extra : moz-landing-system : lando
2019-10-16 12:34:04 +00:00
André Bargull
c29b895419 Bug 1288457 - Part 6: Change Intl.RelativeTimeFormat to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42875

--HG--
extra : moz-landing-system : lando
2019-10-16 12:53:08 +00:00
André Bargull
d367ed5276 Bug 1288457 - Part 5: Change Intl.PluralRules to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42874

--HG--
extra : moz-landing-system : lando
2019-10-16 12:31:58 +00:00
André Bargull
a10d581508 Bug 1288457 - Part 4: Change Intl.NumberFormat to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42873

--HG--
extra : moz-landing-system : lando
2019-10-16 12:31:34 +00:00
André Bargull
0ec985f2cc Bug 1288457 - Part 3: Change Intl.Locale to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42872

--HG--
extra : moz-landing-system : lando
2019-10-16 12:31:14 +00:00
André Bargull
c598de1fe4 Bug 1288457 - Part 2: Change Intl.DateTimeFormat to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42871

--HG--
extra : moz-landing-system : lando
2019-10-16 12:30:52 +00:00
André Bargull
a5e566d375 Bug 1288457 - Part 1: Change Intl.Collator to use ClassSpec. r=mgaudet
- `JSProto_Collator` has to be added to the end until part 9.
- `js::CreateCollatorPrototype` was renamed to `js::CreateCollator` because it
  no longer returns the prototype object. Part 7 will change this again.
- `CollatorObject::protoClass_` uses `PlainObject::class_`, which works because
  CollatorObject isn't xrayable.

Differential Revision: https://phabricator.services.mozilla.com/D42870

--HG--
extra : moz-landing-system : lando
2019-10-16 12:30:29 +00:00