icecat: add release icecat-140.6.0-1gnu1 for ecne
This commit is contained in:
parent
618c9f4145
commit
7d0f5dab3b
3382 changed files with 457689 additions and 569094 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include "js/Array.h" // IsArrayObject
|
||||
#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_*
|
||||
#include "js/JSON.h" // JS_ParseJSON
|
||||
#include "js/PropertyDescriptor.h" // JS::PropertyDescriptor
|
||||
#include "LoadedScript.h"
|
||||
#include "ModuleLoaderBase.h" // ScriptLoaderInterface
|
||||
#include "nsContentUtils.h"
|
||||
|
|
@ -371,6 +372,21 @@ static UniquePtr<IntegrityMap> NormalizeIntegrity(
|
|||
return normalized;
|
||||
}
|
||||
|
||||
static bool GetOwnProperty(JSContext* aCx, Handle<JSObject*> aObj,
|
||||
const char* aName, MutableHandle<Value> aValueOut) {
|
||||
JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(aCx);
|
||||
if (!JS_GetOwnPropertyDescriptor(aCx, aObj, aName, &desc)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (desc.isNothing()) {
|
||||
return true;
|
||||
}
|
||||
MOZ_ASSERT(!desc->isAccessorDescriptor());
|
||||
aValueOut.set(desc->value());
|
||||
return true;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#parse-an-import-map-string
|
||||
// static
|
||||
UniquePtr<ImportMap> ImportMap::ParseString(
|
||||
|
|
@ -415,9 +431,9 @@ UniquePtr<ImportMap> ImportMap::ParseString(
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
JS::RootedObject parsedObj(aCx, &parsedVal.toObject());
|
||||
JS::RootedValue importsVal(aCx);
|
||||
if (!JS_GetProperty(aCx, parsedObj, "imports", &importsVal)) {
|
||||
RootedObject parsedObj(aCx, &parsedVal.toObject());
|
||||
RootedValue importsVal(aCx);
|
||||
if (!GetOwnProperty(aCx, parsedObj, "imports", &importsVal)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
@ -452,8 +468,8 @@ UniquePtr<ImportMap> ImportMap::ParseString(
|
|||
}
|
||||
}
|
||||
|
||||
JS::RootedValue scopesVal(aCx);
|
||||
if (!JS_GetProperty(aCx, parsedObj, "scopes", &scopesVal)) {
|
||||
RootedValue scopesVal(aCx);
|
||||
if (!GetOwnProperty(aCx, parsedObj, "scopes", &scopesVal)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
@ -488,8 +504,8 @@ UniquePtr<ImportMap> ImportMap::ParseString(
|
|||
}
|
||||
}
|
||||
|
||||
JS::RootedValue integrityVal(aCx);
|
||||
if (!JS_GetProperty(aCx, parsedObj, "integrity", &integrityVal)) {
|
||||
RootedValue integrityVal(aCx);
|
||||
if (!GetOwnProperty(aCx, parsedObj, "integrity", &integrityVal)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
@ -583,7 +599,6 @@ static mozilla::Result<nsCOMPtr<nsIURI>, ResolveError> ResolveImportsMatch(
|
|||
const SpecifierMap* aSpecifierMap) {
|
||||
// Step 1. For each specifierKey → resolutionResult of specifierMap,
|
||||
for (auto&& [specifierKey, resolutionResult] : *aSpecifierMap) {
|
||||
nsAutoString specifier{aNormalizedSpecifier};
|
||||
nsCString asURL = aAsURL ? aAsURL->GetSpecOrDefault() : EmptyCString();
|
||||
|
||||
// Step 1.1. If specifierKey is normalizedSpecifier, then:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue