In file included from objdir/js/xpconnect/src/Unified_cpp_js_xpconnect_src1.cpp:110:
js/xpconnect/src/nsXPConnect.cpp:76:37: error: use of undeclared identifier
'profiler_register_thread'
JS::SetProfilingThreadCallbacks(profiler_register_thread, profiler_unregister_thread);
^
js/xpconnect/src/nsXPConnect.cpp:76:63: error: use of undeclared identifier
'profiler_unregister_thread'
JS::SetProfilingThreadCallbacks(profiler_register_thread, profiler_unregister_thread);
^
MozReview-Commit-ID: HrBGEkByEum
--HG--
extra : rebase_source : b588e8f04d44d07c348120efc6008e6c24b8949e
This does mean that if the node is adopted back into the original document the
expandos would end up on the reflector at that point. I think that's OK;
people shouldn't be adopting things in that direction. Futhermore, if they
adopt, then set expandos, then adopt back they already get this behaviorl
So if we decide we don't want that, we should probably just avoid copying own
props when reparenting into a global whose principals don't subsume the old
global.
Originally, the ScriptPreloader stopped recording and wrote its cache when the
browser-delayed-startup-finished notification fired for the first window, but there
are other scripts (both in the content and WebExtension processes) that might run
soon after that we also want to cache.
This patch still makes the parent process stop recording scripts after
browser-delayed-startup-finished, but only prepares and writes the cache
once browser-idle-startup-tasks-finished fires, when it is much more likely
that the content and WebExtension caches are ready to go.
MozReview-Commit-ID: KiBEVvuqQkA
--HG--
extra : rebase_source : 6f0fde65cdafdecf72242a06416fef10304637b8
This allows us to lazily import global properties using
Cu.importGlobalProperties. Aside from making it easier to avoid lazily
importing these properties, it also defines them all in the shared JSM global
so that we don't risk re-creating them in Sandboxes or frameloader globals.
MozReview-Commit-ID: GV6shguUlIG
--HG--
extra : rebase_source : 6b9269f3b33fe085c5ed63ee16e5b4ce9e5343a4
Inheriting PerThreadAtomCache on CycleCollectedJSContext permits use of
static_cast, avoiding one level of indirection compared to adding a
CycleCollectedJSContext* to PerThreadAtomCache.
PerThreadAtomCache is over 18kB, and so WorkerJSContext and WorkletJSContext
are moved from the stack to the heap.
MozReview-Commit-ID: 6jdJeZcviK4
--HG--
extra : rebase_source : 3c2accb71faf3f017a44c405ae0484e57aaf039c
* 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.
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.
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
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
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.
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