Commit Graph

6470 Commits

Author SHA1 Message Date
Jan de Mooij
615ecff147 Bug 1466083 part 8 - Various minor API changes. r=luke
* GetScriptCompartment => GetScriptRealm
* Adds IsSystemRealm in addition to IsSystemCompartment and uses it where we can.
* JS_GetCompartmentPrincipals and IsSystemCompartment now release-assert they have a single realm. This is temporary until we know what Gecko will do/need exactly.
2018-06-06 12:55:50 +02:00
Jan de Mooij
9389383f2c Bug 1466083 part 7 - Replace GetCompartmentZone with GetRealmZone. r=luke 2018-06-06 12:55:50 +02:00
Jan de Mooij
7f38cbf185 Bug 1465728 part 3 - Rename Cu.getCompartmentLocation to Cu.getRealmLocation. r=bz 2018-06-06 11:44:17 +02:00
Jan de Mooij
3d013f2eef Bug 1465728 part 2 - Remove the compartment name callback. r=luke 2018-06-06 11:44:17 +02:00
Jan de Mooij
71d86bded9 Bug 1465728 part 1 - Move location and locationURI fields from CompartmentPrivate to RealmPrivate. r=bz
The xpcprivate.h changes are just code motion, except I changed the order of the GetLocationURI methods to get a much more readable diff.
2018-06-06 11:44:17 +02:00
Miko Mynttinen
4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
shindli
936dd8d764 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-04 01:07:15 +03:00
arthur.iakab
7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Andreea Pavel
4ced6e8b2d Merge mozilla-central to autoland. a=merge 2018-06-03 07:27:01 +03:00
Jan de Mooij
403ba762c8 Bug 1466083 part 6 - Add xpc::GetRealmPrincipal and use it in a few places. r=bz
Not strictly necessary, but this lets us remove some JS::GetCompartmentForRealm and JS_GetCompartmentPrincipals calls.
2018-06-02 11:58:29 +02:00
Jan de Mooij
14752d0042 Bug 1464772 part 2 - Remove RealmBehaviorsRef(obj), change RealmBehaviorsRef(compartment) to take a realm. r=luke
At some point I'll audit the obj->realm() calls for CCWs; removing RealmBehaviorsRef(obj) prepares for that.

Also, RealmBehaviorsRef(realm) could be removed and we could use RealmBehaviorsRef(cx) everywhere, but it seems reasonable to keep it.
2018-06-03 12:22:28 +02:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Jan de Mooij
f3fe2d13d4 Bug 1465472 - Remove the atoms realm/compartment. r=jonco
Some of the less trivial changes:

* When we allocated a symbol, we used the atom realm's RNG to create a hash code [0]. Instead of this I added a RNG for this to the runtime.

* IsCompilingWasm returned true if the JitContext's realm is nullptr, but that's now also true when we initialize the trampolines stored in the atoms zone. To fix that I added a CompileZone* to JitContext, in addition to the CompileRuntime and CompileRealm, and we now check the zone instead of the realm in IsCompilingWasm.

