Skip to content

Commit 913b37a

Browse files
committed
[MERGE chakra-core#1947 @mrkmarron] TTD -- Enable record w/o debug mode, fixes for reverse continue, updates to assertions, and misc. fixes.
Merge pull request chakra-core#1947 from mrkmarron:TTDPerformance - Enable record w/o debug mode. - Fixes for reverse continue. - Update assert code for explicit info and hard fail. - Move TTD to !NTBUILD or Test - Misc. other fixes.
2 parents 1676cd9 + cad31b8 commit 913b37a

70 files changed

Lines changed: 1294 additions & 1136 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,5 @@ pal/src/config.h
9090
# Generated by other tools
9191
*.orig
9292
deps/
93+
94+
.DS_Store

bin/ChakraCore/ChakraCore.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ JsTTDRawBufferCopySyncIndirect
3838
JsTTDRawBufferModifySyncIndirect
3939
JsTTDRawBufferAsyncModificationRegister
4040
JsTTDRawBufferAsyncModifyComplete
41+
JsTTDCheckAndAssertIfTTDRunning
4142
JsTTDGetSnapTimeTopLevelEventMove
43+
JsTTDGetSnapShotBoundInterval
44+
JsTTDGetPreviousSnapshotInterval
4245
JsTTDPreExecuteSnapShotInterval
4346
JsTTDMoveToTopLevelEvent
4447
JsTTDReplayExecution

bin/ch/ChakraRtInterface.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ bool ChakraRTInterface::LoadChakraDll(ArgInfo* argInfo, HINSTANCE *outLibrary)
159159
m_jsApiHooks.pfJsrtTTDHostExit = (JsAPIHooks::JsrtTTDHostExitPtr)GetChakraCoreSymbol(library, "JsTTDHostExit");
160160

161161
m_jsApiHooks.pfJsrtTTDGetSnapTimeTopLevelEventMove = (JsAPIHooks::JsrtTTDGetSnapTimeTopLevelEventMovePtr)GetChakraCoreSymbol(library, "JsTTDGetSnapTimeTopLevelEventMove");
162-
m_jsApiHooks.pfJsrtTTDPreExecuteSnapShotInterval = (JsAPIHooks::JsrtTTDPreExecuteSnapShotIntervalPtr)GetChakraCoreSymbol(library, "JsTTDPreExecuteSnapShotInterval");
163162
m_jsApiHooks.pfJsrtTTDMoveToTopLevelEvent = (JsAPIHooks::JsrtTTDMoveToTopLevelEventPtr)GetChakraCoreSymbol(library, "JsTTDMoveToTopLevelEvent");
164163
m_jsApiHooks.pfJsrtTTDReplayExecution = (JsAPIHooks::JsrtTTDReplayExecutionPtr)GetChakraCoreSymbol(library, "JsTTDReplayExecution");
165164
#endif

bin/ch/ChakraRtInterface.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ struct JsAPIHooks
9393
typedef JsErrorCode(WINAPI *JsrtTTDHostExitPtr)(int statusCode);
9494

9595
typedef JsErrorCode(WINAPI *JsrtTTDGetSnapTimeTopLevelEventMovePtr)(JsRuntimeHandle runtimeHandle, JsTTDMoveMode moveMode, int64_t* targetEventTime, int64_t* targetStartSnapTime, int64_t* targetEndSnapTime);
96-
typedef JsErrorCode(WINAPI *JsrtTTDPreExecuteSnapShotIntervalPtr)(int64_t startSnapTime, int64_t endSnapTime, JsTTDMoveMode moveMode);
97-
typedef JsErrorCode(WINAPI *JsrtTTDMoveToTopLevelEventPtr)(JsTTDMoveMode moveMode, int64_t snapshotStartTime, int64_t eventTime);
96+
typedef JsErrorCode(WINAPI *JsrtTTDMoveToTopLevelEventPtr)(JsRuntimeHandle runtimeHandle, JsTTDMoveMode moveMode, int64_t snapshotStartTime, int64_t eventTime);
9897
typedef JsErrorCode(WINAPI *JsrtTTDReplayExecutionPtr)(JsTTDMoveMode* moveMode, int64_t* rootEventTime);
9998

10099
JsrtCreateRuntimePtr pfJsrtCreateRuntime;
@@ -185,7 +184,6 @@ struct JsAPIHooks
185184
JsrtTTDHostExitPtr pfJsrtTTDHostExit;
186185

187186
JsrtTTDGetSnapTimeTopLevelEventMovePtr pfJsrtTTDGetSnapTimeTopLevelEventMove;
188-
JsrtTTDPreExecuteSnapShotIntervalPtr pfJsrtTTDPreExecuteSnapShotInterval;
189187
JsrtTTDMoveToTopLevelEventPtr pfJsrtTTDMoveToTopLevelEvent;
190188
JsrtTTDReplayExecutionPtr pfJsrtTTDReplayExecution;
191189
};
@@ -363,8 +361,7 @@ class ChakraRTInterface
363361
static JsErrorCode WINAPI JsTTDHostExit(int statusCode) { return HOOK_JS_API(TTDHostExit(statusCode)); }
364362

365363
static JsErrorCode WINAPI JsTTDGetSnapTimeTopLevelEventMove(JsRuntimeHandle runtimeHandle, JsTTDMoveMode moveMode, int64_t* targetEventTime, int64_t* targetStartSnapTime, int64_t* targetEndSnapTime) { return HOOK_JS_API(TTDGetSnapTimeTopLevelEventMove(runtimeHandle, moveMode, targetEventTime, targetStartSnapTime, targetEndSnapTime)); }
366-
static JsErrorCode WINAPI JsTTDPreExecuteSnapShotInterval(int64_t startSnapTime, int64_t endSnapTime, JsTTDMoveMode moveMode) { return HOOK_JS_API(TTDPreExecuteSnapShotInterval(startSnapTime, endSnapTime, moveMode)); }
367-
static JsErrorCode WINAPI JsTTDMoveToTopLevelEvent(JsTTDMoveMode moveMode, int64_t snapshotStartTime, int64_t eventTime) { return HOOK_JS_API(TTDMoveToTopLevelEvent(moveMode, snapshotStartTime, eventTime)); }
364+
static JsErrorCode WINAPI JsTTDMoveToTopLevelEvent(JsRuntimeHandle runtimeHandle, JsTTDMoveMode moveMode, int64_t snapshotStartTime, int64_t eventTime) { return HOOK_JS_API(TTDMoveToTopLevelEvent(runtimeHandle, moveMode, snapshotStartTime, eventTime)); }
368365
static JsErrorCode WINAPI JsTTDReplayExecution(JsTTDMoveMode* moveMode, int64_t* rootEventTime) { return HOOK_JS_API(TTDReplayExecution(moveMode, rootEventTime)); }
369366

370367
static JsErrorCode WINAPI JsRun(JsValueRef script, JsSourceContext sourceContext, JsValueRef sourceUrl, JsParseScriptAttributes parseAttributes, JsValueRef *result) { return HOOK_JS_API(Run(script, sourceContext, sourceUrl, parseAttributes, result)); }

bin/ch/Helpers.cpp

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ JsTTDStreamHandle TTDHostOpen(const TTDHostCharType* path, bool isWrite)
114114
#include <libgen.h>
115115
#include <dirent.h>
116116

117+
#ifdef __APPLE__
118+
#include <mach-o/dyld.h>
119+
#endif
120+
117121
typedef utf8char_t TTDHostCharType;
118122
typedef struct dirent* TTDHostFileInfo;
119123
typedef DIR* TTDHostFindHandle;
@@ -174,7 +178,14 @@ void TTDHostAppendAscii(TTDHostCharType* dst, const char* src)
174178
void TTDHostBuildCurrentExeDirectory(TTDHostCharType* path, size_t pathBufferLength)
175179
{
176180
TTDHostCharType exePath[MAX_PATH];
181+
//TODO: xplattodo move this logic to PAL
182+
#ifdef __APPLE__
183+
uint32_t tmpPathSize = sizeof(exePath);
184+
_NSGetExecutablePath(TTDHostCharConvert(exePath), &tmpPathSize);
185+
size_t len = TTDHostStringLength(exePath);
186+
#else
177187
size_t len = readlink("/proc/self/exe", TTDHostCharConvert(exePath), MAX_PATH);
188+
#endif
178189

179190
size_t i = len - 1;
180191
while(exePath[i] != TTDHostPathSeparatorChar)
@@ -191,25 +202,6 @@ JsTTDStreamHandle TTDHostOpen(const TTDHostCharType* path, bool isWrite)
191202
return (JsTTDStreamHandle)fopen(TTDHostCharConvert(path), isWrite ? "w+b" : "r+b");
192203
}
193204

