mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1575657 - Always create record/replay checkpoints when painting, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D46244 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ea1f27965e
commit
c6cedf4eac
@ -5926,6 +5926,10 @@ void PresShell::Paint(nsView* aViewToPaint, const nsRegion& aDirtyRegion,
|
|||||||
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("PresShell::Paint", GRAPHICS, url);
|
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("PresShell::Paint", GRAPHICS, url);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// When recording/replaying, create a checkpoint after every paint. This can
|
||||||
|
// cause content JS to run, so must live outside |nojs|.
|
||||||
|
auto createCheckpoint = MakeScopeExit(recordreplay::child::CreateCheckpoint);
|
||||||
|
|
||||||
Maybe<js::AutoAssertNoContentJS> nojs;
|
Maybe<js::AutoAssertNoContentJS> nojs;
|
||||||
|
|
||||||
// On Android, Flash can call into content JS during painting, so we can't
|
// On Android, Flash can call into content JS during painting, so we can't
|
||||||
@ -6083,14 +6087,6 @@ void PresShell::Paint(nsView* aViewToPaint, const nsRegion& aDirtyRegion,
|
|||||||
// We can paint directly into the widget using its layer manager.
|
// We can paint directly into the widget using its layer manager.
|
||||||
nsLayoutUtils::PaintFrame(nullptr, frame, aDirtyRegion, bgcolor,
|
nsLayoutUtils::PaintFrame(nullptr, frame, aDirtyRegion, bgcolor,
|
||||||
nsDisplayListBuilderMode::Painting, flags);
|
nsDisplayListBuilderMode::Painting, flags);
|
||||||
|
|
||||||
// When recording/replaying, create a checkpoint after every paint. This
|
|
||||||
// can cause content JS to run, so reset |nojs|.
|
|
||||||
if (recordreplay::IsRecordingOrReplaying()) {
|
|
||||||
nojs.reset();
|
|
||||||
recordreplay::child::CreateCheckpoint();
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,12 +310,6 @@ bool DebuggerRunsInMiddleman() {
|
|||||||
return RecordReplayValue(gDebuggerRunsInMiddleman);
|
return RecordReplayValue(gDebuggerRunsInMiddleman);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateCheckpoint() {
|
|
||||||
if (!HasDivergedFromRecording()) {
|
|
||||||
NewCheckpoint();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ReportFatalError(const Maybe<MinidumpInfo>& aMinidump, const char* aFormat,
|
void ReportFatalError(const Maybe<MinidumpInfo>& aMinidump, const char* aFormat,
|
||||||
...) {
|
...) {
|
||||||
// Notify the middleman that we are crashing and are going to try to write a
|
// Notify the middleman that we are crashing and are going to try to write a
|
||||||
|
@ -16,6 +16,9 @@ namespace mozilla {
|
|||||||
class VsyncObserver;
|
class VsyncObserver;
|
||||||
|
|
||||||
namespace recordreplay {
|
namespace recordreplay {
|
||||||
|
|
||||||
|
void NewCheckpoint();
|
||||||
|
|
||||||
namespace child {
|
namespace child {
|
||||||
|
|
||||||
// This file has the public API for definitions used in facilitating IPC
|
// This file has the public API for definitions used in facilitating IPC
|
||||||
@ -30,7 +33,11 @@ base::ProcessId MiddlemanProcessId();
|
|||||||
base::ProcessId ParentProcessId();
|
base::ProcessId ParentProcessId();
|
||||||
|
|
||||||
// Create a normal checkpoint, if execution has not diverged from the recording.
|
// Create a normal checkpoint, if execution has not diverged from the recording.
|
||||||
void CreateCheckpoint();
|
inline void CreateCheckpoint() {
|
||||||
|
if (IsRecordingOrReplaying() && !HasDivergedFromRecording()) {
|
||||||
|
NewCheckpoint();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Painting Coordination
|
// Painting Coordination
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace recordreplay {
|
namespace recordreplay {
|
||||||
|
|
||||||
|
void NewCheckpoint() { MOZ_CRASH(); }
|
||||||
|
|
||||||
namespace child {
|
namespace child {
|
||||||
|
|
||||||
void InitRecordingOrReplayingProcess(int* aArgc, char*** aArgv) {
|
void InitRecordingOrReplayingProcess(int* aArgc, char*** aArgv) {
|
||||||
@ -26,8 +28,6 @@ base::ProcessId MiddlemanProcessId() { MOZ_CRASH(); }
|
|||||||
|
|
||||||
base::ProcessId ParentProcessId() { MOZ_CRASH(); }
|
base::ProcessId ParentProcessId() { MOZ_CRASH(); }
|
||||||
|
|
||||||
void CreateCheckpoint() { MOZ_CRASH(); }
|
|
||||||
|
|
||||||
void SetVsyncObserver(VsyncObserver* aObserver) { MOZ_CRASH(); }
|
void SetVsyncObserver(VsyncObserver* aObserver) { MOZ_CRASH(); }
|
||||||
|
|
||||||
bool OnVsync() { MOZ_CRASH(); }
|
bool OnVsync() { MOZ_CRASH(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user