Backed out changeset c30eae661333 (bug 1352449) for failing non-unified spidermonkey build. r=backout

This commit is contained in:
Sebastian Hengst 2017-04-11 20:10:40 +02:00
parent f8cc0820ce
commit 4760939ddc

View File

@ -209,13 +209,8 @@ ErrorObject::classes[JSEXN_ERROR_LIMIT] = {
size_t
ExtraMallocSize(JSErrorReport* report)
{
if (report->linebuf()) {
/*
* Count with null terminator and alignment.
* See CopyExtraData for the details about alignment.
*/
return (report->linebufLength() + 1) * sizeof(char16_t) + 1;
}
if (report->linebuf())
return (report->linebufLength() + 1) * sizeof(char16_t);
return 0;
}
@ -230,13 +225,6 @@ bool
CopyExtraData(JSContext* cx, uint8_t** cursor, JSErrorReport* copy, JSErrorReport* report)
{
if (report->linebuf()) {
/*
* Make sure cursor is properly aligned for char16_t for platforms
* which need it.
*/
if (size_t(*cursor) % 2)
(*cursor)++;
size_t linebufSize = (report->linebufLength() + 1) * sizeof(char16_t);
const char16_t* linebufCopy = (const char16_t*)(*cursor);
js_memcpy(*cursor, report->linebuf(), linebufSize);