Jelajahi Sumber

Functions registered to __chakraLibrary should not be visible in stack traces

Jack Horton (CHAKRA) 7 tahun lalu
induk
melakukan
d47dbd3202

+ 1 - 3
lib/Runtime/Library/JsBuiltInEngineInterfaceExtensionObject.cpp

@@ -318,9 +318,7 @@ namespace Js
         JavascriptString* methodName = JavascriptString::FromVar(args.Values[1]);
         JavascriptFunction* func = JavascriptFunction::FromVar(args.Values[2]);
 
-        // Set the function's display name, as the function we pass in argument are anonym.
-        func->GetFunctionProxy()->SetIsPublicLibraryCode();
-        func->GetFunctionProxy()->EnsureDeserialized()->SetDisplayName(methodName->GetString(), methodName->GetLength(), 0);
+        func->GetFunctionProxy()->EnsureDeserialized();
 
         DynamicObject* chakraLibraryObject = GetPrototypeFromName(PropertyIds::__chakraLibrary, false, scriptContext);
         PropertyIds functionIdentifier = JavascriptOperators::GetPropertyId(methodName, scriptContext);