Loading js/src/jsarray.cpp +4 −9 Original line number Diff line number Diff line Loading @@ -998,7 +998,7 @@ ArrayJoinKernel(JSContext *cx, SeparatorOp sepOp, HandleObject obj, uint32_t len if (!NumberValueToStringBuffer(cx, elem, sb)) return false; } else if (elem.isBoolean()) { if (!BooleanToStringBuffer(cx, elem.toBoolean(), sb)) if (!BooleanToStringBuffer(elem.toBoolean(), sb)) return false; } else if (elem.isObject()) { /* Loading Loading @@ -1431,7 +1431,7 @@ NumDigitsBase10(uint32_t n) } static inline bool CompareLexicographicInt32(JSContext *cx, const Value &a, const Value &b, bool *lessOrEqualp) CompareLexicographicInt32(const Value &a, const Value &b, bool *lessOrEqualp) { int32_t aint = a.toInt32(); int32_t bint = b.toInt32(); Loading Loading @@ -1504,13 +1504,8 @@ struct SortComparatorStrings struct SortComparatorLexicographicInt32 { JSContext *const cx; SortComparatorLexicographicInt32(JSContext *cx) : cx(cx) {} bool operator()(const Value &a, const Value &b, bool *lessOrEqualp) { return CompareLexicographicInt32(cx, a, b, lessOrEqualp); return CompareLexicographicInt32(a, b, lessOrEqualp); } }; Loading Loading @@ -1940,7 +1935,7 @@ js::array_sort(JSContext *cx, unsigned argc, Value *vp) } else if (allInts) { JS_ALWAYS_TRUE(vec.resize(n * 2)); if (!MergeSort(vec.begin(), n, vec.begin() + n, SortComparatorLexicographicInt32(cx))) { SortComparatorLexicographicInt32())) { return false; } } else { Loading js/src/jsbool.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ bool_toSource_impl(JSContext *cx, CallArgs args) bool b = thisv.isBoolean() ? thisv.toBoolean() : thisv.toObject().as<BooleanObject>().unbox(); StringBuffer sb(cx); if (!sb.append("(new Boolean(") || !BooleanToStringBuffer(cx, b, sb) || !sb.append("))")) if (!sb.append("(new Boolean(") || !BooleanToStringBuffer(b, sb) || !sb.append("))")) return false; JSString *str = sb.finishString(); Loading Loading @@ -196,7 +196,7 @@ js::ToBooleanSlow(HandleValue v) * The only caller of the fast path, JSON's PreprocessValue, ensures that. */ bool js::BooleanGetPrimitiveValueSlow(HandleObject wrappedBool, JSContext *cx) js::BooleanGetPrimitiveValueSlow(HandleObject wrappedBool) { JSObject *obj = wrappedBool->as<ProxyObject>().target(); JS_ASSERT(obj); Loading js/src/jsbool.h +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ js_BooleanToString(js::ExclusiveContext *cx, bool b); namespace js { inline bool BooleanGetPrimitiveValue(HandleObject obj, JSContext *cx); BooleanGetPrimitiveValue(HandleObject obj); } /* namespace js */ Loading js/src/jsboolinlines.h +3 −3 Original line number Diff line number Diff line Loading @@ -15,15 +15,15 @@ namespace js { bool BooleanGetPrimitiveValueSlow(HandleObject, JSContext *); BooleanGetPrimitiveValueSlow(HandleObject); inline bool BooleanGetPrimitiveValue(HandleObject obj, JSContext *cx) BooleanGetPrimitiveValue(HandleObject obj) { if (obj->is<BooleanObject>()) return obj->as<BooleanObject>().unbox(); return BooleanGetPrimitiveValueSlow(obj, cx); return BooleanGetPrimitiveValueSlow(obj); } inline bool Loading js/src/json.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ PreprocessValue(JSContext *cx, HandleObject holder, KeyType key, MutableHandleVa return false; vp.set(StringValue(str)); } else if (ObjectClassIs(obj, ESClass_Boolean, cx)) { vp.setBoolean(BooleanGetPrimitiveValue(obj, cx)); vp.setBoolean(BooleanGetPrimitiveValue(obj)); } } Loading Loading
js/src/jsarray.cpp +4 −9 Original line number Diff line number Diff line Loading @@ -998,7 +998,7 @@ ArrayJoinKernel(JSContext *cx, SeparatorOp sepOp, HandleObject obj, uint32_t len if (!NumberValueToStringBuffer(cx, elem, sb)) return false; } else if (elem.isBoolean()) { if (!BooleanToStringBuffer(cx, elem.toBoolean(), sb)) if (!BooleanToStringBuffer(elem.toBoolean(), sb)) return false; } else if (elem.isObject()) { /* Loading Loading @@ -1431,7 +1431,7 @@ NumDigitsBase10(uint32_t n) } static inline bool CompareLexicographicInt32(JSContext *cx, const Value &a, const Value &b, bool *lessOrEqualp) CompareLexicographicInt32(const Value &a, const Value &b, bool *lessOrEqualp) { int32_t aint = a.toInt32(); int32_t bint = b.toInt32(); Loading Loading @@ -1504,13 +1504,8 @@ struct SortComparatorStrings struct SortComparatorLexicographicInt32 { JSContext *const cx; SortComparatorLexicographicInt32(JSContext *cx) : cx(cx) {} bool operator()(const Value &a, const Value &b, bool *lessOrEqualp) { return CompareLexicographicInt32(cx, a, b, lessOrEqualp); return CompareLexicographicInt32(a, b, lessOrEqualp); } }; Loading Loading @@ -1940,7 +1935,7 @@ js::array_sort(JSContext *cx, unsigned argc, Value *vp) } else if (allInts) { JS_ALWAYS_TRUE(vec.resize(n * 2)); if (!MergeSort(vec.begin(), n, vec.begin() + n, SortComparatorLexicographicInt32(cx))) { SortComparatorLexicographicInt32())) { return false; } } else { Loading
js/src/jsbool.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ bool_toSource_impl(JSContext *cx, CallArgs args) bool b = thisv.isBoolean() ? thisv.toBoolean() : thisv.toObject().as<BooleanObject>().unbox(); StringBuffer sb(cx); if (!sb.append("(new Boolean(") || !BooleanToStringBuffer(cx, b, sb) || !sb.append("))")) if (!sb.append("(new Boolean(") || !BooleanToStringBuffer(b, sb) || !sb.append("))")) return false; JSString *str = sb.finishString(); Loading Loading @@ -196,7 +196,7 @@ js::ToBooleanSlow(HandleValue v) * The only caller of the fast path, JSON's PreprocessValue, ensures that. */ bool js::BooleanGetPrimitiveValueSlow(HandleObject wrappedBool, JSContext *cx) js::BooleanGetPrimitiveValueSlow(HandleObject wrappedBool) { JSObject *obj = wrappedBool->as<ProxyObject>().target(); JS_ASSERT(obj); Loading
js/src/jsbool.h +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ js_BooleanToString(js::ExclusiveContext *cx, bool b); namespace js { inline bool BooleanGetPrimitiveValue(HandleObject obj, JSContext *cx); BooleanGetPrimitiveValue(HandleObject obj); } /* namespace js */ Loading
js/src/jsboolinlines.h +3 −3 Original line number Diff line number Diff line Loading @@ -15,15 +15,15 @@ namespace js { bool BooleanGetPrimitiveValueSlow(HandleObject, JSContext *); BooleanGetPrimitiveValueSlow(HandleObject); inline bool BooleanGetPrimitiveValue(HandleObject obj, JSContext *cx) BooleanGetPrimitiveValue(HandleObject obj) { if (obj->is<BooleanObject>()) return obj->as<BooleanObject>().unbox(); return BooleanGetPrimitiveValueSlow(obj, cx); return BooleanGetPrimitiveValueSlow(obj); } inline bool Loading
js/src/json.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ PreprocessValue(JSContext *cx, HandleObject holder, KeyType key, MutableHandleVa return false; vp.set(StringValue(str)); } else if (ObjectClassIs(obj, ESClass_Boolean, cx)) { vp.setBoolean(BooleanGetPrimitiveValue(obj, cx)); vp.setBoolean(BooleanGetPrimitiveValue(obj)); } } Loading