Bug 1940098 - Use UTF8Strings where applicable, r=emilio DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D233393
This commit is contained in:
@@ -10,15 +10,13 @@
|
||||
namespace mozilla::dom {
|
||||
|
||||
/* static */
|
||||
void Nyx::Log(const GlobalObject&, const nsAString& aMsg) {
|
||||
NS_ConvertUTF16toUTF8 cStr(aMsg);
|
||||
MOZ_FUZZING_NYX_PRINTF("%s\n", cStr.get());
|
||||
void Nyx::Log(const GlobalObject&, const nsACString& aMsg) {
|
||||
MOZ_FUZZING_NYX_PRINTF("%s\n", PromiseFlatCString(aMsg).get());
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool Nyx::IsEnabled(const GlobalObject&, const nsAString& aFuzzerName) {
|
||||
return fuzzing::Nyx::instance().is_enabled(
|
||||
NS_ConvertUTF16toUTF8(aFuzzerName).get());
|
||||
bool Nyx::IsEnabled(const GlobalObject&, const nsACString& aFuzzerName) {
|
||||
return fuzzing::Nyx::instance().is_enabled(PromiseFlatCString(aFuzzerName).get());
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
||||
@@ -15,9 +15,9 @@ class GlobalObject;
|
||||
|
||||
class Nyx final {
|
||||
public:
|
||||
static void Log(const GlobalObject&, const nsAString& aMsg);
|
||||
static void Log(const GlobalObject&, const nsACString& aMsg);
|
||||
|
||||
static bool IsEnabled(const GlobalObject&, const nsAString& aFuzzerName);
|
||||
static bool IsEnabled(const GlobalObject&, const nsACString& aFuzzerName);
|
||||
|
||||
static bool IsReplay(const GlobalObject&);
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@ namespace Nyx {
|
||||
/**
|
||||
* Use nyx_put for logging during Nyx fuzzing.
|
||||
*/
|
||||
undefined log(UTF8String aMsg);
|
||||
|
||||
undefined log(DOMString aMsg);
|
||||
/**
|
||||
* Determine if Nyx is enabled for the specified fuzzer.
|
||||
*/
|
||||
boolean isEnabled(DOMString aFuzzerName);
|
||||
boolean isEnabled(UTF8String aFuzzerName);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user