--- jsfile.c 2006/07/24 18:38:27 1.3
+++ jsfile.c 2006/07/24 18:54:41 1.4
@@ -2277,9 +2277,18 @@
sprintf(url, "file://%s", file->path);
/* TODO: js_escape in jsstr.h may go away at some point */
+#ifdef OSSP
+{
+ size_t len = strlen(url);
+ urlChars = js_InflateString(cx, url, &len);
+ if (urlChars == NULL) return JS_FALSE;
+ *rval = STRING_TO_JSVAL(js_NewString(cx, urlChars, len, 0));
+}
+#else
urlChars = js_InflateString(cx, url, strlen(url));
if (urlChars == NULL) return JS_FALSE;
*rval = STRING_TO_JSVAL(js_NewString(cx, urlChars, strlen(url), 0));
+#endif
if (!js_str_escape(cx, obj, 0, rval, rval)) return JS_FALSE;
return JS_TRUE;
|