How to suppress asm.js compilation message?

When using asm.js code, some browsers give a compilation message. This:

Successfully compiled asm.js code (loaded from the cache in 201 ms)

Is there any way to suppress this message?

+4
source share
1 answer

The message itself is here: https://hg.mozilla.org/mozilla-central/file/tip/js/src/js.msg#l357

MSG_DEF(JSMSG_USE_ASM_TYPE_OK, 1, JSEXN_WARN, "Successfully compiled asm.js code ({0})")

And it is emitted here: https://hg.mozilla.org/mozilla-central/file/tip/js/src/wasm/AsmJS.cpp#l8718

static bool
SuccessfulValidation(AsmJSParser& parser, UniqueChars str)
{
    return parser.warningNoOffset(JSMSG_USE_ASM_TYPE_OK, str.get());
}

Called here: https://hg.mozilla.org/mozilla-central/file/tip/js/src/wasm/AsmJS.cpp#l8877

    // Success! Write to the console with a "warning" message.
    *validated = true;
    SuccessfulValidation(parser, Move(message));
    return NoExceptionPending(cx);
}

There is no explicit “optionality” in this line, even the comment says that it goes to the console, period.

JSEXN_WARN ( jsexn.h, jsexn.cpp jsapi.h), , , ( ":..." ): https://hg.mozilla.org/mozilla-central/file/tip/js/src/jsapi.h#l580

* JSEXN_WARN is used for warnings in js.msg files (for instance because we
* don't want to prepend 'Error:' to warning messages). This value can go away
* if we ever decide to use an entirely separate mechanism for warnings.

, JSEXN_WARN if ( ... || exnType == JSEXN_WARN || ... ) do nothing, ( , ad-hoc ).

, ,

asm.js?

Firefox: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build

+4
source

Source: https://habr.com/ru/post/1693333/


All Articles