Bug 1642708 - Remove code guarded by JS_BUILD_BINAST r=arai

Also remove js/src/frontend/BinAST* sources.

Differential Revision: https://phabricator.services.mozilla.com/D77945
This commit is contained in:
Ted Campbell
2020-06-12 14:25:50 +00:00
parent 5c75174bea
commit f4f0f407a8
51 changed files with 5 additions and 22573 deletions

View File

@@ -190,15 +190,7 @@ void ScriptLoadRequest::SetTextSource() {
}
}
void ScriptLoadRequest::SetBinASTSource() {
#ifdef JS_BUILD_BINAST
MOZ_ASSERT(IsUnknownDataType());
mDataType = DataType::eBinASTSource;
mScriptData.emplace(VariantType<BinASTSourceBuffer>());
#else
MOZ_CRASH("BinAST not supported");
#endif
}
void ScriptLoadRequest::SetBinASTSource() { MOZ_CRASH("BinAST not supported"); }
void ScriptLoadRequest::SetBytecode() {
MOZ_ASSERT(IsUnknownDataType());
@@ -206,24 +198,7 @@ void ScriptLoadRequest::SetBytecode() {
}
bool ScriptLoadRequest::ShouldAcceptBinASTEncoding() const {
#ifdef JS_BUILD_BINAST
// We accept the BinAST encoding if we're using a secure connection.
if (!mURI->SchemeIs("https")) {
return false;
}
if (StaticPrefs::dom_script_loader_binast_encoding_domain_restrict()) {
if (!nsContentUtils::IsURIInPrefList(
mURI, "dom.script_loader.binast_encoding.domain.restrict.list")) {
return false;
}
}
return true;
#else
MOZ_CRASH("BinAST not supported");
#endif
}
void ScriptLoadRequest::ClearScriptSource() {