ReferrerPolicy gets tossed back and forth as a uint32_t and
ReferrerPolicy enum in header file. Expose ReferrerPolicyValues from
webidl file and use consistently in native code.
Differential Revision: https://phabricator.services.mozilla.com/D41954
--HG--
extra : moz-landing-system : lando
The main part of the change is the change to ChildSHistory - make it possible to have Go() to be called asynchronously
and also let one to cancel pending history navigations. History object (window.history) can then use either the sync or
async Go(), depending on the dom.window.history.async pref.
LoadDelegate, which is used by GeckoView, needs special handling, since
it spins event loop nestedly. With session history loads and same-document loads we can just
bypass it.
To deal with same-document case, MaybeHandleSameDocumentNavigation is split to IsSameDocumentNavigation,
which collects relevant information about the request and returns true if same-document navigation should happen,
and then later HandleSameDocumentNavigation uses that information to trigger the navigation.
SameDocumentNavigationState is used to pass the information around.
referrer-policy-test-case.sub.js is buggy causing tests to pass only on Firefox with sync history API.
nested-context-navigations-iframe.html.ini is added because of https://bugzilla.mozilla.org/show_bug.cgi?id=1572932
Differential Revision: https://phabricator.services.mozilla.com/D41199
--HG--
extra : moz-landing-system : lando
The main part of the change is the change to ChildSHistory - make it possible to have Go() to be called asynchronously
and also let one to cancel pending history navigations. History object (window.history) can then use either the sync or
async Go(), depending on the dom.window.history.async pref.
LoadDelegate, which is used by GeckoView, needs special handling, since
it spins event loop nestedly. With session history loads and same-document loads we can just
bypass it.
To deal with same-document case, MaybeHandleSameDocumentNavigation is split to IsSameDocumentNavigation,
which collects relevant information about the request and returns true if same-document navigation should happen,
and then later HandleSameDocumentNavigation uses that information to trigger the navigation.
SameDocumentNavigationState is used to pass the information around.
referrer-policy-test-case.sub.js is buggy causing tests to pass only on Firefox with sync history API.
nested-context-navigations-iframe.html.ini is added because of https://bugzilla.mozilla.org/show_bug.cgi?id=1572932
Differential Revision: https://phabricator.services.mozilla.com/D41199
--HG--
extra : moz-landing-system : lando
This prepares nsFrameLoader for replacing mBrowserParent and mBrowserBridgeChild
with a common interface by making special case code use a getter method instead
of direct access.
Differential Revision: https://phabricator.services.mozilla.com/D31437
--HG--
extra : source : 32eeee79d628dade8109454c636d5f8aaff0c93e
This prepares nsFrameLoader for replacing mBrowserParent and mBrowserBridgeChild
with a common interface by making special case code use a getter method instead
of direct access.
Differential Revision: https://phabricator.services.mozilla.com/D31437
--HG--
extra : rebase_source : a3493579481b7b79086c34486b7342783fd68070
extra : histedit_source : d4a2909d13575822d36611879d2e14211ef2cf3a
Bug 304860 and bug 1364364 have disabled the bfcache for subframes, so we only
store the contentviewer in the root entry.
Depends on D25761
Differential Revision: https://phabricator.services.mozilla.com/D25763
--HG--
extra : moz-landing-system : lando
The class contains original full referrer and referrer policy will be
applied to the referrer.
Differential Revision: https://phabricator.services.mozilla.com/D17923
--HG--
extra : moz-landing-system : lando
For simplicity's sake, for now we keep storing only one scroll position per
history entry (bug 1499210), so if we have to choose between the layout and the
visual viewport, the latter is a vastly better choice, as it more accurately
represents the scroll position as perceived by the user, especially when the
page has been pinch-zoomed.
This also means that instead of the normal scroll events, the session store now
has to listen for the corresponding events specific to the visual viewport.
We also extend the scroll position test to check that the scroll position isn't
just properly saved, but also actually properly restored in practice as well.
We only add this test now instead of already adding it beforehand like we did
with the rest of the test
- to avoid having to temporarily extend the checkScroll() helper function to
deal with todo()/todo_is etc.
- because getting that part of the test to complete without timing out (which
would be one of its natural failure modes, because the expected events would
be missing) would require faking even more scroll events
- because we already have the todo() tests that are telling us the we didn't
*store* any scroll position in the first place, so there's no point in trying
to actually restore anything
For the GeckoView saveAndRestoreState test, we now spin the event loop once
before setting the scroll position in order to give APZ opportunity to settle
down after the initial page load.
Differential Revision: https://phabricator.services.mozilla.com/D15690
--HG--
extra : moz-landing-system : lando
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.
Overall it's not a very interesting patch I think.
nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.
I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.
While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
We'll always need a URI for DocShellLoadState, and it should only
change is special circumstances. Construct the object with it, and
then follow up in Bug 1515433 for more cleanup.
Differential Revision: https://phabricator.services.mozilla.com/D13490
--HG--
extra : moz-landing-system : lando
Creates the nsDocShellLoadState object, which is basically
nsDocShellLoadInfo plus a few extra fields to make it usable as a
single argument to nsDocShell::LoadURI (and eventually
nsDocShell::InternalLoad).
Subframe history handling is a huge logic block in
nsDocShell::LoadURI, which is only used on history loads. This patch
also extracts the logic out into its own function to make the body of
LoadURI clearer.
Creates the nsDocShellLoadState object, which is basically
nsDocShellLoadInfo plus a few extra fields to make it usable as a
single argument to nsDocShell::LoadURI (and eventually
nsDocShell::InternalLoad).
Subframe history handling is a huge logic block in
nsDocShell::LoadURI, which is only used on history loads. This patch
also extracts the logic out into its own function to make the body of
LoadURI clearer.
Differential Revision: https://phabricator.services.mozilla.com/D6944
--HG--
rename : docshell/base/nsDocShellLoadInfo.cpp => docshell/base/nsDocShellLoadState.cpp
rename : docshell/base/nsDocShellLoadInfo.h => docshell/base/nsDocShellLoadState.h
extra : moz-landing-system : lando
Creates the nsDocShellLoadState object, which is basically
nsDocShellLoadInfo plus a few extra fields to make it usable as a
single argument to nsDocShell::LoadURI (and eventually
nsDocShell::InternalLoad).
Subframe history handling is a huge logic block in
nsDocShell::LoadURI, which is only used on history loads. This patch
also extracts the logic out into its own function to make the body of
LoadURI clearer.
Differential Revision: https://phabricator.services.mozilla.com/D6944
--HG--
rename : docshell/base/nsDocShellLoadInfo.cpp => docshell/base/nsDocShellLoadState.cpp
rename : docshell/base/nsDocShellLoadInfo.h => docshell/base/nsDocShellLoadState.h
extra : moz-landing-system : lando
nsISHEntry's attributes and methods are thoroughly mixed. This patch separates
them, making it easier to understand.
--HG--
extra : rebase_source : 8a7822b5289fbb67e74dfa3cb42aa31206ee0e16
Both nsISHEntry.URI and nsISHEntry isSubFrame are readonly, but also have a
setter. This is silly, so this patch removes the setter and makes them
modifiable.
The patch also renames nsISHEntry.setAsHistoryLoad() as setLoadTypeAsHistory(),
which makes it clearer that it modifies the loadType attribute.
--HG--
extra : rebase_source : 7772e2c1d90d4fd9f462f20c777d6eacc65801c5
By marking some C++-only nsISHistory methods as [noscript] or [noscript,
notxpcom].
--HG--
extra : rebase_source : 1216e755a227fd13f01057afd71ea082a2a79ad7
The patch also removes some NS_ENSURE_ARG_POINTER checks from these attributes'
getters. Most of these getters already lack such checks, and as long as the
infallible getters are used a non-null pointer is guaranteed. In the worst case
we'll safely null-crash anyway.
--HG--
extra : rebase_source : 87d4f7fccfa7ffb605c514cf8c2abd270a13b24a
- Move VIEWER_WINDOW from nsISHistory to nsSHistory.
- Mark some C++-only nsISHistory methods as [noscript, notxpcom].
- Add gotoIndex() to nsISHistory so that LegacySHistoryImpl() can be removed.
--HG--
extra : rebase_source : c33081d527af6f9697fad095d24824fc4d451f4d
nsISHistoryListener can cancel several operations, but the functionality is
only ever used for OnHistoryReload(). So this patch removes it for the other
operations.
--HG--
extra : rebase_source : 433422e9160f7d645570baaaff4779c4bcc3ec04
This patch:
- removes GetTransactionAtIndex(), because getTransactionAtIndex() can be used
instead;
- renames a lot of things;
- updates some comments.
--HG--
extra : rebase_source : 845a1c1d5fe7f84eaa03db39a344d98fd5784afd
nsISHEntry.index is readonly, but if you pass `true` as getEntryAtIndex()'s
second argument, nsISHEntry.index will be modified. This is pretty gross.
This patch changes `index` so it's not readonly (because it's not!) and removes
getEntryAtIndex()'s second argument.
--HG--
extra : rebase_source : c519d77fcc1c3bda2f260b5888ce9cd0f6cfdab5
Because it's a wafer-thin wrapper around nsISHEntry that just complicates
things.
This patch leaves behind a combination of "entry" and "transaction"
terminology. I'll fix that in a subsequent patch.
--HG--
extra : rebase_source : ca15187447bf3d93c65ed3980ead5bca958471be
Specifically:
- Check the nsresult consistently, but don't check (unnecessarily) for null on
success.
- In AddEntry(), move GetTransactionAtIndex() before all state-changing
operations, so we don't end up with partial state updates upon failure.
- Use early returns to reduce indenting.
--HG--
extra : rebase_source : 17815f6813f024fae1cf4ec3cf1b7985ab7a2ff2
In practice it's always non-null, and only half the places that deal with it
have null handling code. So this simplifies things.
--HG--
extra : rebase_source : 250b286b6b2c10aeb0c4486ebe13b1e071bf6c8a
It was used to protect against changes in mIndex by history listeners, but the
new code structure doesn't need it, because we want to use mIndex afterwards.
--HG--
extra : rebase_source : 74f0cc7f696b101b8e9d699790f2f2c141c5f51b
nsSHistory currently implements nsIWebNavigation, but only three of the methods
are actually used, and the rest call MOZ_CRASH. This patch removes the
inheritance and changes the implementations of those three methods (Reload(),
GetCurrentURI(), and GotoIndex()) to pure C++.
There is one test, bug662200_window.xul, that calls Reload() from JS, which is
no longer possible. Fortunately, nsSHistory::ReloadCurrentEntry() -- which *is*
available from JS -- is similar enough to Reload(0) that it can be used
instead.
(The only difference between Reload(0) and ReloadCurrentEntry() is that the
former triggers the `OnHistoryReload` notification and the latter triggers
`OnHistoryGotoIndex`, which doesn't matter for this test.)
--HG--
extra : rebase_source : 69dba04f14b1438f50f597f3d16b77225795f8a7
The only ones that are reachable are GotoIndex(), GetCurrentURI(), and
Reload(). This patch makes all the others crash.
Note that the reason that Go{Back,Forward}() are unreachable is because of this
behaviour in ChildHistory::Go():
// XXX(nika): Should we turn Go(-1) and Go(1) to call GoForward and GoBack?
// They technically fire different change events but I couldn't find anyone
// who cares, so I'm inclined not to.
I.e. those functions are now subsumed by GotoIndex().
As for CanGo{Back,Forward}(), a try push plus code inspection confirm that they
are unused.
--HG--
extra : rebase_source : 6509e635478f257be1271b51d352e0a9d81899ec
(It's worth noting that I had to fix one of these instances in the previous
patch, by adding a -1.)
--HG--
extra : rebase_source : ea45cd7dc59b6649f1b46a2c917def79538fcbe8
- nsISHistoryInternal loses `rootTransaction`, and gains
GetTransactionAtIndex(). (The implementing class `nsSHistory` already
implemented a method by that method.)
- nsSHistory loses `mListRoot` in favour of `mTransactions`. It also loses
`mLength`, because `mTransactions` tracks the length itself.
- nsISHTransaction.{prev,next} are no longer needed.
- nsISHTransaction.create() is no longer needed, because all it does now is set
the SHEntry, and we can use SetSHEntry() for that.
Overall this deletes about 200 lines of code.
--HG--
extra : rebase_source : eac6334b653e04634baa86a0f4e3c8f07c06e560
In order to allow JS callers to use nsISimpleEnumerator instances with the JS
iteration protocol, we'll need to additional methods to every instance. Since
we currently have a large number of unrelated implementations, it would be
best if they could share the same implementation for the JS portion of the
protocol.
This patch adds a stub nsSimpleEnumerator base class, and updates all existing
implementations to inherit from it. A follow-up will add a new base interface
to this class, and implement the additional functionality required for JS
iteration.
Differential Revision: https://phabricator.services.mozilla.com/D3725
--HG--
extra : rebase_source : ad66d7b266856d5a750c772e4710679fab9434b1
extra : histedit_source : a83ebffbf2f0b191ba7de9007f73def6b9a955b8
nsSHEntry is the only class that instantiates those two interfaces, so the
separation is not useful. This lets us remove numerous pointless QIs.
--HG--
extra : rebase_source : 570b7ade669fb89a789184198bec9da186c5f1d3
nsSHEntry is the only class that instantiates those two interfaces, so the
separation is not useful. This lets us remove several pointless QIs.
The patch also removes RemoveFromBFCache{AS,S}ync, which are unused.
--HG--
extra : rebase_source : 84db7ec180c357ab8c762dc60efb5eed444ba514
We have 2 different LoadType enums with two different values, which
have to be converted between depending on whether we're going to/from
LoadInfo/nsISHEntry/etc. We should be able to just use the same enum
everywhere and not have to deal with conversion, especially since we
don't have any type safety around the enum.
MozReview-Commit-ID: 2t9vVGLpOte
The current limit of at most one bfcache entry on Android dates back to when
Fennec was built for the Nokia N810, which had a whopping 128 MB of memory.
Since a few years have passed since then and mobile device technology has
evolved considerably, it should be safe now to allow a little more than that.
Since web sites sizes might have grown somewhat as well compared to the figure
of 4MB mentioned in CalcMaxTotalViweres(), though and to be absolutely on the
safe side, we still tweak the formula when building for Android, though.
If in the worst case even those assumptions turn out too generous, we will still
be protected by the fact that
- we temporarily disable the bfcache when the OS signals memory pressure, and
- our contentViewerTimeout is set to a lower value than on Desktop, so bfcache
entries will expire sooner
MozReview-Commit-ID: 1A6d0Q6Mdx0
--HG--
extra : rebase_source : 9cc1f7abb1aef82ffc4d7987773ae7cf35440884
This change requires introducing nsID::Clone(). Because it's infallible, the
patch also removes some redundant failure-handling code. (nsMemory::Clone() is
also infallible, so this code was redundant even before this change.)
--HG--
extra : rebase_source : ef22757d3fa814320490bf7e19e822b8f0c4bdc3
(Path is actually r=froydnj.)
Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.
MozReview-Commit-ID: 91U22X2NydP
--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
XPCOM's string API doesn't have the notion of a "null string". But it does have
the notion of a "void string" (or "voided string"), and that's what these
functions are returning. So the names should reflect that.
--HG--
extra : rebase_source : 4e3f982e0873877174a08a25413595ff66f7d20e
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.
The patch suitably converts the remaining nsXPIDLString local variable as well.
--HG--
extra : rebase_source : 5fff9f2c6844559198f601853f8db08564add7d5
This flag is for when we've loaded a URI in a remote type that is not the default
for compatibility reasons (for example related http in the file content process).
So that we can load the history entry in that same process as well.
Convert the singleton HistoryTracker implementation to a per-nsSHistory based
implementation so that it can be bound to a TabGroup.
MozReview-Commit-ID: 7cMtArsO5lQ
--HG--
extra : rebase_source : 3711bc7f7afaa40772035e24270d4fde1d17924a
Re-order includes to meet gecko's coding style, and move bool data members
to the bottom for slightly better alignment (nsSHEntry down from 192->176,
nsSHEntryShared down from 208->200 on a Linux64 build).
MozReview-Commit-ID: CG1M6Hh39uI
--HG--
extra : rebase_source : 5762a8a3536805e2b15b71425a9376c191cf16cb
This will allow the session store to store and restore scroll positions (and pinch zoom on Android) for past session history entries as well, whereas today only the scroll position of the current page is saved.
As a LayoutHistoryState saves its PresStates in a hash table that doesn't allow direct access to its contents if you don't already know the entry's key, we provide a function to iterate over all stored PresStates and retrieve their keys, which can then be used to get access to each individual PresState in turn. Since nsPresState is little more than a fancy struct and we don't want to have to turn it into a full-blown XPCOM-compatible interface, we just pass the scroll/zoom-related values we're interested in as in/out parameters from/to JS via the LayoutHistoryState.
We also require a helper method for initialising an SHEntry's LayoutHistoryState, since normally this doesn't happen until the PresShell wants to capture the history state in it. We on the other hand require a LayoutHistoryState to be present immediately after creation of a fresh SHEntry object, so we can feed it the session store data during history restoration.
MozReview-Commit-ID: FfZf8KDsVWl
***
--HG--
extra : rebase_source : 0b3f729bff3ac24680d6fe8a0fb796979886170b
Make nsISHistory support partial mode and create interfaces which
DOM level grouped session history should implement.
MozReview-Commit-ID: BXhBY6aJ0f7
--HG--
extra : rebase_source : bee5fd8354d2fdef8b3bac202d158c95c7e4e6e0
Renamed CompareFrames to LoadDifferingEntries to make what it does more clear.
Also, use this to do the top level load for the forward / back cases as it is pretty much set up to do that already.
MozReview-Commit-ID: G8cO0jDZebR
--HG--
extra : rebase_source : 4c9f3d77ad29ad5c447efd7c702b37c5581de1ab
|refreshURIList| is converted to a an nsIMutableArray as nsISupportsArray is
deprecated. This attribute is only used internally and does not show up in a
textual search of the plugins repo.
nsIMutableArray is used rather than nsIArray in order to support modifying the
array as current users expect.
MozReview-Commit-ID: F0GYVFZarOQ
This function is an infallible alternative to nsIURI::GetSpec(). It's useful
when it's appropriate to handle a GetSpec() failure with a failure string, e.g.
for log/warning/error messages. It allows code like this:
nsAutoCString spec;
uri->GetSpec(spec);
printf("uri: %s", spec.get());
to be changed to this:
printf("uri: %s", uri->GetSpecOrDefault().get());
This introduces a slight behavioural change. Previously, if GetSpec() failed,
an empty string would be used here. Now, "[nsIURI::GetSpec failed]" will be
produced instead. In most cases this failure string will make for a clearer
log/warning/error message than the empty string.
* * *
Bug 1297961 (part 1b) - More GetSpecOrDefault() additions. r=hurley.
I will fold this into part 1 before landing.
--HG--
extra : rebase_source : ddc19a5624354ac098be019ca13cc24b99b80ddc
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.
As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.
--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
This removes the unnecessary setting of c-basic-offset from all
python-mode files.
This was automatically generated using
perl -pi -e 's/; *c-basic-offset: *[0-9]+//'
... on the affected files.
The bulk of these files are moz.build files but there a few others as
well.
MozReview-Commit-ID: 2pPf3DEiZqx
--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
In all of the places touched by this patch, the smart pointer we're
appending is about to become unused, so simply .forget()'ing its
reference into the appropriate nsCOMArray works just fine.
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout. The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.
CLOSED TREE makes big refactorings like this a piece of cake.
# The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
xargs perl -p -i -e '
s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
s/nsRefPtr ?</RefPtr</g; # handle declarations and variables
'
# Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h
# Handle nsRefPtr.h itself, a couple places that define constructors
# from nsRefPtr, and code generators specially. We do this here, rather
# than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
# things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
mfbt/nsRefPtr.h \
xpcom/glue/nsCOMPtr.h \
xpcom/base/OwningNonNull.h \
ipc/ipdl/ipdl/lower.py \
ipc/ipdl/ipdl/builtin.py \
dom/bindings/Codegen.py \
python/lldbutils/lldbutils/utils.py
# In our indiscriminate substitution above, we renamed
# nsRefPtrGetterAddRefs, the class behind getter_AddRefs. Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'
if [ -d .git ]; then
git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
Adds a new chrome-only MutationObserverInit option called nativeAnonymousChildList
that will cause a mutation to fire when a native anonymous root is bound or unbound
There are many sub-classes of nsExpirationTracker. In order to distinguish them
nicely in the logging of timer firings, it's necessary to manually name each
one. (This wouldn't be necessary if there was a way to stringify template
parameters, but there isn't.)
--HG--
extra : rebase_source : 89b99e9dbb2a806bd21145d04a5e023794643b61
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
The bulk of this commit was generated by running:
run-clang-tidy.py \
-checks='-*,llvm-namespace-comment' \
-header-filter=^/.../mozilla-central/.* \
-fix
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
PR_LOG_ERROR -> LogLevel::Error
PR_LOG_WARNING -> LogLevel::Warning
PR_LOG_WARN -> LogLevel::Warning
PR_LOG_INFO -> LogLevel::Info
PR_LOG_DEBUG -> LogLevel::Debug
PR_LOG_NOTICE -> LogLevel::Debug
PR_LOG_VERBOSE -> LogLevel::Verbose
Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.
Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
PR_LOG_ERROR -> LogLevel::Error
PR_LOG_WARNING -> LogLevel::Warning
PR_LOG_WARN -> LogLevel::Warning
PR_LOG_INFO -> LogLevel::Info
PR_LOG_DEBUG -> LogLevel::Debug
PR_LOG_NOTICE -> LogLevel::Debug
PR_LOG_VERBOSE -> LogLevel::Verbose
Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.
Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
PR_LOG_ERROR -> LogLevel::Error
PR_LOG_WARNING -> LogLevel::Warning
PR_LOG_WARN -> LogLevel::Warning
PR_LOG_INFO -> LogLevel::Info
PR_LOG_DEBUG -> LogLevel::Debug
PR_LOG_NOTICE -> LogLevel::Debug
PR_LOG_VERBOSE -> LogLevel::Verbose
Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.
Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
This patch was generated by a script. Here's the source of the script for
future reference:
find . \( -iname "*.cpp" -o -iname "*.h" \) | \
xargs -n 1 sed -i "s/nsRefPtr<nsIRunnable>/nsCOMPtr<nsIRunnable>/g"