diff --git a/js/src/jsobj.h b/js/src/jsobj.h index 2282f0230b0c..a4a0dce72f8f 100644 --- a/js/src/jsobj.h +++ b/js/src/jsobj.h @@ -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(amap); + map = amap; objShape = map->shape; } void setSharedNonNativeMap() { - setMap(&JSObjectMap::sharedNonNative); + setMap(const_cast(&JSObjectMap::sharedNonNative)); } void deletingShapeChange(JSContext *cx, const js::Shape &shape); diff --git a/js/src/jsscript.h b/js/src/jsscript.h index 010bb64b322d..1f9db651b5d9 100644 --- a/js/src/jsscript.h +++ b/js/src/jsscript.h @@ -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 { /* diff --git a/js/src/jsscriptinlines.h b/js/src/jsscriptinlines.h index 5c8c02e449c3..1d48a75ead2d 100644 --- a/js/src/jsscriptinlines.h +++ b/js/src/jsscriptinlines.h @@ -85,7 +85,7 @@ Bindings::clone(JSContext *cx, Bindings *bindings) *this = *bindings; } -const Shape * +Shape * Bindings::lastShape() const { JS_ASSERT(lastBinding);