mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
1320408 - Part 24: Change NativeObject::{fillInAfterSwap,replaceWithNewEquivalentShape,generateOwnShape,shadowingShapeChange} to static method.
This commit is contained in:
parent
8a42a64748
commit
83fb6841af
4 changed files with 61 additions and 55 deletions
|
|
@ -491,8 +491,8 @@ class NativeObject : public ShapedObject
|
|||
void checkShapeConsistency() { }
|
||||
#endif
|
||||
|
||||
Shape*
|
||||
replaceWithNewEquivalentShape(ExclusiveContext* cx,
|
||||
static Shape*
|
||||
replaceWithNewEquivalentShape(ExclusiveContext* cx, HandleNativeObject obj,
|
||||
Shape* existingShape, Shape* newShape = nullptr,
|
||||
bool accessorShape = false);
|
||||
|
||||
|
|
@ -609,11 +609,14 @@ class NativeObject : public ShapedObject
|
|||
}
|
||||
|
||||
public:
|
||||
bool generateOwnShape(ExclusiveContext* cx, Shape* newShape = nullptr) {
|
||||
return replaceWithNewEquivalentShape(cx, lastProperty(), newShape);
|
||||
static MOZ_MUST_USE bool generateOwnShape(ExclusiveContext* cx, HandleNativeObject obj,
|
||||
Shape* newShape = nullptr)
|
||||
{
|
||||
return replaceWithNewEquivalentShape(cx, obj, obj->lastProperty(), newShape);
|
||||
}
|
||||
|
||||
bool shadowingShapeChange(ExclusiveContext* cx, const Shape& shape);
|
||||
static MOZ_MUST_USE bool shadowingShapeChange(ExclusiveContext* cx, HandleNativeObject obj,
|
||||
const Shape& shape);
|
||||
static bool clearFlag(ExclusiveContext* cx, HandleNativeObject obj, BaseShape::Flag flag);
|
||||
|
||||
// The maximum number of slots in an object.
|
||||
|
|
@ -783,7 +786,8 @@ class NativeObject : public ShapedObject
|
|||
unsigned flags, ShapeTable::Entry* entry, bool allowDictionary,
|
||||
const AutoKeepShapeTables& keep);
|
||||
|
||||
bool fillInAfterSwap(JSContext* cx, const Vector<Value>& values, void* priv);
|
||||
static MOZ_MUST_USE bool fillInAfterSwap(JSContext* cx, HandleNativeObject obj,
|
||||
const Vector<Value>& values, void* priv);
|
||||
|
||||
public:
|
||||
// Return true if this object has been converted from shared-immutable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue