diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-09 00:58:44 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:29 -0400 |
commit | fe760880b72f08b75a9adacdcad51d71eac5dfa9 (patch) | |
tree | a0bc22d21422cd784fe414d451cc47237aed8ae9 /js/src/vm/NativeObject.h | |
parent | 72f723f391e5bfb18649d3c26e781c2b0e28e328 (diff) | |
download | UXP-fe760880b72f08b75a9adacdcad51d71eac5dfa9.tar UXP-fe760880b72f08b75a9adacdcad51d71eac5dfa9.tar.gz UXP-fe760880b72f08b75a9adacdcad51d71eac5dfa9.tar.lz UXP-fe760880b72f08b75a9adacdcad51d71eac5dfa9.tar.xz UXP-fe760880b72f08b75a9adacdcad51d71eac5dfa9.zip |
1320408 - Part 24: Change NativeObject::{fillInAfterSwap,replaceWithNewEquivalentShape,generateOwnShape,shadowingShapeChange} to static method.
Diffstat (limited to 'js/src/vm/NativeObject.h')
-rw-r--r-- | js/src/vm/NativeObject.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/js/src/vm/NativeObject.h b/js/src/vm/NativeObject.h index 9b8fe4721..656542100 100644 --- a/js/src/vm/NativeObject.h +++ b/js/src/vm/NativeObject.h @@ -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 |