From 9a039d8182b8d4a94260ed95918625c3ffcfa918 Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Mon, 22 Jan 2018 16:49:11 -0800 Subject: [PATCH] Add TTD record to the JsConvertValueToString fast path JsConvertValueToString can implicitly marshal values between script contexts. Even if there's no conversion occurring the result still needs to be recorded. --- lib/Jsrt/Jsrt.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Jsrt/Jsrt.cpp b/lib/Jsrt/Jsrt.cpp index d42212147c8..84290aec4ba 100644 --- a/lib/Jsrt/Jsrt.cpp +++ b/lib/Jsrt/Jsrt.cpp @@ -1232,10 +1232,14 @@ CHAKRA_API JsConvertValueToString(_In_ JsValueRef value, _Out_ JsValueRef *resul if (value != nullptr && Js::JavascriptString::Is(value)) { - return ContextAPINoScriptWrapper_NoRecord([&](Js::ScriptContext *scriptContext) -> JsErrorCode { + return ContextAPINoScriptWrapper([&](Js::ScriptContext *scriptContext, TTDRecorder& _actionEntryPopper) -> JsErrorCode { + PERFORM_JSRT_TTD_RECORD_ACTION(scriptContext, RecordJsRTVarToStringConversion, (Js::Var)value); VALIDATE_INCOMING_REFERENCE(value, scriptContext); *result = value; + + PERFORM_JSRT_TTD_RECORD_ACTION_RESULT(scriptContext, result); + return JsNoError; }); }