Part 1: Implement ES6 function name property semantics

Issue #78
This commit is contained in:
janekptacijarabaci 2018-03-19 15:47:10 +01:00 committed by Roy Tam
commit 748c69d7fd
30 changed files with 750 additions and 81 deletions

View file

@ -802,10 +802,10 @@ GlobalObject::getSelfHostedFunction(JSContext* cx, Handle<GlobalObject*> global,
return false;
if (exists) {
RootedFunction fun(cx, &funVal.toObject().as<JSFunction>());
if (fun->name() == name)
if (fun->explicitName() == name)
return true;
if (fun->name() == selfHostedName) {
if (fun->explicitName() == selfHostedName) {
// This function was initially cloned because it was called by
// other self-hosted code, so the clone kept its self-hosted name,
// instead of getting the name it's intended to have in content