mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Check in balleysson@bigfoot.com's patch to avoid a redundant js_strlen (87271, r=shaver, sr=brendan).
This commit is contained in:
parent
6abf5d1dd4
commit
d109dc3d71
@ -2308,7 +2308,7 @@ js_NewStringCopyZ(JSContext *cx, const jschar *s, uintN gcflag)
|
||||
if (!news)
|
||||
return NULL;
|
||||
memcpy(news, s, m);
|
||||
str = js_NewString(cx, news, js_strlen(news), gcflag);
|
||||
str = js_NewString(cx, news, n, gcflag);
|
||||
if (!str)
|
||||
JS_free(cx, news);
|
||||
return str;
|
||||
|
Loading…
Reference in New Issue
Block a user