зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1773319 - Rework FrontendContex::gcSafeCallback so rooting hazard analysis understands it r=arai
Previously, rooting hazard analysis could report calls to gcSafeCallback as triggering a GC because of the two calls to callback(). Now it understands that the single call to callback() will not trigger a GC. Differential Revision: https://phabricator.services.mozilla.com/D172333
This commit is contained in:
Родитель
e9fadb2ebe
Коммит
1ed143bc2a
|
@ -89,9 +89,9 @@ void FrontendContext::recoverFromOutOfMemory() {
|
|||
|
||||
const JSErrorFormatString* FrontendContext::gcSafeCallback(
|
||||
JSErrorCallback callback, void* userRef, const unsigned errorNumber) {
|
||||
mozilla::Maybe<gc::AutoSuppressGC> suppressGC;
|
||||
if (maybeCx_) {
|
||||
gc::AutoSuppressGC suppressGC(maybeCx_);
|
||||
return callback(userRef, errorNumber);
|
||||
suppressGC.emplace(maybeCx_);
|
||||
}
|
||||
|
||||
return callback(userRef, errorNumber);
|
||||
|
|
Загрузка…
Ссылка в новой задаче