I did not add a separate macro for `MOZ_TRIVIAL_DTOR` as I could not really
think of a use case for it. Let me know if you prefer that I add it as a
distinct macro.
Differential Revision: https://phabricator.services.mozilla.com/D39719
--HG--
extra : moz-landing-system : lando
These tests are based on `moz_global_class` and `moz_trivial_ctor_dtor` tests,
respectively, but adapted for the semantics of the new attributes.
Differential Revision: https://phabricator.services.mozilla.com/D39718
--HG--
rename : build/clang-plugin/tests/TestGlobalClass.cpp => build/clang-plugin/tests/TestStaticLocalClass.cpp
rename : build/clang-plugin/tests/TestTrivialCtorDtor.cpp => build/clang-plugin/tests/TestTrivialDtor.cpp
extra : moz-landing-system : lando
This patch is in support of adding a variant of Static{Auto,Ref}Ptr for use as
static locals, taking advantage of C++11 "magic statics" such that we can lazily
initialize those variables in a thread-safe way.
In support of those classes, this patch adds two new attributes:
* `moz_static_local_class` to ensure that any instantiations of that class only
occur as static local variables;
* `moz_trivial_dtor` to ensure that these classes do not implicitly call `atexit`
and add a whole bunch of shutdown crap.
`moz_static_local_class` works similarly to `moz_global_class`, except that its
object must only instantiate as static locals.
`TrivialDtorChecker` is based on `TrivialCtorDtorChecker`, with the ctor-specific
bits removed.
Differential Revision: https://phabricator.services.mozilla.com/D39717
--HG--
rename : build/clang-plugin/TrivialCtorDtorChecker.cpp => build/clang-plugin/TrivialDtorChecker.cpp
rename : build/clang-plugin/TrivialCtorDtorChecker.h => build/clang-plugin/TrivialDtorChecker.h
extra : moz-landing-system : lando
This is an example refcounted actor which was easy enough to port over as an
initial test. More can be ported in the future, potentially alongside removing
`mIPCOpen`.
Differential Revision: https://phabricator.services.mozilla.com/D39503
--HG--
extra : moz-landing-system : lando
This takes the approach of directly tying the `AddRef()` and `Release()` calls
on the underlying actor object to the lifecycle of the ActorLifecycleProxy
object, by adding another virtual `ActorAlloc()` method as the counterpart to
`ActorDealloc()`.
The changes to the methods called from C++ are relatively minimal:
1. The `SendPFooConstructor(...)` methods have the same signature, but now will
AddRef() internally (through `ActorAlloc()`), so an `do_AddRef(foo).take()`
isn't needed. Same with the `{Bind,Open}PFooEndpoint` methods.
This was done to reduce the number of invasive internal changes in the
codegen which were required to pipe a passed-in `already_AddRefed` to the
underlying `ActorLifecycleProxy` which is created by generic code.
2. The `AllocPFoo{Parent,Child}` methods have been modified to return an
`already_AddRefed` by default, and the callsites will store the result in a
`RefPtr<T>` if the type is refcounted.
3. No `DeallocPFoo...` method is called anymore. Unfortunately due to
devirtualization, it won't be an error if an unused method is still present,
though it won't be called.
Differential Revision: https://phabricator.services.mozilla.com/D39502
--HG--
extra : moz-landing-system : lando
The syntax for the new construct looks like the following, and re-uses the
refcounted keyword from refcounted using statements:
async refcounted protocol PFoo { ... }
Differential Revision: https://phabricator.services.mozilla.com/D39501
--HG--
extra : moz-landing-system : lando
I did not add a separate macro for `MOZ_TRIVIAL_DTOR` as I could not really
think of a use case for it. Let me know if you prefer that I add it as a
distinct macro.
Differential Revision: https://phabricator.services.mozilla.com/D39719
--HG--
extra : moz-landing-system : lando
These tests are based on `moz_global_class` and `moz_trivial_ctor_dtor` tests,
respectively, but adapted for the semantics of the new attributes.
Differential Revision: https://phabricator.services.mozilla.com/D39718
--HG--
rename : build/clang-plugin/tests/TestGlobalClass.cpp => build/clang-plugin/tests/TestStaticLocalClass.cpp
rename : build/clang-plugin/tests/TestTrivialCtorDtor.cpp => build/clang-plugin/tests/TestTrivialDtor.cpp
extra : moz-landing-system : lando
This patch is in support of adding a variant of Static{Auto,Ref}Ptr for use as
static locals, taking advantage of C++11 "magic statics" such that we can lazily
initialize those variables in a thread-safe way.
In support of those classes, this patch adds two new attributes:
* `moz_static_local_class` to ensure that any instantiations of that class only
occur as static local variables;
* `moz_trivial_dtor` to ensure that these classes do not implicitly call `atexit`
and add a whole bunch of shutdown crap.
`moz_static_local_class` works similarly to `moz_global_class`, except that its
object must only instantiate as static locals.
`TrivialDtorChecker` is based on `TrivialCtorDtorChecker`, with the ctor-specific
bits removed.
Differential Revision: https://phabricator.services.mozilla.com/D39717
--HG--
rename : build/clang-plugin/TrivialCtorDtorChecker.cpp => build/clang-plugin/TrivialDtorChecker.cpp
rename : build/clang-plugin/TrivialCtorDtorChecker.h => build/clang-plugin/TrivialDtorChecker.h
extra : moz-landing-system : lando
Regular login popups go to 17em whereas a popup containing password generation goes to 21em.
Differential Revision: https://phabricator.services.mozilla.com/D39578
--HG--
extra : moz-landing-system : lando
This patch ensures that any existing query text in the search bar is highlighted when the Cmd/Ctrl + F shortcut is used.
Differential Revision: https://phabricator.services.mozilla.com/D38934
--HG--
extra : moz-landing-system : lando
Got rid of the per-thread JSContext created at the start of each thread. Tasks that require JSContext (ParseTasks, IonBuilder, Wasm tier 2 generators, GCParallel) now request an unused context to set to their thread. Tasks which do not use JSContext will not request one.
Differential Revision: https://phabricator.services.mozilla.com/D37495
--HG--
extra : moz-landing-system : lando
Created a vector of JSContext*, initialized at creation of GlobalHelperThreadState, destroyed when GlobalHelperThreadState.finish() is called. Note that this implementation makes the assumption that the creation and destruction of these objects always happens in the same order (helper thread state created -> main thread context created -> main thread context destroyed -> helper thread state destroyed). In this scenario context checks can clear by each context claiming the main thread during its ctor/dtor but this is only possible if the main thread context is not set at the time.
Also, removed GlobalHelperThreadState::lock() and unlock(), as they are not being used - AutoLockHelperThreadState is used instead.
Differential Revision: https://phabricator.services.mozilla.com/D36842
--HG--
extra : moz-landing-system : lando
Created SetThread/ClearThread functions to handle JSContext/tid setting/clearing & updated existing implementation of JSContext to reflect. CurrentThread is ContextData because JSContext should already have a "claim" on the thread if it's clearing these.
Differential Revision: https://phabricator.services.mozilla.com/D36836
--HG--
extra : moz-landing-system : lando
When we reload the document the destruction of the old document triggers a discard request for the image. If timing is right we haven't locked the image in the new document yet so it discards.
We call LoadImage on the image, it returns the existing entry from the image cache, but it needs to validate. When it validates we send out all the progress in the progress tracker already. This includes frame complete and decode complete even though we have no decoded surfaces for this image right now.
The RequestDecodeForSize call in nsImageLoadingContent::MaybeResolveDecodePromises triggers a decode. When the decode finishes we send a frame update notification but we never send frame complete or decode complete because those are permanent once they happen.
Differential Revision: https://phabricator.services.mozilla.com/D39585
--HG--
extra : moz-landing-system : lando
This is based on D39589, which moves the top sites API from toolkit to browser.
* Add a `newtab` option to `browser.urlbar.topSites.get` (similar to the abandoned D36200) that returns exactly the top sites shown on newtab
* Add a `AboutNewTab.getTopSites` function that returns those sites from activity stream
* Keep the changes made in bug 1547669
There are a couple of missing things related to the default top sites that this doesn't address but ideally we would have. I think we can come back to these if necessary.
* Actual favicons for the default top sites instead of using the bigger tile images since they don't seem to be the same for every site.
* Proper names names for the default sites. There's a `hostname` property, but it would be nice to have e.g. "YouTube" instead of "youtube".
Differential Revision: https://phabricator.services.mozilla.com/D39591
--HG--
extra : moz-landing-system : lando
Converts dom.timeout.enable_budget_timer_throttling from varcache pref to static pref, removes entry from all.js, adds entry to StaticPrefList.yaml. Uses the all.js value and not the value declared in TimeoutManager.cpp. Since this removes the last varcache pref from TimeoutManager::Initialize(), I also removed the Initialize() function and its call in nsGlobalWindowInner.
Differential Revision: https://phabricator.services.mozilla.com/D39455
--HG--
extra : moz-landing-system : lando
Converts dom.timeout.budget_throttling_max_delay varcache pref to static pref, removes entry from all.js, and adds entry to StaticPrefList.yaml
Differential Revision: https://phabricator.services.mozilla.com/D39451
--HG--
extra : moz-landing-system : lando
Converts dom.timeout.foreground_budget_regeneration_rate varcache pref in TimeoutManager.cpp to static pref, removes entry in all.js, adds entry in StaticPrefList.yaml.
Differential Revision: https://phabricator.services.mozilla.com/D39436
--HG--
extra : moz-landing-system : lando
Converts dom.timeout.background_budget_regeneration_rate varcache pref in TimeoutManager.cpp to static pref, removes entry in all.js, adds entry to StaticPrefList.yaml.
Differential Revision: https://phabricator.services.mozilla.com/D39435
--HG--
extra : moz-landing-system : lando
Converts dom.disable_open_click_delay from a VarCache pref in TimeoutManager.cpp to StaticPref, removes all.js entry, and corrects a typo where the value was mentioned in nsGlobalWindowInner.cpp.
Differential Revision: https://phabricator.services.mozilla.com/D39424
--HG--
extra : moz-landing-system : lando
Converts dom.timeout.max_consecutive_callbacks_ms varcache pref in TimeoutManager.cpp to static pref, removes associated variables and all.js entry, and adds entry to StaticPrefList.yaml.
Differential Revision: https://phabricator.services.mozilla.com/D39425
--HG--
extra : moz-landing-system : lando
Converts dom.timeout.throttling_delay in TimeoutManager.cpp from varcache pref to static pref, removes entry in all.js, and adds entry in StaticPrefList.yaml. Favors the all.js value over the declared value in TimeoutManager.cpp.
Differential Revision: https://phabricator.services.mozilla.com/D39426
--HG--
extra : moz-landing-system : lando
Removes dom.min_tracking_timeout_value and dom.min_tracking_background_timeout_value, because they are never used.
Differential Revision: https://phabricator.services.mozilla.com/D39429
--HG--
extra : moz-landing-system : lando
Converts dom.min_background_timeout_value in TimeoutManager.cpp to static pref, removes entry in all.js, adds entry to StaticPrefList.yaml.
Differential Revision: https://phabricator.services.mozilla.com/D39430
--HG--
extra : moz-landing-system : lando
Converts dom.min_timeout_value varcache pref from TimeoutManager::Initialize() to a static pref, and removes its entry and associated constants from TimeoutManager.cpp and all.js
Differential Revision: https://phabricator.services.mozilla.com/D39416
--HG--
extra : moz-landing-system : lando
Bug 1547669 added some things to the top sites API, but it turned out to be not quite what we (the quantumbar team) needed (see bug 1568617). What we need is the list of top sites exactly as it appears on newtab. That list is determined by activity stream, which lives in browser. But the top sites API lives in toolkit.
There was an earlier, now abandoned revision for that bug [1] where it was suggested that top sites be moved to browser. So we should do that.
[1] https://phabricator.services.mozilla.com/D36200
Differential Revision: https://phabricator.services.mozilla.com/D39589
--HG--
rename : toolkit/components/extensions/parent/ext-topSites.js => browser/components/extensions/parent/ext-topSites.js
rename : toolkit/components/extensions/schemas/top_sites.json => browser/components/extensions/schemas/top_sites.json
rename : toolkit/components/extensions/test/xpcshell/test_ext_topSites.js => browser/components/extensions/test/xpcshell/test_ext_topSites.js
extra : moz-landing-system : lando
The previous behaviour of failing unconditionally was performed as, during
shutdown, the channel could become unable to send without worker threads having
a chance to react. This change keeps that behaviour, isolating async message
senders from impending IPC shutdown, while performing expected actor teardown if
the manager actor has already been destroyed, and should no longer send messages.
An alternate behaviour here could be to crash if !Manager()->CanSend(). That
behaviour may be preferable if a sufficient number of callsites don't check the
return value of the `SendPFooConstructor()` method.
Differential Revision: https://phabricator.services.mozilla.com/D39534
--HG--
extra : moz-landing-system : lando