Bug 1543458 - Compile UTF-8 files in jsapi-tests without inflating to UTF-16. r=arai

Differential Revision: https://phabricator.services.mozilla.com/D26957

--HG--
extra : rebase_source : c87123cf49f42ae02fd3418648ad3c3232b63ff0
This commit is contained in:
Jeff Walden 2019-04-10 10:19:00 -07:00
Родитель 43acc4e9ce
Коммит 4f4b68dc9c
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -7,7 +7,7 @@
#include "mozilla/Utf8.h" // mozilla::Utf8Unit
#include "js/CompilationAndEvaluation.h" // JS::Compile{,DontInflate,Utf8{Path,File}}
#include "js/CompilationAndEvaluation.h" // JS::Compile{,DontInflate,Utf8{FileDontInflate,Path}}
#include "js/SourceText.h" // JS::Source{Ownership,Text}
#include "jsapi-tests/tests.h"
@ -171,7 +171,8 @@ BEGIN_FIXTURE_TEST(ScriptObjectFixture, bug438633_JS_CompileFileHandle) {
JS::CompileOptions options(cx);
options.setFileAndLine("temporary file", 1);
JS::RootedScript script(cx, JS::CompileUtf8File(cx, options, script_stream));
JS::RootedScript script(
cx, JS::CompileUtf8FileDontInflate(cx, options, script_stream));
CHECK(script);
return tryScript(script);
@ -186,7 +187,8 @@ BEGIN_FIXTURE_TEST(ScriptObjectFixture, bug438633_JS_CompileFileHandle_empty) {
JS::CompileOptions options(cx);
options.setFileAndLine("empty temporary file", 1);
JS::RootedScript script(cx, JS::CompileUtf8File(cx, options, script_stream));
JS::RootedScript script(
cx, JS::CompileUtf8FileDontInflate(cx, options, script_stream));
CHECK(script);
return tryScript(script);
@ -204,7 +206,8 @@ BEGIN_FIXTURE_TEST(ScriptObjectFixture,
JS::CompileOptions options(cx);
options.setFileAndLine("temporary file", 1);
JS::RootedScript script(cx, JS::CompileUtf8File(cx, options, script_stream));
JS::RootedScript script(
cx, JS::CompileUtf8FileDontInflate(cx, options, script_stream));
CHECK(script);
return tryScript(script);