194-
#ifdef __APPLE__
195-
#define TTDHostCWD(dst) nullptr
196-
#define TTDDoPathInit(dst)
197-
#define TTDHostTok(opath, TTDHostPathSeparator, context) nullptr
198-
#define TTDHostStat(cpath, statVal) 0
199-
200-
#define TTDHostMKDir(cpath) -1
201-
#define TTDHostCHMod(cpath, flags) -1
202-
#define TTDHostRMFile(cpath) -1
203-
204-
#define TTDHostFindFirst(strPattern, FileInformation) nullptr
205-
#define TTDHostFindNext(hFile, FileInformation) TTDHostFindInvalid
206-
#define TTDHostFindClose(hFile)
207-
208-
#define TTDHostDirInfoName(FileInformation) ((const TTDHostCharType*)"\0")
209-
210-
#define TTDHostRead(buff, size, handle) 0
211-
#define TTDHostWrite(buff, size, handle) 0
212-
#else
213205
#define TTDHostCWD(dst) TTDHostUtf8CharConvert(getcwd(TTDHostCharConvert(dst), MAX_PATH))
214206
#define TTDDoPathInit(dst) TTDHostAppend(dst, TTDHostPathSeparator)
215207
#define TTDHostTok(opath, TTDHostPathSeparator, context) TTDHostUtf8CharConvert(strtok(TTDHostCharConvert(opath), TTDHostCharConvert(TTDHostPathSeparator)))
@@ -228,7 +220,6 @@ JsTTDStreamHandle TTDHostOpen(const TTDHostCharType* path, bool isWrite)
228220
#define TTDHostRead(buff, size, handle) fread(buff, 1, size, (FILE*)handle)
229221
#define TTDHostWrite(buff, size, handle) fwrite(buff, 1, size, (FILE*)handle)
230222
#endif
231-
#endif
232223

