Bug 1289050 - Part 3: Use UTF8 variant of JS_ReportError after re-encoding string. r=jwalden
This commit is contained in:
@@ -150,7 +150,10 @@ Load(JSContext *cx,
|
||||
return false;
|
||||
FILE *file = fopen(filename.ptr(), "r");
|
||||
if (!file) {
|
||||
JS_ReportError(cx, "cannot open file '%s' for reading", filename.ptr());
|
||||
filename.clear();
|
||||
if (!filename.encodeUtf8(cx, str))
|
||||
return false;
|
||||
JS_ReportErrorUTF8(cx, "cannot open file '%s' for reading", filename.ptr());
|
||||
return false;
|
||||
}
|
||||
JS::CompileOptions options(cx);
|
||||
|
||||
Reference in New Issue
Block a user