Bug 1644271 - Log the URI for each MVM created. r=tnikkel

There's a lot of documents that get created (about:blank and friends) and this
makes it easier to figure out which MVM we actually care about.

Differential Revision: https://phabricator.services.mozilla.com/D80085
This commit is contained in:
Kartikaya Gupta 2020-06-21 20:48:39 +00:00
parent 62f01052fa
commit 6529d86dc8

View File

@ -653,6 +653,7 @@ StaticRefPtr<Element> PresShell::EventHandler::sLastKeyDownEventTargetElement;
bool PresShell::sProcessInteractable = false; bool PresShell::sProcessInteractable = false;
static bool gVerifyReflowEnabled; static bool gVerifyReflowEnabled;
extern mozilla::LazyLogModule sApzMvmLog;
bool PresShell::GetVerifyReflowEnable() { bool PresShell::GetVerifyReflowEnable() {
#ifdef DEBUG #ifdef DEBUG
@ -10980,6 +10981,13 @@ void PresShell::UpdateViewportOverridden(bool aAfterInitialization) {
mMVMContext = new GeckoMVMContext(mDocument, this); mMVMContext = new GeckoMVMContext(mDocument, this);
mMobileViewportManager = new MobileViewportManager(mMVMContext, *mvmType); mMobileViewportManager = new MobileViewportManager(mMVMContext, *mvmType);
if (MOZ_UNLIKELY(MOZ_LOG_TEST(sApzMvmLog, LogLevel::Debug))) {
nsIURI* uri = mDocument->GetDocumentURI();
MOZ_LOG(sApzMvmLog, LogLevel::Debug,
("Created MVM %p (type %d) for URI %s",
mMobileViewportManager.get(), (int)*mvmType,
uri ? uri->GetSpecOrDefault().get() : "(null)"));
}
if (aAfterInitialization) { if (aAfterInitialization) {
// Setting the initial viewport will trigger a reflow. // Setting the initial viewport will trigger a reflow.