Bug 931882 - Guard against passing a null js-cache in NestedShell. r=luke

This commit is contained in:
Douglas Crosher 2013-11-20 18:03:19 +11:00
parent 13ff3d660e
commit 579be13a77

View File

@ -3604,7 +3604,7 @@ NestedShell(JSContext *cx, unsigned argc, jsval *vp)
// As a special case, if the caller passes "--js-cache", replace that
// with "--js-cache=$(jsCacheDir)"
if (!strcmp(argv.back(), "--js-cache")) {
if (!strcmp(argv.back(), "--js-cache") && jsCacheDir) {
char *newArg = JS_smprintf("--js-cache=%s", jsCacheDir);
if (!newArg)
return false;