Bug 1581414 - Don't report deprecation warnings after diverging from the recording, r=mccr8.

Differential Revision: https://phabricator.services.mozilla.com/D45960

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brian Hackett 2019-09-16 13:33:43 +00:00
Родитель 2641cbd682
Коммит 9a41a4d559
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -4009,6 +4009,13 @@ void DeprecationWarning(JSContext* aCx, JSObject* aObject,
void DeprecationWarning(const GlobalObject& aGlobal,
Document::DeprecatedOperations aOperation) {
if (NS_IsMainThread()) {
// After diverging from the recording, a replaying process is not able to
// report warnings and will be forced to rewind. Avoid reporting warnings
// in this case so that the debugger can access deprecated properties.
if (recordreplay::HasDivergedFromRecording()) {
return;
}
nsCOMPtr<nsPIDOMWindowInner> window =
do_QueryInterface(aGlobal.GetAsSupports());
if (window && window->GetExtantDoc()) {