Skip to content

Commit d47dbd3

Browse files
committed
Functions registered to __chakraLibrary should not be visible in stack traces
1 parent be2b997 commit d47dbd3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Runtime/Library/JsBuiltInEngineInterfaceExtensionObject.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,7 @@ namespace Js
318318
JavascriptString* methodName = JavascriptString::FromVar(args.Values[1]);
319319
JavascriptFunction* func = JavascriptFunction::FromVar(args.Values[2]);
320320

321-
// Set the function's display name, as the function we pass in argument are anonym.
322-
func->GetFunctionProxy()->SetIsPublicLibraryCode();
323-
func->GetFunctionProxy()->EnsureDeserialized()->SetDisplayName(methodName->GetString(), methodName->GetLength(), 0);
321+
func->GetFunctionProxy()->EnsureDeserialized();
324322

325323
DynamicObject* chakraLibraryObject = GetPrototypeFromName(PropertyIds::__chakraLibrary, false, scriptContext);
326324
PropertyIds functionIdentifier = JavascriptOperators::GetPropertyId(methodName, scriptContext);

0 commit comments

Comments
 (0)