Bug 1149495 - SavedFrame objects should handle all uint32 values. r=shu

--HG--
extra : rebase_source : 3a6982dab6b8c61b590fe3aac61f216c7c4a615c
This commit is contained in:
Nick Fitzgerald 2015-04-04 14:55:00 +02:00
Родитель d2ded7d55b
Коммит 30234ac43b
2 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -0,0 +1,6 @@
try {
offThreadCompileScript('Error()', { lineNumber: (4294967295)});
runOffThreadScript().stack;
} catch (e) {
// Ignore "Error: Can't use offThreadCompileScript with --no-threads"
}

Просмотреть файл

@ -251,14 +251,14 @@ uint32_t
SavedFrame::getLine()
{
const Value& v = getReservedSlot(JSSLOT_LINE);
return v.toInt32();
return v.toPrivateUint32();
}
uint32_t
SavedFrame::getColumn()
{
const Value& v = getReservedSlot(JSSLOT_COLUMN);
return v.toInt32();
return v.toPrivateUint32();
}
JSAtom*
@ -304,8 +304,8 @@ SavedFrame::initFromLookup(SavedFrame::HandleLookup lookup)
MOZ_ASSERT(getReservedSlot(JSSLOT_SOURCE).isUndefined());
setReservedSlot(JSSLOT_SOURCE, StringValue(lookup->source));
setReservedSlot(JSSLOT_LINE, NumberValue(lookup->line));
setReservedSlot(JSSLOT_COLUMN, NumberValue(lookup->column));
setReservedSlot(JSSLOT_LINE, PrivateUint32Value(lookup->line));
setReservedSlot(JSSLOT_COLUMN, PrivateUint32Value(lookup->column));
setReservedSlot(JSSLOT_FUNCTIONDISPLAYNAME,
lookup->functionDisplayName
? StringValue(lookup->functionDisplayName)