Bug 1364979 - Don't use Latin-1 when encoding the export name for missing exports. r=jonco

This commit is contained in:
André Bargull 2017-06-05 13:10:45 +02:00
parent 65cd55b48b
commit 3ec0f179de

View File

@ -2265,7 +2265,7 @@ Parser<FullParseHandler, char16_t>::moduleBody(ModuleSharedContext* modulesc)
DeclaredNamePtr p = modulepc.varScope().lookupDeclaredName(name);
if (!p) {
JSAutoByteString str;
if (!str.encodeLatin1(context, name))
if (!AtomToPrintableString(context, name, &str))
return null();
JS_ReportErrorNumberLatin1(context, GetErrorMessage, nullptr,