* JSContext::hasEnteredRealm is only called in DEBUG builds so I made hasEnteredRealm and enterRealmDepth_ #ifdef DEBUG.
2018-05-31 12:53:26 +02:00
Jan de Mooij
37e765587c Bug 1464374 part 7 - Use GetRealmPrincipals in GetCompartmentName. r=luke
This will become GetRealmName at some point.
2018-05-31 11:28:49 +02:00
Jan de Mooij
1edb6a4c17 Bug 1464374 part 6 - Use GetRealmPrincipals in Scriptability constructor. r=bz 2018-05-31 11:28:49 +02:00
Steve Fink
0680fed494 Bug 1464266 - Rename GCForReason to NonIncrementalGC, r=jonco
--HG--
extra : topic : GCForReason
extra : rebase_source : e81bf7bb8ca0824f8b63f25a46ccbe26c4002325
2018-05-24 16:19:18 -07:00
Jan de Mooij
45e968b1dd Bug 1464134 part 8 - Make IterateHeapUnbarriered and related code use realms instead of compartments. r=jonco 2018-05-30 20:14:19 +02:00
Jan de Mooij
732a7c63d6 Bug 1464134 part 7 - Replace GetAnyCompartmentInZone with GetAnyRealmInZone. r=luke 2018-05-30 20:14:19 +02:00
Boris Zbarsky
89366855ba Bug 1455676 part 1. Make it possible to importGlobalProperties Node. r=qdot 2018-05-29 22:58:47 -04:00
Boris Zbarsky
69db48b9c0 Bug 1047514. Re-enable the test_getWebIDLCaller test on Android. r=kmag 2018-05-29 13:38:53 -04:00
Tom Schuster
30cc5c7f25 Bug 1465039 - Rename Array.prototype.flatten to Array.prototype.flat. r=anba
--HG--
extra : rebase_source : aa2aa39508dd22d7e380e1996d559bf03d7478eb
2018-05-29 13:23:06 +02:00
Peter Van der Beken
0a2e4b8cb7 Bug 1146316 - Remove nsWrapperCache::SetIsNotDOMBinding and IsDOMBinding(). r=bz.
--HG--
extra : rebase_source : cd36e7afb4f6ebcd042ea40d9403546a683375ad
2018-04-05 17:22:41 +02:00
Peter Van der Beken
6e33f1d567 Bug 1146316 - Preserve the wrapper of sandboxes, so that we never try to call WrapObject on them. r=bz.
--HG--
extra : rebase_source : 00519dbe00d048000b2febdcd69e9232a79b5388
2018-04-11 11:52:13 +02:00
Boris Zbarsky
ed3c958547 Bug 1463889 part 1. Switch nsPIDOMWindowOuter::GetFrames to returning an nsDOMWindowList. r=qdot 2018-05-24 23:32:19 -04:00
Kris Maglione
ed0d691f13 Bug 1461012: Add CC optimizations for PrecompiledScript objects. r=mccr8
Tracing the script members held alive by PrecompiledScript objects can be
expensive, especially for large scripts. It would be nice if we could avoid
tracing them when possible.

Most of the time, when PrecompiledScripts are alive, they're held alive by
black roots, and have black JS wrappers. In those cases, there's no chance of
them creating garbage cycles, and we can just mark their script children
black.

MozReview-Commit-ID: KnkJfznJZBx

--HG--
extra : rebase_source : da0da30265c3f752c9aba177bf510937a743e49e
2018-05-11 15:57:31 -07:00
Tom Schuster
937d9326cd Bug 1453916 - Allow canvas extraction from webextension content-script even with resistFingerprinting turned on. r=kmag,bz
--HG--
extra : rebase_source : d67c589e8819407bb5acc4378d029288dd9295be
2018-05-14 20:49:32 +02:00
Kris Maglione
8134b33e89 Bug 1462964: Remove obsolete nsIDOMBlob interface. r=bz
MozReview-Commit-ID: 2HIlaSrvfBe

--HG--
extra : rebase_source : 944a6244dbfe1f0a37dd34a041d1329624a86f93
extra : histedit_source : d7859be664fed00f8504e40969480d3af3d674e7%2C4456b502db338bd06823654306e47c2583101396
2018-05-21 17:32:44 -07:00
Jan de Mooij
f820ec7afa Bug 1461938 part 5 - Some atoms compartment/realm related changes. r=jonco 2018-05-18 15:18:23 +02:00
Jan de Mooij
575aec161b Bug 1461677 - Rename compartment to realm in the memory reporting code. r=njn 2018-05-17 16:15:18 +02:00
Jan de Mooij
17f3983d0f Bug 1461605 part 1 - Rename CompartmentOptions to RealmOptions. r=luke,bz 2018-05-17 10:59:45 +02:00
Kris Maglione
166dab340b Bug 1461062: Follow-up: Fix rebase bustage. r=bustage CLOSED TREE
MozReview-Commit-ID: 2fjL5eCL2xP

