From 3ec0f179de3b8208ba88376e3b7ee3f3cd9e7cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Mon, 5 Jun 2017 13:10:45 +0200 Subject: [PATCH] Bug 1364979 - Don't use Latin-1 when encoding the export name for missing exports. r=jonco --- js/src/frontend/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 019e002d8bcd..e1821492d288 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -2265,7 +2265,7 @@ Parser::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,