зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1693775 - Change remaining uses to pass GCCellPtr by value r=sfink
Depends on D131142 Differential Revision: https://phabricator.services.mozilla.com/D131143
This commit is contained in:
Родитель
d89836b479
Коммит
1ab5c358ce
|
@ -477,11 +477,11 @@ void ApplyGCThingTyped(GCCellPtr thing, F&& f) {
|
|||
// These are defined in the toplevel namespace instead of within JS so that
|
||||
// they won't shadow other operator== overloads (see bug 1456512.)
|
||||
|
||||
inline bool operator==(const JS::GCCellPtr& ptr1, const JS::GCCellPtr& ptr2) {
|
||||
inline bool operator==(JS::GCCellPtr ptr1, JS::GCCellPtr ptr2) {
|
||||
return ptr1.asCell() == ptr2.asCell();
|
||||
}
|
||||
|
||||
inline bool operator!=(const JS::GCCellPtr& ptr1, const JS::GCCellPtr& ptr2) {
|
||||
inline bool operator!=(JS::GCCellPtr ptr1, JS::GCCellPtr ptr2) {
|
||||
return !(ptr1 == ptr2);
|
||||
}
|
||||
|
||||
|
|
|
@ -741,7 +741,7 @@ class Node {
|
|||
// JS::ubi::Node are both essentially tagged references to other sorts of
|
||||
// objects, so letting conversions happen automatically is appropriate.
|
||||
MOZ_IMPLICIT Node(JS::HandleValue value);
|
||||
explicit Node(const JS::GCCellPtr& thing);
|
||||
explicit Node(JS::GCCellPtr thing);
|
||||
|
||||
// copy construction and copy assignment just use memcpy, since we know
|
||||
// instances contain nothing but a vtable pointer and a data pointer.
|
||||
|
|
|
@ -5206,7 +5206,7 @@ class MOZ_STACK_CLASS Debugger::ScriptQuery : public Debugger::QueryBase {
|
|||
// Now add inner scripts to `partialMatchVector` work list to determine if
|
||||
// they are matches. Note that out IterateScripts callback ignored them
|
||||
// already since they did not have a compiled parent at the time.
|
||||
for (const JS::GCCellPtr& thing : script->gcthings()) {
|
||||
for (JS::GCCellPtr thing : script->gcthings()) {
|
||||
if (!thing.is<JSObject>() || !thing.as<JSObject>().is<JSFunction>()) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -3626,7 +3626,7 @@ static bool InitHoistedFunctionDeclarations(JSContext* cx, HandleScript script,
|
|||
// The inner-functions up to `lastFun` are the hoisted function declarations
|
||||
// of the script. We must clone and bind them now.
|
||||
for (size_t i = 0; i <= lastFun; ++i) {
|
||||
const JS::GCCellPtr& thing = script->gcthings()[i];
|
||||
JS::GCCellPtr thing = script->gcthings()[i];
|
||||
|
||||
// Skip the initial scopes. In practice, there is at most one variables and
|
||||
// one lexical scope.
|
||||
|
|
|
@ -151,7 +151,7 @@ Node::Size Concrete<void>::size(mozilla::MallocSizeOf mallocSizeof) const {
|
|||
MOZ_CRASH("null ubi::Node");
|
||||
}
|
||||
|
||||
Node::Node(const JS::GCCellPtr& thing) {
|
||||
Node::Node(JS::GCCellPtr thing) {
|
||||
ApplyGCThingTyped(thing, [this](auto t) { this->construct(t); });
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче