зеркало из https://github.com/mozilla/gecko-dev.git
Checking in scole@planetweb.com's patch to prefix str_escape with js_ (96084, r=rogerl, sr=brendan).
This commit is contained in:
Родитель
f21a34e285
Коммит
38b3c5bb4b
|
@ -1957,7 +1957,7 @@ file_toURL(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
|||
urlChars = js_InflateString(cx, url, strlen(url));
|
||||
if (urlChars == NULL) return JS_FALSE;
|
||||
*rval = STRING_TO_JSVAL(js_NewString(cx, urlChars, strlen(url), 0));
|
||||
if (!str_escape(cx, obj, 0, rval, rval)) return JS_FALSE;
|
||||
if (!js_str_escape(cx, obj, 0, rval, rval)) return JS_FALSE;
|
||||
|
||||
return JS_TRUE;
|
||||
out:
|
||||
|
|
|
@ -133,7 +133,7 @@ static const uint8 urlCharType[256] =
|
|||
|
||||
/* See ECMA-262 15.1.2.4. */
|
||||
JSBool
|
||||
str_escape(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
js_str_escape(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
{
|
||||
JSString *str;
|
||||
size_t i, ni, newlength;
|
||||
|
@ -293,7 +293,7 @@ const char js_encodeURIComponent_str[] = "encodeURIComponent";
|
|||
static JSFunctionSpec string_functions[] = {
|
||||
#ifndef MOZILLA_CLIENT
|
||||
/* These two are predefined in a backward-compatible way by the DOM. */
|
||||
{js_escape_str, str_escape, 1,0,0},
|
||||
{js_escape_str, js_str_escape, 1,0,0},
|
||||
{js_unescape_str, str_unescape, 1,0,0},
|
||||
#endif
|
||||
#if JS_HAS_UNEVAL
|
||||
|
|
|
@ -320,7 +320,8 @@ extern char *
|
|||
js_GetStringBytes(JSString *str);
|
||||
|
||||
JSBool
|
||||
str_escape(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
|
||||
js_str_escape(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
|
||||
jsval *rval);
|
||||
|
||||
JS_END_EXTERN_C
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче