Bug 717762: Proliferate js_memcpy and PodCopy, take 2. (r=luke)

This commit is contained in:
Chris Leary
2012-01-17 14:32:36 -08:00
parent a9026ea5c8
commit bf0951e061
30 changed files with 109 additions and 89 deletions

View File

@@ -736,7 +736,7 @@ num_toLocaleString(JSContext *cx, uintN argc, Value *vp)
strcpy(tmpDest, rt->thousandsSeparator);
tmpDest += thousandsLength;
JS_ASSERT(tmpDest - buf + *tmpGroup <= buflen);
memcpy(tmpDest, tmpSrc, *tmpGroup);
js_memcpy(tmpDest, tmpSrc, *tmpGroup);
tmpDest += *tmpGroup;
tmpSrc += *tmpGroup;
if (--nrepeat < 0)
@@ -978,15 +978,15 @@ InitRuntimeNumberState(JSRuntime *rt)
if (!storage)
return false;
memcpy(storage, thousandsSeparator, thousandsSeparatorSize);
js_memcpy(storage, thousandsSeparator, thousandsSeparatorSize);
rt->thousandsSeparator = storage;
storage += thousandsSeparatorSize;
memcpy(storage, decimalPoint, decimalPointSize);
js_memcpy(storage, decimalPoint, decimalPointSize);
rt->decimalSeparator = storage;
storage += decimalPointSize;
memcpy(storage, grouping, groupingSize);
js_memcpy(storage, grouping, groupingSize);
rt->numGrouping = grouping;
return true;
}