mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
Bug 554955: Make JSObject::setMap not pretend to take a const shape. r=jorendorff
This commit is contained in:
parent
427569d433
commit
615c9163b1
@ -505,14 +505,14 @@ struct JSObject : js::gc::Cell {
|
||||
|
||||
bool hasOwnShape() const { return !!(flags & OWN_SHAPE); }
|
||||
|
||||
void setMap(const JSObjectMap *amap) {
|
||||
void setMap(JSObjectMap *amap) {
|
||||
JS_ASSERT(!hasOwnShape());
|
||||
map = const_cast<JSObjectMap *>(amap);
|
||||
map = amap;
|
||||
objShape = map->shape;
|
||||
}
|
||||
|
||||
void setSharedNonNativeMap() {
|
||||
setMap(&JSObjectMap::sharedNonNative);
|
||||
setMap(const_cast<JSObjectMap *>(&JSObjectMap::sharedNonNative));
|
||||
}
|
||||
|
||||
void deletingShapeChange(JSContext *cx, const js::Shape &shape);
|
||||
|
@ -203,7 +203,7 @@ class Bindings {
|
||||
bool hasLocalNames() const { return countLocalNames() > 0; }
|
||||
|
||||
/* Returns the shape lineage generated for these bindings. */
|
||||
inline const js::Shape *lastShape() const;
|
||||
inline js::Shape *lastShape() const;
|
||||
|
||||
enum {
|
||||
/*
|
||||
|
@ -85,7 +85,7 @@ Bindings::clone(JSContext *cx, Bindings *bindings)
|
||||
*this = *bindings;
|
||||
}
|
||||
|
||||
const Shape *
|
||||
Shape *
|
||||
Bindings::lastShape() const
|
||||
{
|
||||
JS_ASSERT(lastBinding);
|
||||
|
Loading…
Reference in New Issue
Block a user