Bug 1547084 Part 1 - Remove recordReplayDirective interface and uses, r=mccr8.
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 12 May 2019 13:09:55 -1000
changeset 474171 6cd72bb81d8952d3b2ea8c8cd7cdcc9618d8e290
parent 474170 134b0641a7aabf9f41a42678d74c497592b0fc49
child 474172 ae4aa5c6c43010a553f7f30e30334333179c4647
push id36023
push userncsoregi@mozilla.com
push dateThu, 16 May 2019 21:56:43 +0000
treeherdermozilla-central@786f094a30ae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1547084
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1547084 Part 1 - Remove recordReplayDirective interface and uses, r=mccr8.
devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-03.js
devtools/client/webreplay/mochitest/examples/doc_rr_basic.html
devtools/client/webreplay/mochitest/examples/doc_rr_logs.html
js/xpconnect/idl/xpccomponents.idl
js/xpconnect/src/XPCComponents.cpp
mfbt/RecordReplay.cpp
mfbt/RecordReplay.h
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-03.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-03.js
@@ -4,25 +4,22 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 /* eslint-disable no-undef */
 
 "use strict";
 
 // Test some issues when stepping around after hitting a breakpoint while recording.
 add_task(async function() {
   const dbg = await attachRecordingDebugger("doc_rr_continuous.html");
-  const {threadClient, tab, toolbox, target} = dbg;
+  const {threadClient, tab, toolbox} = dbg;
 
   await threadClient.interrupt();
   const bp1 = await setBreakpoint(threadClient, "doc_rr_continuous.html", 19);
   await resumeToLine(threadClient, 19);
   await reverseStepOverToLine(threadClient, 18);
-  await checkEvaluateInTopFrame(target,
-    "SpecialPowers.Cu.recordReplayDirective(/* AlwaysTakeTemporarySnapshots */ 3)",
-    undefined);
   await stepInToLine(threadClient, 22);
   const bp2 = await setBreakpoint(threadClient, "doc_rr_continuous.html", 24);
   await resumeToLine(threadClient, 24);
   const bp3 = await setBreakpoint(threadClient, "doc_rr_continuous.html", 22);
   await rewindToLine(threadClient, 22);
 
   await threadClient.removeBreakpoint(bp1);
   await threadClient.removeBreakpoint(bp2);
--- a/devtools/client/webreplay/mochitest/examples/doc_rr_basic.html
+++ b/devtools/client/webreplay/mochitest/examples/doc_rr_basic.html
@@ -27,12 +27,10 @@ function testStepping() {
   return a;
 }
 function testStepping2() {
   var c = this; // Note: using 'this' causes the script to have a prologue.
   c++;
   c--;
 }
 window.setTimeout(f, 1);
-// Simulate a longer recording by marking major checkpoints whenever possible.
-SpecialPowers.Cu.recordReplayDirective(/* AlwaysMarkMajorCheckpoints */ 4);
 </script>
 </html>
--- a/devtools/client/webreplay/mochitest/examples/doc_rr_logs.html
+++ b/devtools/client/webreplay/mochitest/examples/doc_rr_logs.html
@@ -17,12 +17,10 @@ function f() {
   console.log({ number }); 
   number++;
   console.log({ number }); 
   number++;
   console.log({ number }); 
   window.setTimeout(recordingFinished);
 }
 window.setTimeout(f, 1);
-// Simulate a longer recording by marking major checkpoints whenever possible.
-SpecialPowers.Cu.recordReplayDirective(/* AlwaysMarkMajorCheckpoints */ 4);
 </script>
 </html>
--- a/js/xpconnect/idl/xpccomponents.idl
+++ b/js/xpconnect/idl/xpccomponents.idl
@@ -664,19 +664,16 @@ interface nsIXPCComponents_Utils : nsISu
     AUTF8String readUTF8File(in nsIFile file);
 
     /*
      * Reads the given local file URL and returns its contents. This has the
      * same semantics of readUTF8File.
      */
     AUTF8String readUTF8URI(in nsIURI url);
 
-    /* Give a directive to the record/replay system. */
-    void recordReplayDirective(in long directive);
-
     /* Create a spellchecker object. */
     nsIEditorSpellCheck createSpellChecker();
 
     /* Create a commandline object. */
     nsISupports createCommandLine();
 
     /* Create a command params object. */
     nsICommandParams createCommandParams();
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -2405,22 +2405,16 @@ nsXPCComponents_Utils::ReadUTF8URI(nsIUR
 NS_IMETHODIMP
 nsXPCComponents_Utils::Now(double* aRetval) {
   TimeStamp start = TimeStamp::ProcessCreation();
   *aRetval = (TimeStamp::Now() - start).ToMilliseconds();
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsXPCComponents_Utils::RecordReplayDirective(int aDirective) {
-  recordreplay::RecordReplayDirective(aDirective);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsXPCComponents_Utils::CreateSpellChecker(nsIEditorSpellCheck** aSpellChecker) {
   NS_ENSURE_ARG_POINTER(aSpellChecker);
   nsCOMPtr<nsIEditorSpellCheck> spellChecker = new mozilla::EditorSpellCheck();
   spellChecker.forget(aSpellChecker);
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/mfbt/RecordReplay.cpp
+++ b/mfbt/RecordReplay.cpp
@@ -75,19 +75,17 @@ namespace recordreplay {
                       ()) Macro(InternalRecordReplayAssert,                    \
                                 (const char* aFormat, va_list aArgs),          \
                                 (aFormat, aArgs))                              \
                       Macro(InternalRecordReplayAssertBytes,                   \
                             (const void* aData, size_t aSize),                 \
                             (aData, aSize)) Macro(InternalRegisterThing,       \
                                                   (void* aThing), (aThing))    \
                           Macro(InternalUnregisterThing, (void* aThing),       \
-                                (aThing)) Macro(InternalRecordReplayDirective, \
-                                                (long aDirective),             \
-                                                (aDirective))                  \
+                                (aThing))                                      \
                               Macro(BeginContentParse,                         \
                                     (const void* aToken, const char* aURL,     \
                                      const char* aContentType),                \
                                     (aToken, aURL, aContentType))              \
                                   Macro(AddContentParseData8,                  \
                                         (const void* aToken,                   \
                                          const mozilla::Utf8Unit* aUtf8Buffer, \
                                          size_t aLength),                      \
--- a/mfbt/RecordReplay.h
+++ b/mfbt/RecordReplay.h
@@ -253,20 +253,16 @@ static inline bool HasDivergedFromRecord
 // will be consistent between recording/replaying and can be used in assertion
 // strings.
 static inline void RecordReplayAssert(const char* aFormat, ...);
 static inline void RecordReplayAssertBytes(const void* aData, size_t aSize);
 static inline void RegisterThing(void* aThing);
 static inline void UnregisterThing(void* aThing);
 static inline size_t ThingIndex(void* aThing);
 
-// Give a directive to the record/replay system. For possible values for
-// aDirective, see ProcessRecordReplay.h. This is used for testing purposes.
-static inline void RecordReplayDirective(long aDirective);
-
 // Helper for record/replay asserts, try to determine a name for a C++ object
 // with virtual methods based on its vtable.
 static inline const char* VirtualThingName(void* aThing);
 
 // Enum which describes whether to preserve behavior between recording and
 // replay sessions.
 enum class Behavior { DontPreserve, Preserve };
 
@@ -435,18 +431,16 @@ MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(Weak
 MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(RecordReplayAssertBytes,
                                     (const void* aData, size_t aSize),
                                     (aData, aSize))
 MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(RegisterThing, (void* aThing), (aThing))
 MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(UnregisterThing, (void* aThing), (aThing))
 MOZ_MAKE_RECORD_REPLAY_WRAPPER(ThingIndex, size_t, 0, (void* aThing), (aThing))
 MOZ_MAKE_RECORD_REPLAY_WRAPPER(VirtualThingName, const char*, nullptr,
                                (void* aThing), (aThing))
-MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID(RecordReplayDirective, (long aDirective),
-                                    (aDirective))
 
 #undef MOZ_MAKE_RECORD_REPLAY_WRAPPER_VOID
 #undef MOZ_MAKERECORDREPLAYWRAPPER
 
 MFBT_API void InternalRecordReplayAssert(const char* aFormat, va_list aArgs);
 
 static inline void RecordReplayAssert(const char* aFormat, ...) {
   if (IsRecordingOrReplaying()) {