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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user