WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
the patch
bug-130672-20140326103442.patch (text/plain), 4.65 KB, created by
Blaze Burg
on 2014-03-26 10:35:03 PDT
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Blaze Burg
Created:
2014-03-26 10:35:03 PDT
Size:
4.65 KB
patch
obsolete
>Subversion Revision: 166244 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8d049057132b8d9b8b077f9a24aa7a702e39df50..6ee0e8e7f5d077cc9b885fb737053803b9622bd7 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,5 +1,24 @@ > 2014-03-25 Brian Burg <bburg@apple.com> > >+ Web Replay: disable page cache and resource cache during capture/replay >+ https://bugs.webkit.org/show_bug.cgi?id=130672 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Save, set, and restore cache settings at the correct times. >+ >+ No new tests. If this code fails, then the tests for network replay will fail. >+ >+ * replay/ReplayController.cpp: >+ (WebCore::ReplayController::setForceDeterministicSettings): Added. >+ (WebCore::ReplayController::startCapturing): >+ (WebCore::ReplayController::stopCapturing): >+ (WebCore::ReplayController::cancelPlayback): >+ (WebCore::ReplayController::replayToPosition): >+ * replay/ReplayController.h: >+ >+2014-03-25 Brian Burg <bburg@apple.com> >+ > Web Replay: add page-level setting to bypass the MemoryCache > https://bugs.webkit.org/show_bug.cgi?id=130728 > >diff --git a/Source/WebCore/replay/ReplayController.cpp b/Source/WebCore/replay/ReplayController.cpp >index 4f0f086f6aee153236494325c02c496d4e06431c..9bda865f7e4078db8231c84576ebe9f6aed26e55 100644 >--- a/Source/WebCore/replay/ReplayController.cpp >+++ b/Source/WebCore/replay/ReplayController.cpp >@@ -44,6 +44,7 @@ > #include "ReplaySessionSegment.h" > #include "ReplayingInputCursor.h" > #include "ScriptController.h" >+#include "Settings.h" > #include "UserInputBridge.h" > #include "WebReplayInputs.h" > #include <replay/EmptyInputCursor.h> >@@ -65,6 +66,22 @@ ReplayController::ReplayController(Page& page) > { > } > >+void ReplayController::setForceDeterministicSettings(bool shouldForce) >+{ >+ ASSERT(shouldForce ^ (m_sessionState == SessionState::Inactive)); >+ >+ if (shouldForce) { >+ m_savedSettings.usesPageCache = m_page.settings().usesPageCache(); >+ m_savedSettings.usesMemoryCache = m_page.settings().usesMemoryCache(); >+ >+ m_page.settings().setUsesPageCache(false); >+ m_page.settings().setUsesMemoryCache(false); >+ } else { >+ m_page.settings().setUsesPageCache(m_savedSettings.usesPageCache); >+ m_page.settings().setUsesMemoryCache(m_savedSettings.usesMemoryCache); >+ } >+} >+ > void ReplayController::setSessionState(SessionState state) > { > ASSERT(state != m_sessionState); >@@ -199,6 +216,7 @@ void ReplayController::startCapturing() > ASSERT(m_segmentState == SegmentState::Unloaded); > > setSessionState(SessionState::Capturing); >+ setForceDeterministicSettings(true); > > LOG(WebReplay, "%-20s Starting capture.\n", "ReplayController"); > InspectorInstrumentation::captureStarted(&m_page); >@@ -216,6 +234,7 @@ void ReplayController::stopCapturing() > completeSegment(); > > setSessionState(SessionState::Inactive); >+ setForceDeterministicSettings(false); > > LOG(WebReplay, "%-20s Stopping capture.\n", "ReplayController"); > InspectorInstrumentation::captureStopped(&m_page); >@@ -263,6 +282,7 @@ void ReplayController::cancelPlayback() > ASSERT(m_segmentState == SegmentState::Loaded); > unloadSegment(); > m_sessionState = SessionState::Inactive; >+ setForceDeterministicSettings(false); > InspectorInstrumentation::playbackFinished(&m_page); > } > >@@ -274,8 +294,10 @@ void ReplayController::replayToPosition(const ReplayPosition& position, Dispatch > > m_dispatchSpeed = speed; > >- if (m_sessionState != SessionState::Replaying) >+ if (m_sessionState != SessionState::Replaying) { > setSessionState(SessionState::Replaying); >+ setForceDeterministicSettings(true); >+ } > > if (m_segmentState == SegmentState::Unloaded) > loadSegmentAtIndex(position.segmentOffset); >diff --git a/Source/WebCore/replay/ReplayController.h b/Source/WebCore/replay/ReplayController.h >index ca8cbd6203ccc30d0c6b3e2ca48bd08d6d1f760e..26d77bd379a965f17719d247a7cb165c30cfc29e 100644 >--- a/Source/WebCore/replay/ReplayController.h >+++ b/Source/WebCore/replay/ReplayController.h >@@ -151,6 +151,17 @@ private: > EventLoopInputDispatcher& dispatcher() const; > > void setSessionState(SessionState); >+ void setForceDeterministicSettings(bool); >+ >+ struct SavedSettings { >+ bool usesPageCache; >+ bool usesMemoryCache; >+ >+ SavedSettings() >+ : usesPageCache(false) >+ , usesMemoryCache(true) >+ { } >+ }; > > Page& m_page; > >@@ -170,6 +181,7 @@ private: > SessionState m_sessionState; > > DispatchSpeed m_dispatchSpeed; >+ SavedSettings m_savedSettings; > }; > > } // namespace WebCore
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
timothy
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 130672
: 227861