forked from mirrors/gecko-dev
Bug 1787406 - Part 12: Remove duplicate parameter from NamedLambdaObject::create(). r=jandem
All callers are passing the same value for both parameters. Depends on D155684 Differential Revision: https://phabricator.services.mozilla.com/D155685
This commit is contained in:
parent
8b32b89094
commit
b5b2f20cb7
2 changed files with 3 additions and 5 deletions
|
|
@ -1026,7 +1026,6 @@ BlockLexicalEnvironmentObject* BlockLexicalEnvironmentObject::recreate(
|
|||
/* static */
|
||||
NamedLambdaObject* NamedLambdaObject::create(JSContext* cx,
|
||||
HandleFunction callee,
|
||||
HandleFunction func,
|
||||
HandleObject enclosing,
|
||||
gc::InitialHeap heap) {
|
||||
MOZ_ASSERT(callee->isNamedLambda());
|
||||
|
|
@ -1055,14 +1054,14 @@ NamedLambdaObject* NamedLambdaObject::create(JSContext* cx,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
obj->initFixedSlot(lambdaSlot(), ObjectValue(*func));
|
||||
obj->initFixedSlot(lambdaSlot(), ObjectValue(*callee));
|
||||
return static_cast<NamedLambdaObject*>(obj);
|
||||
}
|
||||
|
||||
/* static */
|
||||
NamedLambdaObject* NamedLambdaObject::createTemplateObject(
|
||||
JSContext* cx, HandleFunction callee, gc::InitialHeap heap) {
|
||||
return create(cx, callee, callee, nullptr, heap);
|
||||
return create(cx, callee, nullptr, heap);
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
|
@ -1070,7 +1069,7 @@ NamedLambdaObject* NamedLambdaObject::create(JSContext* cx,
|
|||
AbstractFramePtr frame) {
|
||||
RootedFunction fun(cx, frame.callee());
|
||||
RootedObject enclosing(cx, frame.environmentChain());
|
||||
return create(cx, fun, fun, enclosing, gc::DefaultHeap);
|
||||
return create(cx, fun, enclosing, gc::DefaultHeap);
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
|
|
|||
|
|
@ -602,7 +602,6 @@ class BlockLexicalEnvironmentObject : public ScopedLexicalEnvironmentObject {
|
|||
|
||||
class NamedLambdaObject : public BlockLexicalEnvironmentObject {
|
||||
static NamedLambdaObject* create(JSContext* cx, HandleFunction callee,
|
||||
HandleFunction replacement,
|
||||
HandleObject enclosing,
|
||||
gc::InitialHeap heap);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue