summaryrefslogtreecommitdiffstats
path: root/js/src/vm/SelfHosting.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-19 15:47:10 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-19 15:47:10 +0100
commit5ef44cf6484b9dfd49c0174ac2969a29587a1bbd (patch)
treeef1e8a83106f6b54504dbe3b29554ef7b349a1bb /js/src/vm/SelfHosting.cpp
parent6822460d3b0d4609ee5d4e1ab4b093799ed06580 (diff)
downloadUXP-5ef44cf6484b9dfd49c0174ac2969a29587a1bbd.tar
UXP-5ef44cf6484b9dfd49c0174ac2969a29587a1bbd.tar.gz
UXP-5ef44cf6484b9dfd49c0174ac2969a29587a1bbd.tar.lz
UXP-5ef44cf6484b9dfd49c0174ac2969a29587a1bbd.tar.xz
UXP-5ef44cf6484b9dfd49c0174ac2969a29587a1bbd.zip
Part 1: Implement ES6 function name property semantics
Issue #78
Diffstat (limited to 'js/src/vm/SelfHosting.cpp')
-rw-r--r--js/src/vm/SelfHosting.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
index fd604c6bf..bf49f2268 100644
--- a/js/src/vm/SelfHosting.cpp
+++ b/js/src/vm/SelfHosting.cpp
@@ -2878,7 +2878,7 @@ CloneObject(JSContext* cx, HandleNativeObject selfHostedObject)
RootedObject clone(cx);
if (selfHostedObject->is<JSFunction>()) {
RootedFunction selfHostedFunction(cx, &selfHostedObject->as<JSFunction>());
- bool hasName = selfHostedFunction->name() != nullptr;
+ bool hasName = selfHostedFunction->explicitName() != nullptr;
// Arrow functions use the first extended slot for their lexical |this| value.
MOZ_ASSERT(!selfHostedFunction->isArrow());
@@ -2894,7 +2894,7 @@ CloneObject(JSContext* cx, HandleNativeObject selfHostedObject)
// self-hosting compartment has to be stored on the clone.
if (clone && hasName) {
clone->as<JSFunction>().setExtendedSlot(LAZY_FUNCTION_NAME_SLOT,
- StringValue(selfHostedFunction->name()));
+ StringValue(selfHostedFunction->explicitName()));
}
} else if (selfHostedObject->is<RegExpObject>()) {
RegExpObject& reobj = selfHostedObject->as<RegExpObject>();
@@ -2977,10 +2977,10 @@ JSRuntime::createLazySelfHostedFunctionClone(JSContext* cx, HandlePropertyName s
return false;
if (!selfHostedFun->isClassConstructor() && !selfHostedFun->hasGuessedAtom() &&
- selfHostedFun->name() != selfHostedName)
+ selfHostedFun->explicitName() != selfHostedName)
{
MOZ_ASSERT(selfHostedFun->getExtendedSlot(HAS_SELFHOSTED_CANONICAL_NAME_SLOT).toBoolean());
- funName = selfHostedFun->name();
+ funName = selfHostedFun->explicitName();
}
fun.set(NewScriptedFunction(cx, nargs, JSFunction::INTERPRETED_LAZY,