--HG--
extra : amend_source : 1fef859835028292ca163d840a61077bf05fcc06
2018-05-16 19:07:01 -07:00
Ciure Andrei
eab785689c Backed out 2 changesets (bug 1458043) for dom/presentation/tests/mochitest/test_presentation_1ua_connection_wentaway_inproc.html failures a=backout
Backed out changeset 0b5c103fcb70 (bug 1458043)
Backed out changeset 51cdd0595094 (bug 1458043)
2018-05-17 00:54:04 +03:00
Jan de Mooij
80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Csoregi Natalia
2f779be8d9 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-02 01:03:45 +03:00
Markus Stange
772669d431 Bug 1464909 - Add the "GC / CC" category to AsyncFreeSnowWhite::Run. r=smaug
MozReview-Commit-ID: KEZUstzTHhn

--HG--
extra : rebase_source : 82f7b0b02f342b574f16849a8f6a9ffe625bddf6
2018-05-31 14:08:24 -04:00
Markus Stange
423ce68542 Bug 1462784 - Relabel various other stuff as being OTHER. r=njn
Any more specific work that is happening in these methods will have its own
specific category labeling in that specific code. The instances touched in this
patch are more on the outside and don't really know what kind of code is going
to be running inside.

MozReview-Commit-ID: 47NO1DZzkdH

--HG--
extra : rebase_source : 344c380ddaaf42a1fd820a26b762c61ee9e2d524
2018-05-18 17:58:43 -04:00
Csoregi Natalia
fc2ed6e92a Backed out 18 changesets (bug 1462784) for ESlint failure on FlameGraph.js:1297. CLOSED TREE
Backed out changeset 79556798ff9f (bug 1462784)
Backed out changeset 88321efb673b (bug 1462784)
Backed out changeset 7880f9dc7023 (bug 1462784)
Backed out changeset 71fe35fd1f7e (bug 1462784)
Backed out changeset a543b94b049a (bug 1462784)
Backed out changeset d1ca8b0f2221 (bug 1462784)
Backed out changeset 68eabfbf3c16 (bug 1462784)
Backed out changeset 34e71c789903 (bug 1462784)
Backed out changeset 6fe79d1ca1bd (bug 1462784)
Backed out changeset e5ad2e525ea9 (bug 1462784)
Backed out changeset 329645ff1e23 (bug 1462784)
Backed out changeset e09c38853172 (bug 1462784)
Backed out changeset 0663d1a6d2da (bug 1462784)
Backed out changeset 106967fc29d2 (bug 1462784)
Backed out changeset 99b4a433a8e5 (bug 1462784)
Backed out changeset 1d38a4cf5a4a (bug 1462784)
Backed out changeset 692017229de6 (bug 1462784)
Backed out changeset c2911a626671 (bug 1462784)
2018-06-01 23:42:00 +03:00
Markus Stange
3f54b9a3dd Bug 1462784 - Relabel various other stuff as being OTHER. r=njn
Any more specific work that is happening in these methods will have its own
specific category labeling in that specific code. The instances touched in this
patch are more on the outside and don't really know what kind of code is going
to be running inside.

MozReview-Commit-ID: 47NO1DZzkdH

