Skip to content

Commit

Permalink
Remove special handling of function.length in RecyclableObjectWalker
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhorton committed Aug 18, 2018
1 parent 673a44b commit cbada71
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/Runtime/Debug/DiagObjectModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2547,7 +2547,6 @@ namespace Js
// We need to special-case RegExp constructor here because it has some special properties (above) and some
// special enumerable properties which should all show up in the debugger.
JavascriptRegExpConstructor* regExp = scriptContext->GetLibrary()->GetRegExpConstructor();
Js::JavascriptFunction* jsFunction = Js::JavascriptFunction::FromVar(object);

if (regExp == object)
{
Expand All @@ -2563,11 +2562,6 @@ namespace Js
InsertItem(originalObject, object, propertyId, isConst, isUnscoped, &pMethodsGroupWalker);
}
}
else if ((jsFunction->IsScriptFunction() && !jsFunction->GetFunctionProxy()->IsJsBuiltInCode()) || jsFunction->IsBoundFunction())
{
// Adding special property length for the ScriptFunction, like it is done in JavascriptFunction::GetSpecialNonEnumerablePropertyName
InsertItem(originalObject, object, PropertyIds::length, true/*not editable*/, false /*isUnscoped*/, &pMethodsGroupWalker);
}
}
}

Expand Down Expand Up @@ -4216,4 +4210,4 @@ namespace Js
}
#endif
}
#endif
#endif

0 comments on commit cbada71

Please sign in to comment.