Skip to content
Permalink
Browse files

remove unneeded wrapper

  • Loading branch information...
MikeHolman committed Mar 11, 2019
1 parent 7044f78 commit 11b345608217da2793d59b45381fe45c2e0c3396
Showing with 4 additions and 12 deletions.
  1. +4 −12 lib/Jsrt/Core/JsrtCore.cpp
@@ -1394,31 +1394,23 @@ CHAKRA_API JsAllocRawData(_In_ JsRuntimeHandle runtimeHandle, _In_ size_t sizeIn

CHAKRA_API JsIsCallable(_In_ JsValueRef object, _Out_ bool *isCallable)
{
return ContextAPIWrapper<JSRT_MAYBE_TRUE>([&](Js::ScriptContext *scriptContext, TTDRecorder& _actionEntryPopper) -> JsErrorCode {
PERFORM_JSRT_TTD_RECORD_ACTION_NOT_IMPLEMENTED(scriptContext);
return ContextAPINoScriptWrapper_NoRecord([&](Js::ScriptContext *scriptContext) -> JsErrorCode {
VALIDATE_INCOMING_OBJECT(object, scriptContext);
PARAM_NOT_NULL(isCallable);

Js::RecyclableObject * instance = Js::VarTo<Js::RecyclableObject>(object);
AssertMsg(scriptContext->GetThreadContext()->IsScriptActive(), "Caller is expected to be under ContextAPIWrapper!");

*isCallable = Js::JavascriptConversion::IsCallable(instance);
*isCallable = Js::JavascriptConversion::IsCallable(object);

return JsNoError;
});
}

CHAKRA_API JsIsConstructor(_In_ JsValueRef object, _Out_ bool *isConstructor)
{
return ContextAPIWrapper<JSRT_MAYBE_TRUE>([&](Js::ScriptContext *scriptContext, TTDRecorder& _actionEntryPopper) -> JsErrorCode {
PERFORM_JSRT_TTD_RECORD_ACTION_NOT_IMPLEMENTED(scriptContext);
return ContextAPINoScriptWrapper_NoRecord([&](Js::ScriptContext *scriptContext) -> JsErrorCode {
VALIDATE_INCOMING_OBJECT(object, scriptContext);
PARAM_NOT_NULL(isConstructor);

Js::RecyclableObject * instance = Js::VarTo<Js::RecyclableObject>(object);
AssertMsg(scriptContext->GetThreadContext()->IsScriptActive(), "Caller is expected to be under ContextAPIWrapper!");

*isConstructor = Js::JavascriptOperators::IsConstructor(instance);
*isConstructor = Js::JavascriptOperators::IsConstructor(object);

return JsNoError;
});

0 comments on commit 11b3456

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.