mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
c337c5963d
@@ -1093,20 +1097,28 @@ MToDouble::writeRecoverData(CompactBuffe } RToDouble::RToDouble(CompactBufferReader& reader) { } bool RToDouble::recover(JSContext* cx, SnapshotIterator& iter) const { - Value v = iter.read(); + RootedValue v(cx, iter.read()); + RootedValue result(cx); MOZ_ASSERT(!v.isObject()); - iter.storeInstructionResult(v); + MOZ_ASSERT(!v.isSymbol()); + + double dbl; + if (!ToNumber(cx, v, &dbl)) + return false; + + result.setDouble(dbl); + iter.storeInstructionResult(result); return true; } bool MToFloat32::writeRecoverData(CompactBufferWriter& writer) const { MOZ_ASSERT(canRecoverOnBailout()); writer.writeUnsigned(uint32_t(RInstruction::Recover_ToFloat32)); |
||
---|---|---|
.. | ||
ductwork/debugger | ||
examples | ||
ipc | ||
public | ||
src | ||
xpconnect |