--HG--
extra : rebase_source : f807c14bf6a592e0c651e15b63d1e7d63e4b0159
2018-05-18 17:58:43 -04:00
Noemi Erli
7bfa96a42b Backed out 4 changesets (bug 1464909) for failures in devtools/client/performance/test/unit/test_tree-model-08.js r=mstange on a CLOSED TREE
Backed out changeset 119c2055e002 (bug 1464909)
Backed out changeset 562aeeced55b (bug 1464909)
Backed out changeset c1e1d74ad27e (bug 1464909)
Backed out changeset 11670c51f572 (bug 1464909)
2018-06-01 01:23:49 +03:00
Noemi Erli
1fd69fa2bc Backed out 18 changesets (bug 1462784) for failures in devtools/client/performance/test/unit/test_tree-model-08.js on a CLOSED TREE
Backed out changeset a74d36598442 (bug 1462784)
Backed out changeset c8192175f360 (bug 1462784)
Backed out changeset cde492240e99 (bug 1462784)
Backed out changeset 8c8d30fa406c (bug 1462784)
Backed out changeset ad3802ffb780 (bug 1462784)
Backed out changeset 2fe10732076c (bug 1462784)
Backed out changeset 268a72b7c3c4 (bug 1462784)
Backed out changeset 4055eb6c3bc6 (bug 1462784)
Backed out changeset 3901070e2e60 (bug 1462784)
Backed out changeset 2faf787fbbdf (bug 1462784)
Backed out changeset 8f06963c7c6f (bug 1462784)
Backed out changeset 036e6f64e224 (bug 1462784)
Backed out changeset e670f156a603 (bug 1462784)
Backed out changeset cd39588aece4 (bug 1462784)
Backed out changeset 2ac65d100fa2 (bug 1462784)
Backed out changeset ea05ff70a51d (bug 1462784)
Backed out changeset 8a06c0ba42f7 (bug 1462784)
Backed out changeset 52ed9a039ad2 (bug 1462784)
2018-06-01 01:06:29 +03:00
Noemi Erli
614b78ae36 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-01 00:58:09 +03:00
Markus Stange
76dc63b77e Bug 1464909 - Add the "GC / CC" category to AsyncFreeSnowWhite::Run. r=smaug
MozReview-Commit-ID: KEZUstzTHhn

--HG--
extra : rebase_source : 6db5ea2c5ca4e8d1802a0c71915bfe1d2dbf7326
2018-05-31 14:08:24 -04:00
Markus Stange
d80822de42 Bug 1462784 - Relabel various other stuff as being OTHER. r=njn
Any more specific work that is happening in these methods will have its own
specific category labeling in that specific code. The instances touched in this
patch are more on the outside and don't really know what kind of code is going
to be running inside.

MozReview-Commit-ID: 47NO1DZzkdH

--HG--
extra : rebase_source : 35362bc94068103367f46b23a14cb3831cd86990
2018-05-18 17:58:43 -04:00
Noemi Erli
8e2471b6cb Backed out 8 changesets (bug 1458375) for Mochitest leaks on a CLOSED TREE
Backed out changeset 30a743401670 (bug 1458375)
Backed out changeset ae969e1cebfb (bug 1458375)
Backed out changeset 1fb76b9b6f82 (bug 1458375)
Backed out changeset 868da3a1b94a (bug 1458375)
Backed out changeset bd2cba9dfb3d (bug 1458375)
Backed out changeset 715850ae92a1 (bug 1458375)
Backed out changeset cfe8da250de7 (bug 1458375)
Backed out changeset 2968c0a21410 (bug 1458375)
2018-05-31 22:38:48 +03:00
Mike Conley
7c11f30a6f Bug 1458375 - Make ScriptPreloader stop recording after browser-idle-startup-tasks-finished. r=kmag
The ScriptPreloader stopped recording before browser-delayed-startup-finished before, but there
are other scripts (both in the parent and content processes) that might run soon after that we
also want to cache. This increases the probability that those scripts are noted by the
ScriptPreloader cache.

MozReview-Commit-ID: KiBEVvuqQkA

--HG--
extra : rebase_source : 4c1bffa882b0641f93260867ac8a4334b1269e99
2018-05-29 12:55:21 -04:00
Felipe Gomes
fd0a264b26 Bug 1457988 - Implement XPCOMUtils.defineLazyProxy. r=kmag
This implements a new kind of lazy getter in XPCOMUtils that creates an object (implemented as a JS Proxy) that is resilient to be passed around as references to other functions, and will only evaluate the getter when it really needs to be used
2018-05-15 19:49:17 -03:00
Peter Van der Beken
d73809b86f Bug 1453011 - Remove PostCreatePrototype. r=bz.
--HG--
extra : rebase_source : 6c096b964e43a3460a092b0f0b1ed9b512fd98c9
2018-03-22 11:31:05 +01:00
Peter Van der Beken
33304e70f6 Bug 1453011 - Remove some unused nsIXPCScriptable flags. r=bz.
--HG--
extra : rebase_source : bd116870762e7b9b0fcae558039c3522acb30009
2018-03-22 10:37:43 +01:00