This patch makes the following changes to the macros.
- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
mostly misused.
- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
universally available now anyway.
- Combines the first two string literal arguments of PROFILER_LABEL and
PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
them to be separate, and it forced a '::' in the label, which isn't always
appropriate. Also, the meaning of the "name_space" argument was interpreted
in an interesting variety of ways.
- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
it clearer they construct RAII objects rather than just being function calls.
(I myself have screwed up the scoping because of this in the past.)
- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
the caller doesn't need to. This makes a *lot* more of the uses fit onto a
single line.
The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).
- Fixes a bunch of labels that had gotten out of sync with the name of the
class and/or function that encloses them.
- Removes a useless PROFILER_LABEL use within a trivial scope in
EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
a good idea.
- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
done within them, instead of at their callsites, because that's a more
standard way of doing things.
--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
This patch is mainly to make IdleTaskRunner reusable by nsHtml5TreeOpExecutor.
The only necessary work to that purpose is to remove the dependency of
sShuttingDown, which was a static variable in nsJSEnvironment.cpp.
The idea is to have a "ShouldCancel" as a callback for the consumer to
return sShuttingDown.
In addition to sShuttingDown, we use std::function<bool()> as the runner
main callback type.
MozReview-Commit-ID: FT2X1unSvPS
--HG--
extra : rebase_source : cfd99aba19f014327875683f5ea85d183c8af674
extra : intermediate-source : 99af874c7b1d278057194894d406474b8af07349
extra : source : 792359c898f68241e1373820ea8fd3ba18b09994
Moving methods that refer to constant to the header that defines the
constants makes it infeasible to #define the constants at the end
of the header. To avoid introducing a new pass over the Java AST,
this patch turns the primitive constants that were
previously #defined into C++ contants, which, according to
Stroustrup 3rd ed., are handled at compile-time and don't consume
storage.
MozReview-Commit-ID: JnaDgW2OM7t
--HG--
extra : rebase_source : 3678d8db967e83d8b7e265a5ef926050cc20d770
The next patch moves nsCSSFontFaceRule into a separate header, which
somehow affects lots of header dependencies. I'm not completely sure
why this happens, though.
MozReview-Commit-ID: KuXbsaX0NUd
--HG--
extra : rebase_source : cef91018964b5488c5031df8aada90aa7fa0ad51
In order to asynchronously load content scripts that need to run very early in
the page load cycle, we need to be able to block further parsing from the
document-element-inserted observer, before any page scripts are loaded.
Interrupting the flush loop after the document element is inserted allows
the observers to run, and temporarily block further parsing if necessary.
MozReview-Commit-ID: A6D2T52Mlx4
--HG--
extra : rebase_source : 86f303a0bf298ac32b934290a7f960a2e1bac581
I've moved the body of the APIs into the few remaining callers.
MozReview-Commit-ID: 9ALoSmQHkGM
--HG--
extra : rebase_source : e0e747dec23424446b18d53ab65e4fa262e16554
For components also referencing it in code, see the blockers of bug 1336311.
MozReview-Commit-ID: 4tUZ24HKBWy
--HG--
extra : rebase_source : ec16149f525b9b7eaca7f96f1369929d21497121
Moving the html5 atoms out into their own initialization phase makes the
initialization of atoms more explicit and avoids problems with trying to
move modules around so their atoms get initialized in the correct place.
As an aesthetic bonus, this change produces pleasing symmetry in
nsHtml5Module::{Initialize,Release}Statics.
Reviewed-by: Nathan Froyd <froydnj@mozilla.com>