icecat: add release icecat-140.10.1-1gnu1 for ecne
This commit is contained in:
parent
a5f93cb214
commit
ff85d7c623
1256 changed files with 63469 additions and 24141 deletions
|
|
@ -19,10 +19,9 @@ MessageEventRunnable::MessageEventRunnable(WorkerPrivate* aWorkerPrivate)
|
|||
StructuredCloneHolder(CloningSupported, TransferringSupported,
|
||||
StructuredCloneScope::SameProcess) {}
|
||||
|
||||
bool MessageEventRunnable::DispatchDOMEvent(JSContext* aCx,
|
||||
WorkerPrivate* aWorkerPrivate,
|
||||
DOMEventTargetHelper* aTarget,
|
||||
bool aIsMainThread) {
|
||||
bool MessageEventRunnable::DispatchDOMEvent(
|
||||
JSContext* aCx, WorkerPrivate* aWorkerPrivate,
|
||||
RefPtr<DOMEventTargetHelper> aTarget, bool aIsMainThread) {
|
||||
nsCOMPtr<nsIGlobalObject> parent = aTarget->GetParentObject();
|
||||
|
||||
// For some workers without window, parent is null and we try to find it
|
||||
|
|
@ -117,7 +116,7 @@ MessageEventToParentRunnable::MessageEventToParentRunnable(
|
|||
|
||||
bool MessageEventToParentRunnable::DispatchDOMEvent(
|
||||
JSContext* aCx, WorkerPrivate* aWorkerPrivate,
|
||||
DOMEventTargetHelper* aTarget, bool aIsMainThread) {
|
||||
RefPtr<DOMEventTargetHelper> aTarget, bool aIsMainThread) {
|
||||
nsCOMPtr<nsIGlobalObject> parent = aTarget->GetParentObject();
|
||||
|
||||
// For some workers without window, parent is null and we try to find it
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@ class MessageEventRunnable final : public WorkerDebuggeeRunnable,
|
|||
explicit MessageEventRunnable(WorkerPrivate* aWorkerPrivate);
|
||||
|
||||
bool DispatchDOMEvent(JSContext* aCx, WorkerPrivate* aWorkerPrivate,
|
||||
DOMEventTargetHelper* aTarget, bool aIsMainThread);
|
||||
RefPtr<DOMEventTargetHelper> aTarget,
|
||||
bool aIsMainThread);
|
||||
|
||||
private:
|
||||
bool WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override;
|
||||
|
|
@ -37,7 +38,8 @@ class MessageEventToParentRunnable final : public WorkerParentDebuggeeRunnable,
|
|||
explicit MessageEventToParentRunnable(WorkerPrivate* aWorkerPrivate);
|
||||
|
||||
bool DispatchDOMEvent(JSContext* aCx, WorkerPrivate* aWorkerPrivate,
|
||||
DOMEventTargetHelper* aTarget, bool aIsMainThread);
|
||||
RefPtr<DOMEventTargetHelper> aTarget,
|
||||
bool aIsMainThread);
|
||||
|
||||
private:
|
||||
bool WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override;
|
||||
|
|
|
|||
|
|
@ -1258,6 +1258,8 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {
|
|||
}
|
||||
} else {
|
||||
if (!mNavigatorPropertiesLoaded) {
|
||||
MutexAutoLock lock(mMutex);
|
||||
|
||||
if (NS_FAILED(Navigator::GetAppVersion(
|
||||
mNavigatorProperties.mAppVersion, aWorkerPrivate.GetDocument(),
|
||||
false /* aUsePrefOverriddenValue */)) ||
|
||||
|
|
@ -1692,6 +1694,11 @@ void RuntimeService::CrashIfHanging() {
|
|||
void RuntimeService::Cleanup() {
|
||||
AssertIsOnMainThread();
|
||||
|
||||
if (mCleanedUp) {
|
||||
return;
|
||||
}
|
||||
mCleanedUp = true;
|
||||
|
||||
if (!mShuttingDown) {
|
||||
Shutdown();
|
||||
}
|
||||
|
|
@ -1786,9 +1793,9 @@ void RuntimeService::Cleanup() {
|
|||
obs->RemoveObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID);
|
||||
mObserved = false;
|
||||
}
|
||||
}
|
||||
|
||||
nsLayoutStatics::Release();
|
||||
nsLayoutStatics::Release();
|
||||
}
|
||||
}
|
||||
|
||||
void RuntimeService::AddAllTopLevelWorkersToArray(
|
||||
|
|
@ -1923,11 +1930,13 @@ void RuntimeService::UpdateAllWorkerContextOptions() {
|
|||
void RuntimeService::UpdateAppVersionOverridePreference(
|
||||
const nsAString& aValue) {
|
||||
AssertIsOnMainThread();
|
||||
MutexAutoLock lock(mMutex);
|
||||
mNavigatorProperties.mAppVersionOverridden = aValue;
|
||||
}
|
||||
|
||||
void RuntimeService::UpdatePlatformOverridePreference(const nsAString& aValue) {
|
||||
AssertIsOnMainThread();
|
||||
MutexAutoLock lock(mMutex);
|
||||
mNavigatorProperties.mPlatformOverridden = aValue;
|
||||
}
|
||||
|
||||
|
|
@ -1935,7 +1944,10 @@ void RuntimeService::UpdateAllWorkerLanguages(
|
|||
const nsTArray<nsString>& aLanguages) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
mNavigatorProperties.mLanguages = aLanguages.Clone();
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
mNavigatorProperties.mLanguages = aLanguages.Clone();
|
||||
}
|
||||
BroadcastAllWorkers(
|
||||
[&aLanguages](auto& worker) { worker.UpdateLanguages(aLanguages); });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class RuntimeService final : public nsIObserver {
|
|||
}
|
||||
};
|
||||
|
||||
mozilla::Mutex mMutex;
|
||||
mutable mozilla::Mutex mMutex;
|
||||
|
||||
// Protected by mMutex.
|
||||
nsClassHashtable<nsCStringHashKey, WorkerDomainInfo> mDomainMap
|
||||
|
|
@ -77,12 +77,13 @@ class RuntimeService final : public nsIObserver {
|
|||
};
|
||||
|
||||
private:
|
||||
NavigatorProperties mNavigatorProperties;
|
||||
NavigatorProperties mNavigatorProperties MOZ_GUARDED_BY(mMutex);
|
||||
|
||||
// True when the observer service holds a reference to this object.
|
||||
bool mObserved;
|
||||
bool mShuttingDown;
|
||||
bool mNavigatorPropertiesLoaded;
|
||||
bool mCleanedUp{false};
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
@ -112,7 +113,8 @@ class RuntimeService final : public nsIObserver {
|
|||
void PropagateStorageAccessPermissionGranted(
|
||||
const nsPIDOMWindowInner& aWindow);
|
||||
|
||||
const NavigatorProperties& GetNavigatorProperties() const {
|
||||
NavigatorProperties GetNavigatorProperties() const {
|
||||
MutexAutoLock lock(mMutex);
|
||||
return mNavigatorProperties;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ void WorkerErrorReport::AssignErrorReport(JSErrorReport* aReport) {
|
|||
/* static */
|
||||
void WorkerErrorReport::ReportError(
|
||||
JSContext* aCx, WorkerPrivate* aWorkerPrivate, bool aFireAtScope,
|
||||
DOMEventTargetHelper* aTarget, UniquePtr<WorkerErrorReport> aReport,
|
||||
RefPtr<DOMEventTargetHelper> aTarget, UniquePtr<WorkerErrorReport> aReport,
|
||||
uint64_t aInnerWindowId, JS::Handle<JS::Value> aException) {
|
||||
if (aWorkerPrivate) {
|
||||
aWorkerPrivate->AssertIsOnWorkerThread();
|
||||
|
|
@ -324,7 +324,7 @@ void WorkerErrorReport::ReportError(
|
|||
MOZ_ASSERT(globalScope->GetWrapperPreserveColor() == global);
|
||||
|
||||
RefPtr<ErrorEvent> event = ErrorEvent::Constructor(
|
||||
aTarget ? aTarget : globalScope, u"error"_ns, init);
|
||||
aTarget ? aTarget.get() : globalScope, u"error"_ns, init);
|
||||
event->SetTrusted(true);
|
||||
|
||||
if (NS_FAILED(EventDispatcher::DispatchDOMEvent(
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ class WorkerErrorReport : public WorkerErrorBase, public SerializedStackHolder {
|
|||
// TODO: Convert this to MOZ_CAN_RUN_SCRIPT (bug 1743443)
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY static void ReportError(
|
||||
JSContext* aCx, WorkerPrivate* aWorkerPrivate, bool aFireAtScope,
|
||||
DOMEventTargetHelper* aTarget, UniquePtr<WorkerErrorReport> aReport,
|
||||
uint64_t aInnerWindowId,
|
||||
RefPtr<DOMEventTargetHelper> aTarget,
|
||||
UniquePtr<WorkerErrorReport> aReport, uint64_t aInnerWindowId,
|
||||
JS::Handle<JS::Value> aException = JS::NullHandleValue);
|
||||
|
||||
static void LogErrorToConsole(JSContext* aCx, WorkerErrorReport& aReport,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ already_AddRefed<WorkerNavigator> WorkerNavigator::Create(bool aOnLine) {
|
|||
RuntimeService* rts = RuntimeService::GetService();
|
||||
MOZ_ASSERT(rts);
|
||||
|
||||
const RuntimeService::NavigatorProperties& properties =
|
||||
RuntimeService::NavigatorProperties properties =
|
||||
rts->GetNavigatorProperties();
|
||||
|
||||
RefPtr<WorkerNavigator> navigator = new WorkerNavigator(properties, aOnLine);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@ void CachePromiseHandler::ResolvedCallback(JSContext* aCx,
|
|||
JS::Handle<JS::Value> aValue,
|
||||
ErrorResult& aRv) {
|
||||
AssertIsOnMainThread();
|
||||
if (mRequestHandle->IsEmpty()) {
|
||||
// skip to schedule execution if it has been scheduled already.
|
||||
if (mRequestHandle->mExecutionScheduled) {
|
||||
return;
|
||||
}
|
||||
WorkerLoadContext* loadContext = mRequestHandle->GetContext();
|
||||
|
|
@ -75,7 +76,8 @@ void CachePromiseHandler::RejectedCallback(JSContext* aCx,
|
|||
JS::Handle<JS::Value> aValue,
|
||||
ErrorResult& aRv) {
|
||||
AssertIsOnMainThread();
|
||||
if (mRequestHandle->IsEmpty()) {
|
||||
// skip to schedule execution if it has been scheduled already.
|
||||
if (mRequestHandle->mExecutionScheduled) {
|
||||
return;
|
||||
}
|
||||
WorkerLoadContext* loadContext = mRequestHandle->GetContext();
|
||||
|
|
@ -267,6 +269,11 @@ void CacheLoadHandler::Fail(nsresult aRv) {
|
|||
mPump->Cancel(aRv);
|
||||
mPump = nullptr;
|
||||
}
|
||||
|
||||
if (mRequestHandle->mExecutionScheduled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mRequestHandle->IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -281,7 +288,12 @@ void CacheLoadHandler::Fail(nsresult aRv) {
|
|||
|
||||
loadContext->mCachePromise = nullptr;
|
||||
|
||||
mRequestHandle->LoadingFinished(aRv);
|
||||
if (loadContext->mLoadingFinished) {
|
||||
loadContext->mLoadResult = aRv;
|
||||
mRequestHandle->MaybeExecuteFinishedScripts();
|
||||
} else {
|
||||
mRequestHandle->LoadingFinished(aRv);
|
||||
}
|
||||
}
|
||||
|
||||
void CacheLoadHandler::Load(Cache* aCache) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue