Bug 1667915 - Separate marker category from marker options - r=gregtatum
The `category.WithOptions(...)` syntax was a bit strange and difficult to explain.
Now the category and options are separate parameters. Default options can be specified with `MarkerOptions{}` or just `{}`.
As a special case, defaulted-NoPayload functions don't need `<>`, and defaulted-NoPayload functions and macros don't even need `{}` for default options, e.g.:
`profiler_add_marker("name", OTHER); PROFILER_MARKER_UNTYPED("name", OTHER);`
Differential Revision: https://phabricator.services.mozilla.com/D91680
This commit is contained in:
@@ -377,8 +377,7 @@ const mozilla::Module* mozJSComponentLoader::LoadModule(FileLocation& aFile) {
|
||||
|
||||
mInitialized = true;
|
||||
|
||||
AUTO_PROFILER_MARKER_TEXT("JS XPCOM", JS.WithOptions(MarkerStack::Capture()),
|
||||
spec);
|
||||
AUTO_PROFILER_MARKER_TEXT("JS XPCOM", JS, MarkerStack::Capture(), spec);
|
||||
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("mozJSComponentLoader::LoadModule",
|
||||
OTHER, spec);
|
||||
|
||||
@@ -1181,8 +1180,8 @@ nsresult mozJSComponentLoader::Import(JSContext* aCx,
|
||||
bool aIgnoreExports) {
|
||||
mInitialized = true;
|
||||
|
||||
AUTO_PROFILER_MARKER_TEXT("ChromeUtils.import",
|
||||
JS.WithOptions(MarkerStack::Capture()), aLocation);
|
||||
AUTO_PROFILER_MARKER_TEXT("ChromeUtils.import", JS, MarkerStack::Capture(),
|
||||
aLocation);
|
||||
|
||||
ComponentLoaderInfo info(aLocation);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user