Bug 657260 - Move CheckStringLength to JSString. r=Waldo

This commit is contained in:
Bobby Holley
2011-10-07 19:34:28 -04:00
parent a555278421
commit 90bea65035
6 changed files with 36 additions and 35 deletions

View File

@@ -555,7 +555,7 @@ js_Atomize(JSContext *cx, const char *bytes, size_t length, InternBehavior ib, F
{
CHECK_REQUEST(cx);
if (!CheckStringLength(cx, length))
if (!JSString::validateLength(cx, length))
return NULL;
/*
@@ -597,7 +597,7 @@ js_AtomizeChars(JSContext *cx, const jschar *chars, size_t length, InternBehavio
{
CHECK_REQUEST(cx);
if (!CheckStringLength(cx, length))
if (!JSString::validateLength(cx, length))
return NULL;
return AtomizeInline(cx, &chars, length, ib);