This adds the parameter, without using it, also without passing the correct
value.
The later patch will change the consumer of those API to pass the correct value,
and then use the passed parameter.
Differential Revision: https://phabricator.services.mozilla.com/D92404
The `using` declarations in "Proxy.h" make it act like a second
"NamespaceImports.h", introducing names from `JS` into the `js` namespace.
Remove the `using` declarations from "Proxy.h" and then fix up the breakage by:
- Prepend `JS::` in various header files.
- Add "NamespaceImports.h" in cpp files.
- Add `PropertyDescriptor` to "NamespaceImports.h". There are many unqualified
references to `PropertyDescriptor`, making it a prime candidate for
"NamespaceImports.h".
Drive-by changes:
- Use local variables in `CheckProxyFlags()` to make the `static_assert`
conditions more readable.
Differential Revision: https://phabricator.services.mozilla.com/D92207
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
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 adds the boilerplate machinery for the function-references proposal. The
interesting piece is that the GC proposal is moved to require the function-references
proposal to be enabled.
The configuration machinery for features is refactored in this commit to avoid passing
6 different booleans around as parameters to functions.
* A FeatureArgs struct is added with values for all 'feature' configuration options
- A feature is defined as an option that affects validation or semantics
- Essentially everything besides 'debug', 'mode', 'tier'
* All feature configuration responsibility is removed from CompilerEnvironment
* ModuleEnvironment is modified to accept a FeatureArgs in addition to a
CompilerEnvironment
- The CompilerEnvironment field may eventually be removed, as it's not needed
within function validation, and is only used by the compilers later
Differential Revision: https://phabricator.services.mozilla.com/D89857
This backs out all work from bug 1627075 as well as all of its
descendents. There were a few conflicts when backing this out but
overall it was pretty clean, so I would say it's a fairly mild
level of risk. Historically Nathan Froyd has reviewed these patches,
but he is no longer at Mozilla, and no one else is particularly
familiar with the code, so I am passing this off to RyanVM who has
at least been familiar with the history of the bug.
Differential Revision: https://phabricator.services.mozilla.com/D90096
The name `AUTO_PROFILER_MARKER_TEXT` is more consistent with the equivalent non-`AUTO` macro, and similarly arguments have been re-ordered to be the same, i.e.: Name, category&options, text.
The different macros with different argument sets can now be collapsed into one macro, and the optional arguments (timing, inner window id, backtrace) can easily be added to the `MarkerOptions` where needed.
As a bonus, a specific start time can optionally be provided at construction time.
Differential Revision: https://phabricator.services.mozilla.com/D89588
This method only asserts that mInitialized is false, then sets
mInitialized to true. All call sites check that the flag is false,
so the assertion is redundant, so this method can be inlined
and simplified.
Differential Revision: https://phabricator.services.mozilla.com/D89480
This method only asserts that mInitialized is false, then sets
mInitialized to true. All call sites check that the flag is false,
so the assertion is redundant, so this method can be inlined
and simplified.
Differential Revision: https://phabricator.services.mozilla.com/D89480
Under unknown circumstances, we can end up running chrome
JS during thread manager shutdown. Sometimes this ends up
trying to load new JSMs, but gJarHandler has already been
cleared, leading to a crash.
To avoid this and other issues, this patch forbids the
importing of new JSMs after we're late enough in shutdown
to have cleared the ClearOnShutdown pointers. I allow the
importing of JSMs that have already been loaded, as that
seems like it should be okay.
Differential Revision: https://phabricator.services.mozilla.com/D89477
This patch was generated by running:
```
perl -p -i \
-e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
-e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
$FILE
```
against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes. The errors fell into three categories:
1. Calling the convert functions with `std::string::c_str()`; these were
changed to simply pass the string instead, relying on implicit conversion
to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
replacement not being type-aware. These changes were reverted.
Differential Revision: https://phabricator.services.mozilla.com/D88903
The patch converts the relevant prefs to use StaticPrefList and let's content JS in child processes to run longer if there
aren't mousedown/ups or keyevents or such. mousemove or wheel aren't considered as important events.
Differential Revision: https://phabricator.services.mozilla.com/D88668
This lets us include some extra flags in the MIME type that's used by the bytecode
cache. It also simplifies the XDR code a bit.
The approach is similar to Wasm's GetOptimizedEncodingBuildId.
Differential Revision: https://phabricator.services.mozilla.com/D88726
This adds the preference, JS shell option, and {ContextOptions,CompileOptions} fields,
but the value isn't read and the code always acts as it's set to true.
Differential Revision: https://phabricator.services.mozilla.com/D88922
Also, remove the existing uses of Result<const nsCString, nsresult> in URLPreloader
and Result<CryptoScheme, const nsCString> in SampleIterator.
Differential Revision: https://phabricator.services.mozilla.com/D88419