233224
HRESULT Helpers::LoadScriptFromFile(LPCSTR filename, LPCSTR& contents, UINT* lengthBytesOut /*= nullptr*/)
234225
{
@@ -665,10 +656,12 @@ void CALLBACK Helpers::TTInitializeForWriteLogStreamCallback(size_t uriByteLengt
665656
Helpers::CleanDirectory(uriByteLength, uriBytes);
666657
}
667658

668-
JsTTDStreamHandle CALLBACK Helpers::TTCreateStreamCallback(size_t uriByteLength, const byte* uriBytes, const char* asciiResourceName, bool read, bool write)
659+
JsTTDStreamHandle CALLBACK Helpers::TTCreateStreamCallback(size_t uriByteLength, const byte* uriBytes, const char* asciiResourceName, bool read, bool write, byte** relocatedUri, size_t* relocatedUriLength)
669660
{
670661
AssertMsg((read | write) & (!read | !write), "Read/Write streams not supported yet -- defaulting to read only");
671662

663+
//relocatedUri and relocatedUriLength are ignored since we don't do code relocation for debugging in CH
664+
672665
void* res = nullptr;
673666
TTDHostCharType path[MAX_PATH];
674667
TTDHostInitFromUriBytes(path, uriBytes, uriByteLength);

bin/ch/Helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public :
1919
static void GetTTDDirectory(const wchar* curi, size_t* uriByteLength, byte* uriBytes);
2020

2121
static void CALLBACK TTInitializeForWriteLogStreamCallback(size_t uriByteLength, const byte* uriBytes);
22-
static JsTTDStreamHandle CALLBACK TTCreateStreamCallback(size_t uriByteLength, const byte* uriBytes, const char* asciiResourceName, bool read, bool write);
22+
static JsTTDStreamHandle CALLBACK TTCreateStreamCallback(size_t uriByteLength, const byte* uriBytes, const char* asciiResourceName, bool read, bool write, byte** relocatedUri, size_t* relocatedUriLength);
2323

2424
static bool CALLBACK TTReadBytesFromStreamCallback(JsTTDStreamHandle handle, byte* buff, size_t size, size_t* readCount);
2525
static bool CALLBACK TTWriteBytesToStreamCallback(JsTTDStreamHandle handle, const byte* buff, size_t size, size_t* writtenCount);

bin/ch/ch.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ HRESULT RunScript(const char* fileName, LPCSTR fileContents, BYTE *bcBuffer, cha
273273
try
274274
{
275275
JsTTDMoveMode moveMode = (JsTTDMoveMode)(JsTTDMoveMode::JsTTDMoveKthEvent | ((int64) startEventCount) << 32);
276-
INT64 snapEventTime = -1;
277-
INT64 nextEventTime = -2;
276+
int64_t snapEventTime = -1;
277+
int64_t nextEventTime = -2;
278278

279279
while(true)
280280
{
@@ -290,7 +290,7 @@ HRESULT RunScript(const char* fileName, LPCSTR fileContents, BYTE *bcBuffer, cha
290290
return error;
291291
}
292292

293-
IfFailedReturn(ChakraRTInterface::JsTTDMoveToTopLevelEvent(moveMode, snapEventTime, nextEventTime));
293+
IfFailedReturn(ChakraRTInterface::JsTTDMoveToTopLevelEvent(chRuntime, moveMode, snapEventTime, nextEventTime));
294294

295295
JsErrorCode res = ChakraRTInterface::JsTTDReplayExecution(&moveMode, &nextEventTime);
296296

@@ -502,6 +502,11 @@ HRESULT ExecuteTest(const char* fileName)
502502
IfJsErrorFailLog(ChakraRTInterface::JsSetCurrentContext(context));
503503

504504
IfFailGo(RunScript(fileName, fileContents, nullptr, nullptr));
505+
506+
unsigned int rcount = 0;
507+
IfJsErrorFailLog(ChakraRTInterface::JsSetCurrentContext(nullptr));
508+
ChakraRTInterface::JsRelease(context, &rcount);
509+
AssertMsg(rcount == 0, "Should only have had 1 ref from replay code and one ref from current context??");
505510
#endif
506511
}
507512
else

lib/Common/CommonDefines.h

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -326,24 +326,28 @@
326326
#ifndef ENABLE_TEST_HOOKS
327327
#define ENABLE_TEST_HOOKS
328328
#endif
329+
#endif // ENABLE_DEBUG_CONFIG_OPTIONS
329330

331+
#if !defined(NTBUILD) || defined(ENABLE_DEBUG_CONFIG_OPTIONS)
330332
////////
331333
//Time Travel flags
332-
#ifdef __APPLE__
333-
#define ENABLE_TTD 0
334-
#else
335334
#define ENABLE_TTD 1
336-
#endif
337-
338-
#if ENABLE_TTD
339-
//A workaround for some unimplemented code parse features (force debug mode) -- Need to set to enable debug attach on recorded traces
340-
#define TTD_DYNAMIC_DECOMPILATION_AND_JIT_WORK_AROUND 1
341335

342336
//A workaround for profile based creation of Native Arrays -- we may or may not want to allow since it differs in record/replay and (currently) asserts in our snap compare
343337
#define TTD_NATIVE_PROFILE_ARRAY_WORK_AROUND 1
344338

339+
#define ENABLE_TTD_ASSERT 1
340+
341+
//Force debug or notjit mode
342+
#define TTD_FORCE_DEBUG_MODE 0
343+
#define TTD_FORCE_NOJIT_MODE 0
344+
345345
//Enable various sanity checking features and asserts
346+
#if ENABLE_DEBUG_CONFIG_OPTIONS
346347
#define ENABLE_TTD_INTERNAL_DIAGNOSTICS 1
348+
#else
349+
#define ENABLE_TTD_INTERNAL_DIAGNOSTICS 0
350+
#endif
347351

348352
#define TTD_COMPRESSED_OUTPUT 0
349353
#define TTD_LOG_READER TextFormatReader
@@ -374,11 +378,9 @@
374378

375379
#define ENABLE_TTD_DIAGNOSTICS_TRACING (ENABLE_OBJECT_SOURCE_TRACKING || ENABLE_BASIC_TRACE || ENABLE_FULL_BC_TRACE)
376380

377-
#endif
378381
//End Time Travel flags
379382
////////
380-
381-
#endif // ENABLE_DEBUG_CONFIG_OPTIONS
383+
#endif
382384

383385
//----------------------------------------------------------------------------------------------------
384386
// Debug only features

lib/Common/Exceptions/ReportError.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ enum ErrorReason
2323
Fatal_Debugger_AttachDetach_Failure = 15,
2424
Fatal_EntryExitRecordCorruption = 16,
2525
Fatal_UnexpectedExceptionHandling = 17,
26-
Fatal_RpcFailure = 18
26+
Fatal_RpcFailure = 18,
27+
28+
Fatal_TTDAbort = 19
2729
};
2830

2931
extern "C" void ReportFatalException(

lib/Jsrt/ChakraDebug.h

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ typedef __int64 int64_t;
101101
/// <summary>
102102
/// Perform a single step back to the previous statement (only applicable in TTD mode).
103103
/// </summary>
104-
JsDiagStepTypeStepBack = 3
104+
JsDiagStepTypeStepBack = 3,
105+
/// <summary>
106+
/// Perform a reverse continue operation (only applicable in TTD mode).
107+
/// </summary>
108+
JsDiagStepTypeStepReverseContinue = 4
105109
} JsDiagStepType;
106110

107111
/// <summary>
@@ -661,15 +665,10 @@ typedef __int64 int64_t;
661665
/// </summary>
662666
JsTTDMoveKthEvent = 0x4,
663667

664-
/// <summary>
665-
/// Indicates if we want to scan the snapshot interval containing the event to populate debug info before moving to execute event.
666-
/// </summary>
667-
JsTTDMoveScanIntervalBeforeDebugExecute = 0x10,
668-
669668
/// <summary>
670669
/// Indicates if we are doing the scan for a continue operation
671670
/// </summary>
672-
JsTTDMoveScanIntervalForContinue = 0x20,
671+
JsTTDMoveScanIntervalForContinue = 0x10,
673672

674673
/// <summary>
675674
/// Indicates if we want to set break on entry or just run and let something else trigger breakpoints.
@@ -705,7 +704,7 @@ typedef __int64 int64_t;
705704
/// <param name="read">If the handle should be opened for reading.</param>
706705
/// <param name="write">If the handle should be opened for writing.</param>
707706
/// <returns>A JsTTDStreamHandle opened in read/write mode as specified.</returns>
708-
typedef JsTTDStreamHandle (CHAKRA_CALLBACK *TTDOpenResourceStreamCallback)(_In_ size_t uriByteLength, _In_reads_(uriByteLength) const byte* uriBytes, _In_z_ const char* asciiResourceName, _In_ bool read, _In_ bool write);
707+
typedef JsTTDStreamHandle (CHAKRA_CALLBACK *TTDOpenResourceStreamCallback)(_In_ size_t uriByteLength, _In_reads_(uriByteLength) const byte* uriBytes, _In_z_ const char* asciiResourceName, _In_ bool read, _In_ bool write, _Out_opt_ byte** relocatedUri, _Out_opt_ size_t* relocatedUriLength);
709708

710709
/// <summary>
711710
/// TTD API -- may change in future versions:
@@ -949,6 +948,17 @@ typedef __int64 int64_t;
949948
JsTTDRawBufferAsyncModifyComplete(
950949
_In_ byte* finalModPos);
951950

951+
/// <summary>
952+
/// TTD API -- may change in future versions:
953+
/// A check for unimplmented TTD actions in the host.
954+
/// This API is a TEMPORARY API while we complete the implementation of TTD support in the Node host and will be deleted once that is complete.
955+
/// </summary>
956+
/// <param name="msg">The message to print if we should be catching this as a TTD operation.</param>
957+
/// <returns>The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.</returns>
958+
CHAKRA_API
959+
JsTTDCheckAndAssertIfTTDRunning(
960+
_In_ const char* msg);
961+
952962
/// <summary>
953963
/// TTD API -- may change in future versions:
954964
/// Before calling JsTTDMoveToTopLevelEvent (which inflates a snapshot and replays) check to see if we want to reset the script context.
@@ -967,31 +977,65 @@ typedef __int64 int64_t;
967977
_Out_ int64_t* targetStartSnapTime,
968978
_Out_opt_ int64_t* targetEndSnapTime);
969979

980+
/// <summary>
981+
/// TTD API -- may change in future versions:
982+
/// Get the snapshot interval that bounds the target event time.
983+
/// </summary>
984+
/// <param name="runtimeHandle">The runtime handle that the script is executing in.</param>
985+
/// <param name="targetEventTime">The event time we want to get the interval for.</param>
986+
/// <param name="startSnapTime">The snapshot time that comes before the desired event.</param>
987+
/// <param name="endSnapTime">The snapshot time that comes after the desired event (-1 if the leg ends before a snapshot appears).</param>
988+
/// <returns>The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.</returns>
989+
CHAKRA_API JsTTDGetSnapShotBoundInterval(
990+
_In_ JsRuntimeHandle runtimeHandle,
991+
_In_ int64_t targetEventTime,
992+
_Out_ int64_t* startSnapTime,
993+
_Out_ int64_t* endSnapTime);
994+
995+
/// <summary>
996+
/// TTD API -- may change in future versions:
997+
/// Get the snapshot interval that precedes the one given by currentSnapStartTime (or -1 if there is no such interval).
998+
/// </summary>
999+
/// <param name="runtimeHandle">The runtime handle that the script is executing in.</param>
1000+
/// <param name="currentSnapStartTime">The current snapshot interval start time.</param>
1001+
/// <param name="previousSnapTime">The resulting previous snapshot interval start time or -1 if no such time.</param>
1002+
/// <returns>The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.</returns>
1003+
CHAKRA_API JsTTDGetPreviousSnapshotInterval(
1004+
_In_ JsRuntimeHandle runtimeHandle,
1005+
_In_ int64_t currentSnapStartTime,
1006+
_Out_ int64_t* previousSnapTime);
1007+
9701008
/// <summary>
9711009
/// TTD API -- may change in future versions:
9721010
/// During debug operations some additional information is populated during replay. This runs the code between the given
9731011
/// snapshots to poulate this information which may be needed by the debugger to determine time-travel jump targets.
9741012
/// </summary>
1013+
/// <param name="runtimeHandle">The runtime handle that the script is executing in.</param>
9751014
///<param name = "startSnapTime">The snapshot time that we will start executing from.< / param>
9761015
///<param name = "endSnapTime">The snapshot time that we will stop at (or -1 if we want to run to the end).< / param>
9771016
/// <param name="moveMode">Additional flags for controling how the move is done.</param>
1017+
/// <param name="newTargetEventTime">The updated target event time set according to the moveMode (-1 if not found).</param>
9781018
/// <returns>The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.</returns>
9791019
CHAKRA_API JsTTDPreExecuteSnapShotInterval(
1020+
_In_ JsRuntimeHandle runtimeHandle,
9801021
_In_ int64_t startSnapTime,
9811022
_In_ int64_t endSnapTime,
982-
_In_ JsTTDMoveMode moveMode);
1023+
_In_ JsTTDMoveMode moveMode,
1024+
_Out_ int64_t* newTargetEventTime);
9831025

9841026
/// <summary>
9851027
/// TTD API -- may change in future versions:
9861028
/// Move to the given top-level call event time (assuming JsTTDPrepContextsForTopLevelEventMove) was called previously to reset any script contexts.
9871029
/// This also computes the ready-to-run snapshot if needed.
9881030
/// </summary>
1031+
/// <param name="runtimeHandle">The runtime handle that the script is executing in.</param>
9891032
/// <param name="moveMode">Additional flags for controling how the move is done.</param>
9901033
/// <param name="snapshotTime">The event time that we will start executing from to move to the given target time.</param>
9911034
/// <param name="eventTime">The event that we want to move to.</param>
9921035
/// <returns>The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.</returns>
9931036
CHAKRA_API
9941037
JsTTDMoveToTopLevelEvent(
1038+
_In_ JsRuntimeHandle runtimeHandle,
9951039
_In_ JsTTDMoveMode moveMode,
9961040
_In_ int64_t snapshotTime,
9971041
_In_ int64_t eventTime);
@@ -1010,6 +1054,6 @@ typedef __int64 int64_t;
10101054
CHAKRA_API
10111055
JsTTDReplayExecution(
10121056
_Inout_ JsTTDMoveMode* moveMode,
1013-
_Inout_ int64_t* rootEventTime);
1057+
_Out_ int64_t* rootEventTime);
10141058

10151059
#endif // _CHAKRADEBUG_H_

0 commit comments

Comments
 (0)