Bug 1689990 - Part 16: Move assertions to the top of addNativeToBytecodeEntry(). r=jandem

These assertions should hold even when profiling isn't enabled.

Differential Revision: https://phabricator.services.mozilla.com/D103653
This commit is contained in:
André Bargull 2021-02-05 16:11:19 +00:00
Родитель 9ed6097021
Коммит ca732b5e9b
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -206,6 +206,10 @@ void CodeGeneratorShared::addOutOfLineCode(OutOfLineCode* code,
}
bool CodeGeneratorShared::addNativeToBytecodeEntry(const BytecodeSite* site) {
MOZ_ASSERT(site);
MOZ_ASSERT(site->tree());
MOZ_ASSERT(site->pc());
// Skip the table entirely if profiling is not enabled.
if (!isProfilerInstrumentationEnabled()) {
return true;
@ -217,10 +221,6 @@ bool CodeGeneratorShared::addNativeToBytecodeEntry(const BytecodeSite* site) {
return false;
}
MOZ_ASSERT(site);
MOZ_ASSERT(site->tree());
MOZ_ASSERT(site->pc());
InlineScriptTree* tree = site->tree();
jsbytecode* pc = site->pc();
uint32_t nativeOffset = masm.currentOffset();