Skip to content

Commit

Permalink
[MERGE #4592 @kfarnung] Add TTD record to the JsConvertValueToString …
Browse files Browse the repository at this point in the history
…fast path

Merge pull request #4592 from kfarnung:ttdstrings

JsConvertValueToString can implicitly marshal values between script
contexts.  Even if there's no conversion occurring the result still
needs to be recorded.
  • Loading branch information
kfarnung committed Jan 23, 2018
2 parents 7318a88 + 9a039d8 commit fdd885b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Jsrt/Jsrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
}
Expand Down

0 comments on commit fdd885b

Please sign in to comment.