mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
Merge mozilla-central to autoland. a=merge CLOSED TREE
This commit is contained in:
commit
58c8915ecd
1
.flake8
1
.flake8
@ -12,7 +12,6 @@ exclude =
|
||||
dom/imptests,
|
||||
dom/security,
|
||||
dom/websocket,
|
||||
embedding/ios/moz.configure,
|
||||
gfx/tests,
|
||||
layout/base/tests/marionette,
|
||||
layout/reftests/border-image,
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -112,8 +112,6 @@ mobile/android/gradle/.gradle
|
||||
|
||||
# XCode project cruft
|
||||
/*.xcodeproj/
|
||||
embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj/project.xcworkspace/xcuserdata
|
||||
embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj/xcuserdata
|
||||
|
||||
# Rust/Cargo output from running `cargo` directly
|
||||
/target/
|
||||
|
@ -115,8 +115,6 @@ _OPT\.OBJ/
|
||||
|
||||
# XCode project cruft
|
||||
^[^/]*\.xcodeproj/
|
||||
^embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj/project.xcworkspace/xcuserdata
|
||||
^embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj/xcuserdata
|
||||
|
||||
# Rust/Cargo output from running `cargo` directly
|
||||
^target/
|
||||
|
@ -154,7 +154,7 @@ typedef ScrollableLayerGuid::ViewID ViewID;
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsFrameLoader, mDocShell, mMessageManager,
|
||||
mChildMessageManager, mOpener,
|
||||
mParentSHistory)
|
||||
mParentSHistory, mRemoteBrowser)
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsFrameLoader)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsFrameLoader)
|
||||
|
||||
|
@ -467,7 +467,7 @@ class nsFrameLoader final : public nsStubMutationObserver,
|
||||
// An opener window which should be used when the docshell is created.
|
||||
nsCOMPtr<nsPIDOMWindowOuter> mOpener;
|
||||
|
||||
TabParent* mRemoteBrowser;
|
||||
RefPtr<TabParent> mRemoteBrowser;
|
||||
uint64_t mChildID;
|
||||
|
||||
// This is used when this refers to a remote sub frame
|
||||
|
@ -74,6 +74,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIAsyncInputStream.h"
|
||||
@ -273,6 +274,20 @@ const char kPrefFileHandleEnabled[] = "dom.fileHandle.enabled";
|
||||
|
||||
const uint32_t kDeleteTimeoutMs = 1000;
|
||||
|
||||
/**
|
||||
* Automatically crash the browser if IndexedDB shutdown takes this long. We've
|
||||
* chosen a value that is longer than the value for QuotaManager shutdown timer
|
||||
* which is currently set to 30 seconds. We've also chosen a value that is long
|
||||
* long enough that it is unlikely for the problem to be falsely triggered by
|
||||
* slow system I/O. We've also chosen a value long enough so that automated
|
||||
* tests should time out and fail if IndexedDB shutdown hangs. Also, this value
|
||||
* is long enough so that testers can notice the IndexedDB shutdown hang; we
|
||||
* want to know about the hangs, not hide them. On the other hand this value is
|
||||
* less than 60 seconds which is used by nsTerminator to crash a hung main
|
||||
* process.
|
||||
*/
|
||||
#define SHUTDOWN_TIMEOUT_MS 50000
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
const int32_t kDEBUGThreadPriority = nsISupportsPriority::PRIORITY_NORMAL;
|
||||
@ -7850,6 +7865,8 @@ class QuotaClient final : public mozilla::dom::quota::Client {
|
||||
private:
|
||||
~QuotaClient() override;
|
||||
|
||||
void ShutdownTimedOut();
|
||||
|
||||
static void DeleteTimerCallback(nsITimer* aTimer, void* aClosure);
|
||||
|
||||
nsresult GetDirectory(PersistenceType aPersistenceType,
|
||||
@ -16209,6 +16226,17 @@ void QuotaClient::ShutdownWorkThreads() {
|
||||
|
||||
AbortOperations(VoidCString());
|
||||
|
||||
nsCOMPtr<nsITimer> timer = NS_NewTimer();
|
||||
|
||||
MOZ_ALWAYS_SUCCEEDS(timer->InitWithNamedFuncCallback(
|
||||
[](nsITimer* aTimer, void* aClosure) {
|
||||
auto quotaClient = static_cast<QuotaClient*>(aClosure);
|
||||
|
||||
quotaClient->ShutdownTimedOut();
|
||||
},
|
||||
this, SHUTDOWN_TIMEOUT_MS, nsITimer::TYPE_ONE_SHOT,
|
||||
"indexeddb::QuotaClient::ShutdownWorkThreads::SpinEventLoopTimer"));
|
||||
|
||||
// This should release any IDB related quota objects or directory locks.
|
||||
MOZ_ALWAYS_TRUE(SpinEventLoopUntil([&]() {
|
||||
return (!gFactoryOps || gFactoryOps->IsEmpty()) &&
|
||||
@ -16216,6 +16244,8 @@ void QuotaClient::ShutdownWorkThreads() {
|
||||
!mCurrentMaintenance;
|
||||
}));
|
||||
|
||||
MOZ_ALWAYS_SUCCEEDS(timer->Cancel());
|
||||
|
||||
// And finally, shutdown all threads.
|
||||
RefPtr<ConnectionPool> connectionPool = gConnectionPool.get();
|
||||
if (connectionPool) {
|
||||
@ -16243,6 +16273,37 @@ void QuotaClient::ShutdownWorkThreads() {
|
||||
}
|
||||
}
|
||||
|
||||
void QuotaClient::ShutdownTimedOut() {
|
||||
AssertIsOnBackgroundThread();
|
||||
MOZ_DIAGNOSTIC_ASSERT(
|
||||
(gFactoryOps && !gFactoryOps->IsEmpty()) ||
|
||||
(gLiveDatabaseHashtable && gLiveDatabaseHashtable->Count()) ||
|
||||
mCurrentMaintenance);
|
||||
|
||||
nsCString data;
|
||||
|
||||
if (gFactoryOps && !gFactoryOps->IsEmpty()) {
|
||||
data.Append("gFactoryOps: ");
|
||||
data.AppendInt(static_cast<uint32_t>(gFactoryOps->Length()));
|
||||
data.Append("\n");
|
||||
}
|
||||
|
||||
if (gLiveDatabaseHashtable && gLiveDatabaseHashtable->Count()) {
|
||||
data.Append("gLiveDatabaseHashtable: ");
|
||||
data.AppendInt(gLiveDatabaseHashtable->Count());
|
||||
data.Append("\n");
|
||||
}
|
||||
|
||||
if (mCurrentMaintenance) {
|
||||
data.Append("mCurrentMaintenance\n");
|
||||
}
|
||||
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
CrashReporter::Annotation::IndexedDBShutdownTimeout, data);
|
||||
|
||||
MOZ_CRASH("IndexedDB shutdown timed out");
|
||||
}
|
||||
|
||||
void QuotaClient::DeleteTimerCallback(nsITimer* aTimer, void* aClosure) {
|
||||
AssertIsOnBackgroundThread();
|
||||
MOZ_ASSERT(aTimer);
|
||||
|
@ -149,8 +149,15 @@ namespace dom {
|
||||
|
||||
TabParent::LayerToTabParentTable* TabParent::sLayerToTabParentTable = nullptr;
|
||||
|
||||
NS_IMPL_ISUPPORTS(TabParent, nsITabParent, nsIAuthPromptProvider,
|
||||
nsISupportsWeakReference)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TabParent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsITabParent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIAuthPromptProvider)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsITabParent)
|
||||
NS_INTERFACE_MAP_END
|
||||
NS_IMPL_CYCLE_COLLECTION(TabParent, mFrameElement, mBrowserDOMWindow, mLoadContext, mFrameLoader, mBrowsingContext)
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(TabParent)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(TabParent)
|
||||
|
||||
TabParent::TabParent(ContentParent* aManager, const TabId& aTabId,
|
||||
const TabContext& aContext,
|
||||
@ -1934,7 +1941,7 @@ mozilla::ipc::IPCResult TabParent::RecvRequestFocus(const bool& aCanRaise) {
|
||||
uint32_t flags = nsIFocusManager::FLAG_NOSCROLL;
|
||||
if (aCanRaise) flags |= nsIFocusManager::FLAG_RAISE;
|
||||
|
||||
RefPtr<Element> element = mFrameElement;
|
||||
nsCOMPtr<Element> element = mFrameElement;
|
||||
fm->SetFocus(element, flags);
|
||||
return IPC_OK();
|
||||
}
|
||||
@ -2639,7 +2646,8 @@ already_AddRefed<nsFrameLoader> TabParent::GetFrameLoader(
|
||||
RefPtr<nsFrameLoader> fl = mFrameLoader;
|
||||
return fl.forget();
|
||||
}
|
||||
RefPtr<nsFrameLoaderOwner> frameLoaderOwner = do_QueryObject(mFrameElement);
|
||||
nsCOMPtr<Element> frameElement(mFrameElement);
|
||||
RefPtr<nsFrameLoaderOwner> frameLoaderOwner = do_QueryObject(frameElement);
|
||||
return frameLoaderOwner ? frameLoaderOwner->GetFrameLoader() : nullptr;
|
||||
}
|
||||
|
||||
|
@ -97,11 +97,15 @@ class TabParent final : public PBrowserParent,
|
||||
// Helper class for ContentParent::RecvCreateWindow.
|
||||
struct AutoUseNewTab;
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_NSIAUTHPROMPTPROVIDER
|
||||
// nsITabParent
|
||||
NS_DECL_NSITABPARENT
|
||||
// nsIDOMEventListener interfaces
|
||||
NS_DECL_NSIDOMEVENTLISTENER
|
||||
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(TabParent, nsITabParent)
|
||||
|
||||
TabParent(ContentParent* aManager, const TabId& aTabId,
|
||||
const TabContext& aContext,
|
||||
CanonicalBrowsingContext* aBrowsingContext, uint32_t aChromeFlags,
|
||||
@ -452,9 +456,6 @@ class TabParent final : public PBrowserParent,
|
||||
|
||||
bool GetGlobalJSObject(JSContext* cx, JSObject** globalp);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIAUTHPROMPTPROVIDER
|
||||
|
||||
void StartPersistence(uint64_t aOuterWindowID,
|
||||
nsIWebBrowserPersistDocumentReceiver* aRecv,
|
||||
ErrorResult& aRv);
|
||||
@ -614,7 +615,7 @@ class TabParent final : public PBrowserParent,
|
||||
|
||||
virtual void ActorDestroy(ActorDestroyReason why) override;
|
||||
|
||||
Element* mFrameElement;
|
||||
nsCOMPtr<Element> mFrameElement;
|
||||
nsCOMPtr<nsIBrowserDOMWindow> mBrowserDOMWindow;
|
||||
|
||||
mozilla::ipc::IPCResult RecvRemotePaintIsReady();
|
||||
|
@ -21,7 +21,7 @@ namespace dom {
|
||||
|
||||
LSDatabaseChild::LSDatabaseChild(LSDatabase* aDatabase) : mDatabase(aDatabase) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aDatabase);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aDatabase);
|
||||
|
||||
MOZ_COUNT_CTOR(LSDatabaseChild);
|
||||
}
|
||||
@ -78,7 +78,7 @@ PBackgroundLSSnapshotChild* LSDatabaseChild::AllocPBackgroundLSSnapshotChild(
|
||||
|
||||
bool LSDatabaseChild::DeallocPBackgroundLSSnapshotChild(
|
||||
PBackgroundLSSnapshotChild* aActor) {
|
||||
MOZ_ASSERT(aActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aActor);
|
||||
|
||||
delete aActor;
|
||||
return true;
|
||||
@ -90,7 +90,7 @@ bool LSDatabaseChild::DeallocPBackgroundLSSnapshotChild(
|
||||
|
||||
LSObserverChild::LSObserverChild(LSObserver* aObserver) : mObserver(aObserver) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aObserver);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObserver);
|
||||
|
||||
MOZ_COUNT_CTOR(LSObserverChild);
|
||||
}
|
||||
@ -179,7 +179,7 @@ void LSRequestChild::ActorDestroy(ActorDestroyReason aWhy) {
|
||||
mozilla::ipc::IPCResult LSRequestChild::Recv__delete__(
|
||||
const LSRequestResponse& aResponse) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mCallback);
|
||||
|
||||
mCallback->OnResponse(aResponse);
|
||||
|
||||
@ -204,7 +204,7 @@ LSSimpleRequestChild::LSSimpleRequestChild(
|
||||
LSSimpleRequestChildCallback* aCallback)
|
||||
: mCallback(aCallback) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aCallback);
|
||||
|
||||
MOZ_COUNT_CTOR(LSSimpleRequestChild);
|
||||
}
|
||||
@ -234,7 +234,7 @@ mozilla::ipc::IPCResult LSSimpleRequestChild::Recv__delete__(
|
||||
|
||||
LSSnapshotChild::LSSnapshotChild(LSSnapshot* aSnapshot) : mSnapshot(aSnapshot) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aSnapshot);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aSnapshot);
|
||||
|
||||
MOZ_COUNT_CTOR(LSSnapshotChild);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -45,24 +45,24 @@ LSDatabase::LSDatabase(const nsACString& aOrigin)
|
||||
if (!gLSDatabases) {
|
||||
gLSDatabases = new LSDatabaseHashtable();
|
||||
|
||||
MOZ_ASSERT(!sObserver);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!sObserver);
|
||||
|
||||
sObserver = new Observer();
|
||||
|
||||
nsCOMPtr<nsIObserverService> obsSvc = GetObserverService();
|
||||
MOZ_ASSERT(obsSvc);
|
||||
MOZ_DIAGNOSTIC_ASSERT(obsSvc);
|
||||
|
||||
MOZ_ALWAYS_SUCCEEDS(
|
||||
obsSvc->AddObserver(sObserver, XPCOM_SHUTDOWN_OBSERVER_TOPIC, false));
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!gLSDatabases->Get(mOrigin));
|
||||
MOZ_DIAGNOSTIC_ASSERT(!gLSDatabases->Get(mOrigin));
|
||||
gLSDatabases->Put(mOrigin, this);
|
||||
}
|
||||
|
||||
LSDatabase::~LSDatabase() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(!mSnapshot);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSnapshot);
|
||||
|
||||
if (!mAllowedToClose) {
|
||||
AllowToClose();
|
||||
@ -70,7 +70,7 @@ LSDatabase::~LSDatabase() {
|
||||
|
||||
if (mActor) {
|
||||
mActor->SendDeleteMeInternal();
|
||||
MOZ_ASSERT(!mActor, "SendDeleteMeInternal should have cleared!");
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mActor, "SendDeleteMeInternal should have cleared!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,8 +81,8 @@ LSDatabase* LSDatabase::Get(const nsACString& aOrigin) {
|
||||
|
||||
void LSDatabase::SetActor(LSDatabaseChild* aActor) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aActor);
|
||||
MOZ_ASSERT(!mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mActor);
|
||||
|
||||
mActor = aActor;
|
||||
}
|
||||
@ -105,7 +105,7 @@ void LSDatabase::RequestAllowToClose() {
|
||||
|
||||
void LSDatabase::NoteFinishedSnapshot(LSSnapshot* aSnapshot) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aSnapshot == mSnapshot);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aSnapshot == mSnapshot);
|
||||
|
||||
mSnapshot = nullptr;
|
||||
|
||||
@ -116,9 +116,9 @@ void LSDatabase::NoteFinishedSnapshot(LSSnapshot* aSnapshot) {
|
||||
|
||||
nsresult LSDatabase::GetLength(LSObject* aObject, uint32_t* aResult) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
|
||||
nsresult rv = EnsureSnapshot(aObject);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -136,9 +136,9 @@ nsresult LSDatabase::GetLength(LSObject* aObject, uint32_t* aResult) {
|
||||
nsresult LSDatabase::GetKey(LSObject* aObject, uint32_t aIndex,
|
||||
nsAString& aResult) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
|
||||
nsresult rv = EnsureSnapshot(aObject);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -156,9 +156,9 @@ nsresult LSDatabase::GetKey(LSObject* aObject, uint32_t aIndex,
|
||||
nsresult LSDatabase::GetItem(LSObject* aObject, const nsAString& aKey,
|
||||
nsAString& aResult) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
|
||||
nsresult rv = EnsureSnapshot(aObject);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -175,9 +175,9 @@ nsresult LSDatabase::GetItem(LSObject* aObject, const nsAString& aKey,
|
||||
|
||||
nsresult LSDatabase::GetKeys(LSObject* aObject, nsTArray<nsString>& aKeys) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
|
||||
nsresult rv = EnsureSnapshot(aObject);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -196,9 +196,9 @@ nsresult LSDatabase::SetItem(LSObject* aObject, const nsAString& aKey,
|
||||
const nsAString& aValue,
|
||||
LSNotifyInfo& aNotifyInfo) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
|
||||
nsresult rv = EnsureSnapshot(aObject);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -216,9 +216,9 @@ nsresult LSDatabase::SetItem(LSObject* aObject, const nsAString& aKey,
|
||||
nsresult LSDatabase::RemoveItem(LSObject* aObject, const nsAString& aKey,
|
||||
LSNotifyInfo& aNotifyInfo) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
|
||||
nsresult rv = EnsureSnapshot(aObject);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -235,9 +235,9 @@ nsresult LSDatabase::RemoveItem(LSObject* aObject, const nsAString& aKey,
|
||||
|
||||
nsresult LSDatabase::Clear(LSObject* aObject, LSNotifyInfo& aNotifyInfo) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
|
||||
nsresult rv = EnsureSnapshot(aObject);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -254,9 +254,9 @@ nsresult LSDatabase::Clear(LSObject* aObject, LSNotifyInfo& aNotifyInfo) {
|
||||
|
||||
nsresult LSDatabase::BeginExplicitSnapshot(LSObject* aObject) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
|
||||
if (mSnapshot) {
|
||||
return NS_ERROR_ALREADY_INITIALIZED;
|
||||
@ -272,15 +272,15 @@ nsresult LSDatabase::BeginExplicitSnapshot(LSObject* aObject) {
|
||||
|
||||
nsresult LSDatabase::EndExplicitSnapshot(LSObject* aObject) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
|
||||
if (!mSnapshot) {
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mSnapshot->Explicit());
|
||||
MOZ_DIAGNOSTIC_ASSERT(mSnapshot->Explicit());
|
||||
|
||||
nsresult rv = mSnapshot->End();
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -291,10 +291,10 @@ nsresult LSDatabase::EndExplicitSnapshot(LSObject* aObject) {
|
||||
}
|
||||
|
||||
nsresult LSDatabase::EnsureSnapshot(LSObject* aObject, bool aExplicit) {
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT_IF(mSnapshot, !aExplicit);
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT_IF(mSnapshot, !aExplicit);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
|
||||
if (mSnapshot) {
|
||||
return NS_OK;
|
||||
@ -330,8 +330,8 @@ nsresult LSDatabase::EnsureSnapshot(LSObject* aObject, bool aExplicit) {
|
||||
|
||||
void LSDatabase::AllowToClose() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(!mAllowedToClose);
|
||||
MOZ_ASSERT(!mSnapshot);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mAllowedToClose);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSnapshot);
|
||||
|
||||
mAllowedToClose = true;
|
||||
|
||||
@ -339,17 +339,17 @@ void LSDatabase::AllowToClose() {
|
||||
mActor->SendAllowToClose();
|
||||
}
|
||||
|
||||
MOZ_ASSERT(gLSDatabases);
|
||||
MOZ_ASSERT(gLSDatabases->Get(mOrigin));
|
||||
MOZ_DIAGNOSTIC_ASSERT(gLSDatabases);
|
||||
MOZ_DIAGNOSTIC_ASSERT(gLSDatabases->Get(mOrigin));
|
||||
gLSDatabases->Remove(mOrigin);
|
||||
|
||||
if (!gLSDatabases->Count()) {
|
||||
gLSDatabases = nullptr;
|
||||
|
||||
MOZ_ASSERT(sObserver);
|
||||
MOZ_DIAGNOSTIC_ASSERT(sObserver);
|
||||
|
||||
nsCOMPtr<nsIObserverService> obsSvc = GetObserverService();
|
||||
MOZ_ASSERT(obsSvc);
|
||||
MOZ_DIAGNOSTIC_ASSERT(obsSvc);
|
||||
|
||||
MOZ_ALWAYS_SUCCEEDS(
|
||||
obsSvc->RemoveObserver(sObserver, XPCOM_SHUTDOWN_OBSERVER_TOPIC));
|
||||
@ -364,14 +364,14 @@ NS_IMETHODIMP
|
||||
LSDatabase::Observer::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const char16_t* aData) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(!strcmp(aTopic, XPCOM_SHUTDOWN_OBSERVER_TOPIC));
|
||||
MOZ_ASSERT(gLSDatabases);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!strcmp(aTopic, XPCOM_SHUTDOWN_OBSERVER_TOPIC));
|
||||
MOZ_DIAGNOSTIC_ASSERT(gLSDatabases);
|
||||
|
||||
nsTArray<RefPtr<LSDatabase>> databases;
|
||||
|
||||
for (auto iter = gLSDatabases->ConstIter(); !iter.Done(); iter.Next()) {
|
||||
LSDatabase* database = iter.Data();
|
||||
MOZ_ASSERT(database);
|
||||
MOZ_DIAGNOSTIC_ASSERT(database);
|
||||
|
||||
databases.AppendElement(database);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class LSDatabase final {
|
||||
|
||||
void ClearActor() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
|
||||
mActor = nullptr;
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class RequestHelper final : public Runnable, public LSRequestChildCallback {
|
||||
mCancelled(false) {}
|
||||
|
||||
bool IsOnOwningThread() const {
|
||||
MOZ_ASSERT(mOwningEventTarget);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mOwningEventTarget);
|
||||
|
||||
bool current;
|
||||
return NS_SUCCEEDED(mOwningEventTarget->IsOnCurrentThread(¤t)) &&
|
||||
@ -200,7 +200,7 @@ LSObject::LSObject(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal)
|
||||
mPrivateBrowsingId(0),
|
||||
mInExplicitSnapshot(false) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(NextGenLocalStorageEnabled());
|
||||
MOZ_DIAGNOSTIC_ASSERT(NextGenLocalStorageEnabled());
|
||||
}
|
||||
|
||||
LSObject::~LSObject() {
|
||||
@ -241,14 +241,14 @@ void LSObject::Initialize() {
|
||||
nsresult LSObject::CreateForWindow(nsPIDOMWindowInner* aWindow,
|
||||
Storage** aStorage) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aWindow);
|
||||
MOZ_ASSERT(aStorage);
|
||||
MOZ_ASSERT(NextGenLocalStorageEnabled());
|
||||
MOZ_ASSERT(nsContentUtils::StorageAllowedForWindow(aWindow) >
|
||||
nsContentUtils::StorageAccess::eDeny);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aWindow);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aStorage);
|
||||
MOZ_DIAGNOSTIC_ASSERT(NextGenLocalStorageEnabled());
|
||||
MOZ_DIAGNOSTIC_ASSERT(nsContentUtils::StorageAllowedForWindow(aWindow) >
|
||||
nsContentUtils::StorageAccess::eDeny);
|
||||
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(aWindow);
|
||||
MOZ_ASSERT(sop);
|
||||
MOZ_DIAGNOSTIC_ASSERT(sop);
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||
if (NS_WARN_IF(!principal)) {
|
||||
@ -275,7 +275,8 @@ nsresult LSObject::CreateForWindow(nsPIDOMWindowInner* aWindow,
|
||||
return rv;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(principalInfo->type() == PrincipalInfo::TContentPrincipalInfo);
|
||||
MOZ_DIAGNOSTIC_ASSERT(principalInfo->type() ==
|
||||
PrincipalInfo::TContentPrincipalInfo);
|
||||
|
||||
if (NS_WARN_IF(!QuotaManager::IsPrincipalInfoValid(*principalInfo))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -288,7 +289,7 @@ nsresult LSObject::CreateForWindow(nsPIDOMWindowInner* aWindow,
|
||||
return rv;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(originAttrSuffix == suffix);
|
||||
MOZ_DIAGNOSTIC_ASSERT(originAttrSuffix == suffix);
|
||||
|
||||
uint32_t privateBrowsingId;
|
||||
rv = principal->GetPrivateBrowsingId(&privateBrowsingId);
|
||||
@ -329,8 +330,8 @@ nsresult LSObject::CreateForPrincipal(nsPIDOMWindowInner* aWindow,
|
||||
const nsAString& aDocumentURI,
|
||||
bool aPrivate, LSObject** aObject) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
MOZ_ASSERT(aObject);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aPrincipal);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aObject);
|
||||
|
||||
nsCString originAttrSuffix;
|
||||
nsCString originKey;
|
||||
@ -345,8 +346,9 @@ nsresult LSObject::CreateForPrincipal(nsPIDOMWindowInner* aWindow,
|
||||
return rv;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(principalInfo->type() == PrincipalInfo::TContentPrincipalInfo ||
|
||||
principalInfo->type() == PrincipalInfo::TSystemPrincipalInfo);
|
||||
MOZ_DIAGNOSTIC_ASSERT(
|
||||
principalInfo->type() == PrincipalInfo::TContentPrincipalInfo ||
|
||||
principalInfo->type() == PrincipalInfo::TSystemPrincipalInfo);
|
||||
|
||||
if (NS_WARN_IF(!QuotaManager::IsPrincipalInfoValid(*principalInfo))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -365,7 +367,7 @@ nsresult LSObject::CreateForPrincipal(nsPIDOMWindowInner* aWindow,
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_ASSERT(originAttrSuffix == suffix);
|
||||
MOZ_DIAGNOSTIC_ASSERT(originAttrSuffix == suffix);
|
||||
|
||||
Maybe<nsID> clientId;
|
||||
if (aWindow) {
|
||||
@ -456,7 +458,7 @@ Storage::StorageType LSObject::Type() const {
|
||||
|
||||
bool LSObject::IsForkOf(const Storage* aStorage) const {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aStorage);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aStorage);
|
||||
|
||||
if (aStorage->Type() != eLocalStorage) {
|
||||
return false;
|
||||
@ -796,7 +798,7 @@ nsresult LSObject::EnsureDatabase() {
|
||||
mDatabase = LSDatabase::Get(mOrigin);
|
||||
|
||||
if (mDatabase) {
|
||||
MOZ_ASSERT(!mDatabase->IsAllowedToClose());
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mDatabase->IsAllowedToClose());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -824,8 +826,8 @@ nsresult LSObject::EnsureDatabase() {
|
||||
return rv;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(response.type() ==
|
||||
LSRequestResponse::TLSRequestPrepareDatastoreResponse);
|
||||
MOZ_DIAGNOSTIC_ASSERT(response.type() ==
|
||||
LSRequestResponse::TLSRequestPrepareDatastoreResponse);
|
||||
|
||||
const LSRequestPrepareDatastoreResponse& prepareDatastoreResponse =
|
||||
response.get_LSRequestPrepareDatastoreResponse();
|
||||
@ -888,8 +890,8 @@ nsresult LSObject::EnsureObserver() {
|
||||
return rv;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(response.type() ==
|
||||
LSRequestResponse::TLSRequestPrepareObserverResponse);
|
||||
MOZ_DIAGNOSTIC_ASSERT(response.type() ==
|
||||
LSRequestResponse::TLSRequestPrepareObserverResponse);
|
||||
|
||||
const LSRequestPrepareObserverResponse& prepareObserverResponse =
|
||||
response.get_LSRequestPrepareObserverResponse();
|
||||
@ -904,7 +906,7 @@ nsresult LSObject::EnsureObserver() {
|
||||
// strong reference to the observer.
|
||||
|
||||
PBackgroundChild* backgroundActor = BackgroundChild::GetForCurrentThread();
|
||||
MOZ_ASSERT(backgroundActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(backgroundActor);
|
||||
|
||||
RefPtr<LSObserver> observer = new LSObserver(mOrigin);
|
||||
|
||||
@ -943,20 +945,20 @@ nsresult LSObject::EndExplicitSnapshotInternal() {
|
||||
|
||||
// Can be only called if the mInExplicitSnapshot flag is true.
|
||||
// An explicit snapshot must have been created.
|
||||
MOZ_ASSERT(mInExplicitSnapshot);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInExplicitSnapshot);
|
||||
|
||||
// If an explicit snapshot have been created then mDatabase must be not null.
|
||||
// DropDatabase could be called in the meatime, but that would set
|
||||
// mInExplicitSnapshot to false. EnsureDatabase could be called in the
|
||||
// meantime too, but that can't set mDatabase to null or to a new value. See
|
||||
// the comment below.
|
||||
MOZ_ASSERT(mDatabase);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mDatabase);
|
||||
|
||||
// Existence of a snapshot prevents the database from allowing to close. See
|
||||
// LSDatabase::RequestAllowToClose and LSDatabase::NoteFinishedSnapshot.
|
||||
// If the database is not allowed to close then mDatabase could not have been
|
||||
// nulled out or set to a new value. See EnsureDatabase.
|
||||
MOZ_ASSERT(!mDatabase->IsAllowedToClose());
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mDatabase->IsAllowedToClose());
|
||||
|
||||
nsresult rv = mDatabase->EndExplicitSnapshot(this);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -994,7 +996,7 @@ NestedEventTargetWrapper::IsOnCurrentThread(bool* aResult) {
|
||||
NS_IMETHODIMP
|
||||
NestedEventTargetWrapper::Dispatch(already_AddRefed<nsIRunnable> aEvent,
|
||||
uint32_t aFlags) {
|
||||
MOZ_ASSERT(mNestedEventTarget);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mNestedEventTarget);
|
||||
|
||||
if (mDisconnected) {
|
||||
MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(std::move(aEvent), aFlags));
|
||||
@ -1057,7 +1059,7 @@ nsresult RequestHelper::StartAndReturnResponse(LSRequestResponse& aResponse) {
|
||||
|
||||
const nsLocalExecutionGuard localExecution(thread->EnterLocalExecution());
|
||||
mNestedEventTarget = localExecution.GetEventTarget();
|
||||
MOZ_ASSERT(mNestedEventTarget);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mNestedEventTarget);
|
||||
|
||||
mNestedEventTargetWrapper =
|
||||
new NestedEventTargetWrapper(mNestedEventTarget);
|
||||
@ -1179,7 +1181,7 @@ nsresult RequestHelper::StartAndReturnResponse(LSRequestResponse& aResponse) {
|
||||
|
||||
nsresult RequestHelper::Start() {
|
||||
AssertIsOnDOMFileThread();
|
||||
MOZ_ASSERT(mState == State::Initial);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mState == State::Initial);
|
||||
|
||||
mState = State::ResponsePending;
|
||||
|
||||
@ -1196,7 +1198,7 @@ nsresult RequestHelper::Start() {
|
||||
|
||||
void RequestHelper::Finish() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mState == State::Finishing);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mState == State::Finishing);
|
||||
|
||||
mObject = nullptr;
|
||||
|
||||
@ -1244,7 +1246,7 @@ RequestHelper::Run() {
|
||||
|
||||
void RequestHelper::OnResponse(const LSRequestResponse& aResponse) {
|
||||
AssertIsOnDOMFileThread();
|
||||
MOZ_ASSERT(mState == State::ResponsePending);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mState == State::ResponsePending);
|
||||
|
||||
mActor = nullptr;
|
||||
|
||||
|
@ -31,7 +31,7 @@ LSObserver::LSObserver(const nsACString& aOrigin)
|
||||
gLSObservers = new LSObserverHashtable();
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!gLSObservers->Get(mOrigin));
|
||||
MOZ_DIAGNOSTIC_ASSERT(!gLSObservers->Get(mOrigin));
|
||||
gLSObservers->Put(mOrigin, this);
|
||||
}
|
||||
|
||||
@ -40,11 +40,11 @@ LSObserver::~LSObserver() {
|
||||
|
||||
if (mActor) {
|
||||
mActor->SendDeleteMeInternal();
|
||||
MOZ_ASSERT(!mActor, "SendDeleteMeInternal should have cleared!");
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mActor, "SendDeleteMeInternal should have cleared!");
|
||||
}
|
||||
|
||||
MOZ_ASSERT(gLSObservers);
|
||||
MOZ_ASSERT(gLSObservers->Get(mOrigin));
|
||||
MOZ_DIAGNOSTIC_ASSERT(gLSObservers);
|
||||
MOZ_DIAGNOSTIC_ASSERT(gLSObservers->Get(mOrigin));
|
||||
gLSObservers->Remove(mOrigin);
|
||||
|
||||
if (!gLSObservers->Count()) {
|
||||
@ -59,8 +59,8 @@ LSObserver* LSObserver::Get(const nsACString& aOrigin) {
|
||||
|
||||
void LSObserver::SetActor(LSObserverChild* aActor) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aActor);
|
||||
MOZ_ASSERT(!mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mActor);
|
||||
|
||||
mActor = aActor;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class LSObserver final {
|
||||
|
||||
void ClearActor() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
|
||||
mActor = nullptr;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ LSSnapshot::LSSnapshot(LSDatabase* aDatabase)
|
||||
mHasPendingStableStateCallback(false),
|
||||
mHasPendingTimerCallback(false),
|
||||
mDirty(false)
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
,
|
||||
mInitialized(false),
|
||||
mSentFinish(false)
|
||||
@ -40,32 +40,32 @@ LSSnapshot::LSSnapshot(LSDatabase* aDatabase)
|
||||
|
||||
LSSnapshot::~LSSnapshot() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mDatabase);
|
||||
MOZ_ASSERT(!mHasPendingStableStateCallback);
|
||||
MOZ_ASSERT(!mHasPendingTimerCallback);
|
||||
MOZ_ASSERT_IF(mInitialized, mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mDatabase);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mHasPendingStableStateCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mHasPendingTimerCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT_IF(mInitialized, mSentFinish);
|
||||
|
||||
if (mActor) {
|
||||
mActor->SendDeleteMeInternal();
|
||||
MOZ_ASSERT(!mActor, "SendDeleteMeInternal should have cleared!");
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mActor, "SendDeleteMeInternal should have cleared!");
|
||||
}
|
||||
}
|
||||
|
||||
void LSSnapshot::SetActor(LSSnapshotChild* aActor) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(aActor);
|
||||
MOZ_ASSERT(!mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mActor);
|
||||
|
||||
mActor = aActor;
|
||||
}
|
||||
|
||||
nsresult LSSnapshot::Init(const LSSnapshotInitInfo& aInitInfo, bool aExplicit) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(!mSelfRef);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mLoadState == LoadState::Initial);
|
||||
MOZ_ASSERT(!mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSelfRef);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mLoadState == LoadState::Initial);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
mSelfRef = this;
|
||||
|
||||
@ -90,7 +90,7 @@ nsresult LSSnapshot::Init(const LSSnapshotInitInfo& aInitInfo, bool aExplicit) {
|
||||
} else if (loadState == LoadState::AllOrderedKeys) {
|
||||
mInitLength = aInitInfo.totalLength();
|
||||
} else {
|
||||
MOZ_ASSERT(loadState == LoadState::AllOrderedItems);
|
||||
MOZ_DIAGNOSTIC_ASSERT(loadState == LoadState::AllOrderedItems);
|
||||
}
|
||||
|
||||
mExactUsage = aInitInfo.initialUsage();
|
||||
@ -100,13 +100,13 @@ nsresult LSSnapshot::Init(const LSSnapshotInitInfo& aInitInfo, bool aExplicit) {
|
||||
|
||||
mExplicit = aExplicit;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mInitialized = true;
|
||||
#endif
|
||||
|
||||
if (!mExplicit) {
|
||||
mTimer = NS_NewTimer();
|
||||
MOZ_ASSERT(mTimer);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mTimer);
|
||||
|
||||
ScheduleStableStateCallback();
|
||||
}
|
||||
@ -116,9 +116,9 @@ nsresult LSSnapshot::Init(const LSSnapshotInitInfo& aInitInfo, bool aExplicit) {
|
||||
|
||||
nsresult LSSnapshot::GetLength(uint32_t* aResult) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
MaybeScheduleStableStateCallback();
|
||||
|
||||
@ -133,9 +133,9 @@ nsresult LSSnapshot::GetLength(uint32_t* aResult) {
|
||||
|
||||
nsresult LSSnapshot::GetKey(uint32_t aIndex, nsAString& aResult) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
MaybeScheduleStableStateCallback();
|
||||
|
||||
@ -158,9 +158,9 @@ nsresult LSSnapshot::GetKey(uint32_t aIndex, nsAString& aResult) {
|
||||
|
||||
nsresult LSSnapshot::GetItem(const nsAString& aKey, nsAString& aResult) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
MaybeScheduleStableStateCallback();
|
||||
|
||||
@ -176,9 +176,9 @@ nsresult LSSnapshot::GetItem(const nsAString& aKey, nsAString& aResult) {
|
||||
|
||||
nsresult LSSnapshot::GetKeys(nsTArray<nsString>& aKeys) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
MaybeScheduleStableStateCallback();
|
||||
|
||||
@ -197,9 +197,9 @@ nsresult LSSnapshot::GetKeys(nsTArray<nsString>& aKeys) {
|
||||
nsresult LSSnapshot::SetItem(const nsAString& aKey, const nsAString& aValue,
|
||||
LSNotifyInfo& aNotifyInfo) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
MaybeScheduleStableStateCallback();
|
||||
|
||||
@ -254,9 +254,9 @@ nsresult LSSnapshot::SetItem(const nsAString& aKey, const nsAString& aValue,
|
||||
nsresult LSSnapshot::RemoveItem(const nsAString& aKey,
|
||||
LSNotifyInfo& aNotifyInfo) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
MaybeScheduleStableStateCallback();
|
||||
|
||||
@ -276,8 +276,12 @@ nsresult LSSnapshot::RemoveItem(const nsAString& aKey,
|
||||
int64_t delta = -(static_cast<int64_t>(aKey.Length()) +
|
||||
static_cast<int64_t>(oldValue.Length()));
|
||||
|
||||
DebugOnly<nsresult> rv = UpdateUsage(delta);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
nsresult rv = UpdateUsage(delta);
|
||||
MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));
|
||||
#else
|
||||
UpdateUsage(delta);
|
||||
#endif
|
||||
|
||||
if (mLoadState == LoadState::Partial) {
|
||||
mLength--;
|
||||
@ -298,16 +302,16 @@ nsresult LSSnapshot::RemoveItem(const nsAString& aKey,
|
||||
|
||||
nsresult LSSnapshot::Clear(LSNotifyInfo& aNotifyInfo) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
MaybeScheduleStableStateCallback();
|
||||
|
||||
uint32_t length;
|
||||
if (mLoadState == LoadState::Partial) {
|
||||
length = mLength;
|
||||
MOZ_ASSERT(length);
|
||||
MOZ_DIAGNOSTIC_ASSERT(length);
|
||||
|
||||
MOZ_ALWAYS_TRUE(mActor->SendLoaded());
|
||||
|
||||
@ -325,8 +329,12 @@ nsresult LSSnapshot::Clear(LSNotifyInfo& aNotifyInfo) {
|
||||
} else {
|
||||
changed = true;
|
||||
|
||||
DebugOnly<nsresult> rv = UpdateUsage(-mExactUsage);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
nsresult rv = UpdateUsage(-mExactUsage);
|
||||
MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));
|
||||
#else
|
||||
UpdateUsage(-mExactUsage);
|
||||
#endif
|
||||
|
||||
mValues.Clear();
|
||||
|
||||
@ -342,9 +350,9 @@ nsresult LSSnapshot::Clear(LSNotifyInfo& aNotifyInfo) {
|
||||
|
||||
void LSSnapshot::MarkDirty() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
if (mDirty) {
|
||||
return;
|
||||
@ -359,18 +367,18 @@ void LSSnapshot::MarkDirty() {
|
||||
|
||||
MOZ_ALWAYS_SUCCEEDS(Finish());
|
||||
} else {
|
||||
MOZ_ASSERT(!mHasPendingTimerCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mHasPendingTimerCallback);
|
||||
}
|
||||
}
|
||||
|
||||
nsresult LSSnapshot::End() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mExplicit);
|
||||
MOZ_ASSERT(!mHasPendingStableStateCallback);
|
||||
MOZ_ASSERT(!mHasPendingTimerCallback);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mExplicit);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mHasPendingStableStateCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mHasPendingTimerCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
nsresult rv = Checkpoint();
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -393,9 +401,9 @@ nsresult LSSnapshot::End() {
|
||||
|
||||
void LSSnapshot::ScheduleStableStateCallback() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mTimer);
|
||||
MOZ_ASSERT(!mExplicit);
|
||||
MOZ_ASSERT(!mHasPendingStableStateCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mTimer);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mExplicit);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mHasPendingStableStateCallback);
|
||||
|
||||
CancelTimer();
|
||||
|
||||
@ -411,7 +419,7 @@ void LSSnapshot::MaybeScheduleStableStateCallback() {
|
||||
if (!mExplicit && !mHasPendingStableStateCallback) {
|
||||
ScheduleStableStateCallback();
|
||||
} else {
|
||||
MOZ_ASSERT(!mHasPendingTimerCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mHasPendingTimerCallback);
|
||||
}
|
||||
}
|
||||
|
||||
@ -419,16 +427,16 @@ nsresult LSSnapshot::GetItemInternal(const nsAString& aKey,
|
||||
const Optional<nsString>& aValue,
|
||||
nsAString& aResult) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
nsString result;
|
||||
|
||||
switch (mLoadState) {
|
||||
case LoadState::Partial: {
|
||||
if (mValues.Get(aKey, &result)) {
|
||||
MOZ_ASSERT(!result.IsVoid());
|
||||
MOZ_DIAGNOSTIC_ASSERT(!result.IsVoid());
|
||||
} else if (mLoadedItems.GetEntry(aKey) || mUnknownItems.GetEntry(aKey)) {
|
||||
result.SetIsVoid(true);
|
||||
} else {
|
||||
@ -470,14 +478,14 @@ nsresult LSSnapshot::GetItemInternal(const nsAString& aKey,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!result.IsVoid());
|
||||
MOZ_DIAGNOSTIC_ASSERT(!result.IsVoid());
|
||||
|
||||
mLoadedItems.PutEntry(aKey);
|
||||
mValues.Put(aKey, result);
|
||||
|
||||
if (mLoadedItems.Count() == mInitLength) {
|
||||
mLoadedItems.Clear();
|
||||
MOZ_ASSERT(mLength == 0);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mLength == 0);
|
||||
mLoadState = LoadState::AllOrderedItems;
|
||||
}
|
||||
}
|
||||
@ -513,7 +521,7 @@ nsresult LSSnapshot::GetItemInternal(const nsAString& aKey,
|
||||
} else {
|
||||
if (auto entry = mValues.Lookup(aKey)) {
|
||||
result = entry.Data();
|
||||
MOZ_ASSERT(!result.IsVoid());
|
||||
MOZ_DIAGNOSTIC_ASSERT(!result.IsVoid());
|
||||
entry.Remove();
|
||||
} else {
|
||||
result.SetIsVoid(true);
|
||||
@ -521,7 +529,7 @@ nsresult LSSnapshot::GetItemInternal(const nsAString& aKey,
|
||||
}
|
||||
} else {
|
||||
if (mValues.Get(aKey, &result)) {
|
||||
MOZ_ASSERT(!result.IsVoid());
|
||||
MOZ_DIAGNOSTIC_ASSERT(!result.IsVoid());
|
||||
} else {
|
||||
result.SetIsVoid(true);
|
||||
}
|
||||
@ -540,10 +548,10 @@ nsresult LSSnapshot::GetItemInternal(const nsAString& aKey,
|
||||
|
||||
nsresult LSSnapshot::EnsureAllKeys() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_ASSERT(mLoadState != LoadState::Initial);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mLoadState != LoadState::Initial);
|
||||
|
||||
if (mLoadState == LoadState::AllOrderedKeys ||
|
||||
mLoadState == LoadState::AllOrderedItems) {
|
||||
@ -583,8 +591,8 @@ nsresult LSSnapshot::EnsureAllKeys() {
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_ASSERT_IF(mLoadState == LoadState::AllUnorderedItems,
|
||||
newValues.Count() == mValues.Count());
|
||||
MOZ_DIAGNOSTIC_ASSERT_IF(mLoadState == LoadState::AllUnorderedItems,
|
||||
newValues.Count() == mValues.Count());
|
||||
|
||||
for (auto iter = newValues.Iter(); !iter.Done(); iter.Next()) {
|
||||
nsString value;
|
||||
@ -600,10 +608,10 @@ nsresult LSSnapshot::EnsureAllKeys() {
|
||||
mLength = 0;
|
||||
mLoadState = LoadState::AllOrderedKeys;
|
||||
} else {
|
||||
MOZ_ASSERT(mLoadState == LoadState::AllUnorderedItems);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mLoadState == LoadState::AllUnorderedItems);
|
||||
|
||||
MOZ_ASSERT(mUnknownItems.Count() == 0);
|
||||
MOZ_ASSERT(mLength == 0);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mUnknownItems.Count() == 0);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mLength == 0);
|
||||
mLoadState = LoadState::AllOrderedItems;
|
||||
}
|
||||
|
||||
@ -612,11 +620,11 @@ nsresult LSSnapshot::EnsureAllKeys() {
|
||||
|
||||
nsresult LSSnapshot::UpdateUsage(int64_t aDelta) {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mDatabase);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mPeakUsage >= mExactUsage);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mDatabase);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mPeakUsage >= mExactUsage);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
int64_t newExactUsage = mExactUsage + aDelta;
|
||||
if (newExactUsage > mPeakUsage) {
|
||||
@ -628,7 +636,7 @@ nsresult LSSnapshot::UpdateUsage(int64_t aDelta) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(size >= 0);
|
||||
MOZ_DIAGNOSTIC_ASSERT(size >= 0);
|
||||
|
||||
if (size == 0) {
|
||||
return NS_ERROR_FILE_NO_DEVICE_SPACE;
|
||||
@ -643,9 +651,9 @@ nsresult LSSnapshot::UpdateUsage(int64_t aDelta) {
|
||||
|
||||
nsresult LSSnapshot::Checkpoint() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
if (!mWriteInfos.IsEmpty()) {
|
||||
MOZ_ALWAYS_TRUE(mActor->SendCheckpoint(mWriteInfos));
|
||||
@ -658,21 +666,21 @@ nsresult LSSnapshot::Checkpoint() {
|
||||
|
||||
nsresult LSSnapshot::Finish() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mDatabase);
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_ASSERT(mInitialized);
|
||||
MOZ_ASSERT(!mSentFinish);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mDatabase);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mInitialized);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mSentFinish);
|
||||
|
||||
MOZ_ALWAYS_TRUE(mActor->SendFinish());
|
||||
|
||||
mDatabase->NoteFinishedSnapshot(this);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mSentFinish = true;
|
||||
#endif
|
||||
|
||||
// Clear the self reference added in Init method.
|
||||
MOZ_ASSERT(mSelfRef);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mSelfRef);
|
||||
mSelfRef = nullptr;
|
||||
|
||||
return NS_OK;
|
||||
@ -680,7 +688,7 @@ nsresult LSSnapshot::Finish() {
|
||||
|
||||
void LSSnapshot::CancelTimer() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mTimer);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mTimer);
|
||||
|
||||
if (mHasPendingTimerCallback) {
|
||||
MOZ_ALWAYS_SUCCEEDS(mTimer->Cancel());
|
||||
@ -690,14 +698,14 @@ void LSSnapshot::CancelTimer() {
|
||||
|
||||
// static
|
||||
void LSSnapshot::TimerCallback(nsITimer* aTimer, void* aClosure) {
|
||||
MOZ_ASSERT(aTimer);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aTimer);
|
||||
|
||||
auto* self = static_cast<LSSnapshot*>(aClosure);
|
||||
MOZ_ASSERT(self);
|
||||
MOZ_ASSERT(self->mTimer);
|
||||
MOZ_ASSERT(SameCOMIdentity(self->mTimer, aTimer));
|
||||
MOZ_ASSERT(!self->mHasPendingStableStateCallback);
|
||||
MOZ_ASSERT(self->mHasPendingTimerCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(self);
|
||||
MOZ_DIAGNOSTIC_ASSERT(self->mTimer);
|
||||
MOZ_DIAGNOSTIC_ASSERT(SameCOMIdentity(self->mTimer, aTimer));
|
||||
MOZ_DIAGNOSTIC_ASSERT(!self->mHasPendingStableStateCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(self->mHasPendingTimerCallback);
|
||||
|
||||
self->mHasPendingTimerCallback = false;
|
||||
|
||||
@ -709,9 +717,9 @@ NS_IMPL_ISUPPORTS(LSSnapshot, nsIRunnable)
|
||||
NS_IMETHODIMP
|
||||
LSSnapshot::Run() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(!mExplicit);
|
||||
MOZ_ASSERT(mHasPendingStableStateCallback);
|
||||
MOZ_ASSERT(!mHasPendingTimerCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mExplicit);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mHasPendingStableStateCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mHasPendingTimerCallback);
|
||||
|
||||
mHasPendingStableStateCallback = false;
|
||||
|
||||
@ -720,7 +728,7 @@ LSSnapshot::Run() {
|
||||
if (mDirty || !Preferences::GetBool("dom.storage.snapshot_reusing")) {
|
||||
MOZ_ALWAYS_SUCCEEDS(Finish());
|
||||
} else if (!mExplicit) {
|
||||
MOZ_ASSERT(mTimer);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mTimer);
|
||||
|
||||
MOZ_ALWAYS_SUCCEEDS(mTimer->InitWithNamedFuncCallback(
|
||||
TimerCallback, this, kSnapshotTimeoutMs, nsITimer::TYPE_ONE_SHOT,
|
||||
|
@ -91,7 +91,7 @@ class LSSnapshot final : public nsIRunnable {
|
||||
bool mHasPendingTimerCallback;
|
||||
bool mDirty;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
bool mInitialized;
|
||||
bool mSentFinish;
|
||||
#endif
|
||||
@ -105,7 +105,7 @@ class LSSnapshot final : public nsIRunnable {
|
||||
|
||||
void ClearActor() {
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mActor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
|
||||
mActor = nullptr;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ bool NextGenLocalStorageEnabled() {
|
||||
}
|
||||
|
||||
bool CachedNextGenLocalStorageEnabled() {
|
||||
MOZ_ASSERT(gNextGenLocalStorageEnabled != -1);
|
||||
MOZ_DIAGNOSTIC_ASSERT(gNextGenLocalStorageEnabled != -1);
|
||||
|
||||
return !!gNextGenLocalStorageEnabled;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class SimpleRequestResolver final : public LSSimpleRequestChildCallback {
|
||||
|
||||
nsresult CreatePromise(JSContext* aContext, Promise** aPromise) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aContext);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aContext);
|
||||
|
||||
nsIGlobalObject* global =
|
||||
xpc::NativeGlobal(JS::CurrentGlobalOrNull(aContext));
|
||||
@ -75,7 +75,7 @@ nsresult CreatePromise(JSContext* aContext, Promise** aPromise) {
|
||||
nsresult CheckedPrincipalToPrincipalInfo(nsIPrincipal* aPrincipal,
|
||||
PrincipalInfo& aPrincipalInfo) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aPrincipal);
|
||||
|
||||
nsresult rv = PrincipalToPrincipalInfo(aPrincipal, &aPrincipalInfo);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
@ -98,7 +98,7 @@ nsresult CheckedPrincipalToPrincipalInfo(nsIPrincipal* aPrincipal,
|
||||
|
||||
LocalStorageManager2::LocalStorageManager2() {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(NextGenLocalStorageEnabled());
|
||||
MOZ_DIAGNOSTIC_ASSERT(NextGenLocalStorageEnabled());
|
||||
}
|
||||
|
||||
LocalStorageManager2::~LocalStorageManager2() { MOZ_ASSERT(NS_IsMainThread()); }
|
||||
@ -110,8 +110,8 @@ NS_IMETHODIMP
|
||||
LocalStorageManager2::PrecacheStorage(nsIPrincipal* aPrincipal,
|
||||
Storage** _retval) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
MOZ_ASSERT(_retval);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aPrincipal);
|
||||
MOZ_DIAGNOSTIC_ASSERT(_retval);
|
||||
|
||||
// This method was created as part of the e10s-ification of the old LS
|
||||
// implementation to perform a preload in the content/current process. That's
|
||||
@ -127,8 +127,8 @@ LocalStorageManager2::CreateStorage(mozIDOMWindow* aWindow,
|
||||
const nsAString& aDocumentURI,
|
||||
bool aPrivate, Storage** _retval) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
MOZ_ASSERT(_retval);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aPrincipal);
|
||||
MOZ_DIAGNOSTIC_ASSERT(_retval);
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowInner> inner = nsPIDOMWindowInner::From(aWindow);
|
||||
|
||||
@ -148,8 +148,8 @@ LocalStorageManager2::GetStorage(mozIDOMWindow* aWindow,
|
||||
nsIPrincipal* aPrincipal, bool aPrivate,
|
||||
Storage** _retval) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
MOZ_ASSERT(_retval);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aPrincipal);
|
||||
MOZ_DIAGNOSTIC_ASSERT(_retval);
|
||||
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
@ -157,7 +157,7 @@ LocalStorageManager2::GetStorage(mozIDOMWindow* aWindow,
|
||||
NS_IMETHODIMP
|
||||
LocalStorageManager2::CloneStorage(Storage* aStorageToCloneFrom) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aStorageToCloneFrom);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aStorageToCloneFrom);
|
||||
|
||||
// Cloning is specific to sessionStorage; state is forked when a new tab is
|
||||
// opened from an existing tab.
|
||||
@ -168,9 +168,9 @@ NS_IMETHODIMP
|
||||
LocalStorageManager2::CheckStorage(nsIPrincipal* aPrincipal, Storage* aStorage,
|
||||
bool* _retval) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
MOZ_ASSERT(aStorage);
|
||||
MOZ_ASSERT(_retval);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aPrincipal);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aStorage);
|
||||
MOZ_DIAGNOSTIC_ASSERT(_retval);
|
||||
|
||||
// Only used by sessionStorage.
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
@ -179,7 +179,7 @@ LocalStorageManager2::CheckStorage(nsIPrincipal* aPrincipal, Storage* aStorage,
|
||||
NS_IMETHODIMP
|
||||
LocalStorageManager2::GetNextGenLocalStorageEnabled(bool* aResult) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aResult);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aResult);
|
||||
|
||||
*aResult = NextGenLocalStorageEnabled();
|
||||
return NS_OK;
|
||||
@ -189,8 +189,8 @@ NS_IMETHODIMP
|
||||
LocalStorageManager2::Preload(nsIPrincipal* aPrincipal, JSContext* aContext,
|
||||
nsISupports** _retval) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
MOZ_ASSERT(_retval);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aPrincipal);
|
||||
MOZ_DIAGNOSTIC_ASSERT(_retval);
|
||||
|
||||
nsCString originAttrSuffix;
|
||||
nsCString originKey;
|
||||
@ -233,8 +233,8 @@ NS_IMETHODIMP
|
||||
LocalStorageManager2::IsPreloaded(nsIPrincipal* aPrincipal, JSContext* aContext,
|
||||
nsISupports** _retval) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
MOZ_ASSERT(_retval);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aPrincipal);
|
||||
MOZ_DIAGNOSTIC_ASSERT(_retval);
|
||||
|
||||
RefPtr<Promise> promise;
|
||||
nsresult rv = CreatePromise(aContext, getter_AddRefs(promise));
|
||||
@ -282,7 +282,7 @@ nsresult LocalStorageManager2::StartRequest(Promise* aPromise,
|
||||
nsresult LocalStorageManager2::StartSimpleRequest(
|
||||
Promise* aPromise, const LSSimpleRequestParams& aParams) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aPromise);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aPromise);
|
||||
|
||||
PBackgroundChild* backgroundActor =
|
||||
BackgroundChild::GetOrCreateForCurrentThread();
|
||||
@ -340,14 +340,14 @@ void RequestResolver::OnResponse(const LSRequestResponse& aResponse) {
|
||||
|
||||
void SimpleRequestResolver::HandleResponse(nsresult aResponse) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(mPromise);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mPromise);
|
||||
|
||||
mPromise->MaybeReject(aResponse);
|
||||
}
|
||||
|
||||
void SimpleRequestResolver::HandleResponse(bool aResponse) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(mPromise);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mPromise);
|
||||
|
||||
mPromise->MaybeResolve(aResponse);
|
||||
}
|
||||
|
@ -1,595 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
D2669E901AD6EC830027914D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D2669E8E1AD6EC830027914D /* Main.storyboard */; };
|
||||
D2669E921AD6EC830027914D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D2669E911AD6EC830027914D /* Images.xcassets */; };
|
||||
D2669E951AD6EC830027914D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D2669E931AD6EC830027914D /* LaunchScreen.xib */; };
|
||||
D2C9CF2E1AA4960F0041BE29 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = D2C9CF2D1AA4960F0041BE29 /* main.mm */; };
|
||||
D2C9CF311AA4960F0041BE29 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D2C9CF301AA4960F0041BE29 /* AppDelegate.m */; };
|
||||
D2C9CF341AA4960F0041BE29 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2C9CF331AA4960F0041BE29 /* ViewController.m */; };
|
||||
D2C9CF371AA4960F0041BE29 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D2C9CF351AA4960F0041BE29 /* Main.storyboard */; };
|
||||
D2C9CF391AA4960F0041BE29 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D2C9CF381AA4960F0041BE29 /* Images.xcassets */; };
|
||||
D2C9CF3C1AA4960F0041BE29 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D2C9CF3A1AA4960F0041BE29 /* LaunchScreen.xib */; };
|
||||
D2C9CF521AA4A23A0041BE29 /* browser in Resources */ = {isa = PBXBuildFile; fileRef = D2C9CF511AA4A23A0041BE29 /* browser */; };
|
||||
D2CA73561ADDE3F10022A192 /* shell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D2CA73551ADDE3F10022A192 /* shell.cpp */; };
|
||||
D2CA73591ADDEBAB0022A192 /* dirs.m in Sources */ = {isa = PBXBuildFile; fileRef = D2CA73581ADDEBAB0022A192 /* dirs.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
D2669EA81AD6ECFC0027914D /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D2C9CF201AA4960F0041BE29 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D2C9CF271AA4960F0041BE29;
|
||||
remoteInfo = GeckoEmbed;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
D20C8D111ADDD6E600CE4BC8 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D20C8D121ADDD87C00CE4BC8 /* libmozglue.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmozglue.dylib; path = "../../../../debug-mozilla-central/mozglue/build/libmozglue.dylib"; sourceTree = "<group>"; };
|
||||
D2669E821AD6EC830027914D /* js.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = js.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D2669E851AD6EC830027914D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D2669E8F1AD6EC830027914D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
D2669E911AD6EC830027914D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
D2669E941AD6EC830027914D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
|
||||
D2C9CF281AA4960F0041BE29 /* GeckoEmbed.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GeckoEmbed.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D2C9CF2C1AA4960F0041BE29 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D2C9CF2D1AA4960F0041BE29 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
|
||||
D2C9CF2F1AA4960F0041BE29 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
D2C9CF301AA4960F0041BE29 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
D2C9CF321AA4960F0041BE29 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
||||
D2C9CF331AA4960F0041BE29 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
||||
D2C9CF361AA4960F0041BE29 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
D2C9CF381AA4960F0041BE29 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
D2C9CF3B1AA4960F0041BE29 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
|
||||
D2C9CF511AA4A23A0041BE29 /* browser */ = {isa = PBXFileReference; lastKnownFileType = folder; path = browser; sourceTree = "<group>"; };
|
||||
D2C9CF541AA4A26E0041BE29 /* libxpcomglue.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libxpcomglue.a; path = "../../../../../iphone-simulator-debug/xpcom/glue/standalone/libxpcomglue.a"; sourceTree = "<group>"; };
|
||||
D2CA73551ADDE3F10022A192 /* shell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shell.cpp; sourceTree = "<group>"; };
|
||||
D2CA73581ADDEBAB0022A192 /* dirs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = dirs.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D2669E7F1AD6EC830027914D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D2C9CF251AA4960F0041BE29 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
D2669E831AD6EC830027914D /* js */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2669E8E1AD6EC830027914D /* Main.storyboard */,
|
||||
D2669E911AD6EC830027914D /* Images.xcassets */,
|
||||
D2669E931AD6EC830027914D /* LaunchScreen.xib */,
|
||||
D2669E841AD6EC830027914D /* Supporting Files */,
|
||||
D2CA73551ADDE3F10022A192 /* shell.cpp */,
|
||||
D2CA73581ADDEBAB0022A192 /* dirs.m */,
|
||||
);
|
||||
path = js;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2669E841AD6EC830027914D /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2669E851AD6EC830027914D /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2C9CF1F1AA4960F0041BE29 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D20C8D121ADDD87C00CE4BC8 /* libmozglue.dylib */,
|
||||
D2C9CF2A1AA4960F0041BE29 /* GeckoEmbed */,
|
||||
D2669E831AD6EC830027914D /* js */,
|
||||
D2C9CF291AA4960F0041BE29 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2C9CF291AA4960F0041BE29 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2C9CF281AA4960F0041BE29 /* GeckoEmbed.app */,
|
||||
D2669E821AD6EC830027914D /* js.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2C9CF2A1AA4960F0041BE29 /* GeckoEmbed */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2C9CF541AA4A26E0041BE29 /* libxpcomglue.a */,
|
||||
D2C9CF511AA4A23A0041BE29 /* browser */,
|
||||
D2C9CF2D1AA4960F0041BE29 /* main.mm */,
|
||||
D2C9CF2F1AA4960F0041BE29 /* AppDelegate.h */,
|
||||
D2C9CF301AA4960F0041BE29 /* AppDelegate.m */,
|
||||
D2C9CF321AA4960F0041BE29 /* ViewController.h */,
|
||||
D2C9CF331AA4960F0041BE29 /* ViewController.m */,
|
||||
D2C9CF351AA4960F0041BE29 /* Main.storyboard */,
|
||||
D2C9CF381AA4960F0041BE29 /* Images.xcassets */,
|
||||
D2C9CF3A1AA4960F0041BE29 /* LaunchScreen.xib */,
|
||||
D2C9CF2B1AA4960F0041BE29 /* Supporting Files */,
|
||||
);
|
||||
path = GeckoEmbed;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2C9CF2B1AA4960F0041BE29 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2C9CF2C1AA4960F0041BE29 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D2669E811AD6EC830027914D /* js */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D2669EA61AD6EC830027914D /* Build configuration list for PBXNativeTarget "js" */;
|
||||
buildPhases = (
|
||||
D20C8D141ADDD97100CE4BC8 /* Sources */,
|
||||
D2669E7F1AD6EC830027914D /* Frameworks */,
|
||||
D2669E801AD6EC830027914D /* Resources */,
|
||||
D20C8D111ADDD6E600CE4BC8 /* CopyFiles */,
|
||||
D2CA73571ADDEA7A0022A192 /* Run Script */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
D2669EA91AD6ECFC0027914D /* PBXTargetDependency */,
|
||||
);
|
||||
name = js;
|
||||
productName = js;
|
||||
productReference = D2669E821AD6EC830027914D /* js.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
D2C9CF271AA4960F0041BE29 /* GeckoEmbed */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D2C9CF4B1AA4960F0041BE29 /* Build configuration list for PBXNativeTarget "GeckoEmbed" */;
|
||||
buildPhases = (
|
||||
D2C9CF5D1AA4A6D80041BE29 /* Run Script */,
|
||||
D2C9CF241AA4960F0041BE29 /* Sources */,
|
||||
D2C9CF251AA4960F0041BE29 /* Frameworks */,
|
||||
D2C9CF261AA4960F0041BE29 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = GeckoEmbed;
|
||||
productName = GeckoEmbed;
|
||||
productReference = D2C9CF281AA4960F0041BE29 /* GeckoEmbed.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D2C9CF201AA4960F0041BE29 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = Mozilla;
|
||||
TargetAttributes = {
|
||||
D2669E811AD6EC830027914D = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
D2C9CF271AA4960F0041BE29 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D2C9CF231AA4960F0041BE29 /* Build configuration list for PBXProject "GeckoEmbed" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = D2C9CF1F1AA4960F0041BE29;
|
||||
productRefGroup = D2C9CF291AA4960F0041BE29 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D2C9CF271AA4960F0041BE29 /* GeckoEmbed */,
|
||||
D2669E811AD6EC830027914D /* js */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
D2669E801AD6EC830027914D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D2669E901AD6EC830027914D /* Main.storyboard in Resources */,
|
||||
D2669E951AD6EC830027914D /* LaunchScreen.xib in Resources */,
|
||||
D2669E921AD6EC830027914D /* Images.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D2C9CF261AA4960F0041BE29 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D2C9CF371AA4960F0041BE29 /* Main.storyboard in Resources */,
|
||||
D2C9CF3C1AA4960F0041BE29 /* LaunchScreen.xib in Resources */,
|
||||
D2C9CF391AA4960F0041BE29 /* Images.xcassets in Resources */,
|
||||
D2C9CF521AA4A23A0041BE29 /* browser in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
D2C9CF5D1AA4A6D80041BE29 /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/bash;
|
||||
shellScript = "${SRCROOT}/build-gecko.sh";
|
||||
};
|
||||
D2CA73571ADDEA7A0022A192 /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "${SRCROOT}/copy-jsshell.sh";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D20C8D141ADDD97100CE4BC8 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D2CA73561ADDE3F10022A192 /* shell.cpp in Sources */,
|
||||
D2CA73591ADDEBAB0022A192 /* dirs.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D2C9CF241AA4960F0041BE29 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D2C9CF341AA4960F0041BE29 /* ViewController.m in Sources */,
|
||||
D2C9CF311AA4960F0041BE29 /* AppDelegate.m in Sources */,
|
||||
D2C9CF2E1AA4960F0041BE29 /* main.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
D2669EA91AD6ECFC0027914D /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D2C9CF271AA4960F0041BE29 /* GeckoEmbed */;
|
||||
targetProxy = D2669EA81AD6ECFC0027914D /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
D2669E8E1AD6EC830027914D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
D2669E8F1AD6EC830027914D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2669E931AD6EC830027914D /* LaunchScreen.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
D2669E941AD6EC830027914D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2C9CF351AA4960F0041BE29 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
D2C9CF361AA4960F0041BE29 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2C9CF3A1AA4960F0041BE29 /* LaunchScreen.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
D2C9CF3B1AA4960F0041BE29 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
D2669EA21AD6EC830027914D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"IMPL_MFBT=1",
|
||||
"EXPORT_JS_API=1",
|
||||
"DEBUG=1",
|
||||
"MOZILLA_CLIENT=1",
|
||||
);
|
||||
INFOPLIST_FILE = js/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(GECKO_OBJDIR)/config/external/nss",
|
||||
"$(GECKO_OBJDIR)/mozglue/build",
|
||||
"$(GECKO_OBJDIR)/js/src",
|
||||
"$(GECKO_OBJDIR)/js/src/editline",
|
||||
);
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"$(OTHER_CFLAGS)",
|
||||
"-include",
|
||||
"$(GECKO_OBJDIR)/js/src/js-confdefs.h",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ljs_static",
|
||||
"-lmozglue",
|
||||
"-lnss3",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "$(GECKO_OBJDIR)/dist/include/nspr $(GECKO_OBJDIR)/dist/include $(SRCROOT)/../../../js/src $(SRCROOT)/../../../js/src/shell $(SRCROOT)/../../../js/src/editline";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D2669EA31AD6EC830027914D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"IMPL_MFBT=1",
|
||||
"EXPORT_JS_API=1",
|
||||
"MOZILLA_CLIENT=1",
|
||||
);
|
||||
INFOPLIST_FILE = js/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(GECKO_OBJDIR)/config/external/nss",
|
||||
"$(GECKO_OBJDIR)/mozglue/build",
|
||||
"$(GECKO_OBJDIR)/js/src",
|
||||
"$(GECKO_OBJDIR)/js/src/editline",
|
||||
);
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"$(OTHER_CFLAGS)",
|
||||
"-include",
|
||||
"$(GECKO_OBJDIR)/js/src/js-confdefs.h",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ljs_static",
|
||||
"-lmozglue",
|
||||
"-lnss3",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "$(GECKO_OBJDIR)/dist/include/nspr $(GECKO_OBJDIR)/dist/include $(SRCROOT)/../../../js/src $(SRCROOT)/../../../js/src/shell $(SRCROOT)/../../../js/src/editline";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D2C9CF491AA4960F0041BE29 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
"ARCHS[sdk=iphoneos*]" = armv7;
|
||||
"ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GECKO_OBJDIR = "";
|
||||
"GECKO_OBJDIR[sdk=iphoneos*]" = "$(SRCROOT)/../../../../iphone-device-debug/";
|
||||
"GECKO_OBJDIR[sdk=iphonesimulator*]" = "$(SRCROOT)/../../../../iphone-simulator-debug/";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D2C9CF4A1AA4960F0041BE29 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
"ARCHS[sdk=iphoneos*]" = armv7;
|
||||
"ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GECKO_OBJDIR = "";
|
||||
"GECKO_OBJDIR[sdk=iphoneos*]" = "$(SRCROOT)/../../../../iphone-device-opt/";
|
||||
"GECKO_OBJDIR[sdk=iphonesimulator*]" = "$(SRCROOT)/../../../../iphone-simulator-opt/";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D2C9CF4C1AA4960F0041BE29 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
"ARCHS[sdk=iphoneos*]" = armv7;
|
||||
"ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
GECKO_OBJDIR = "";
|
||||
"GECKO_OBJDIR[sdk=iphoneos*]" = "$(SRCROOT)/../../../../iphone-device-debug/";
|
||||
"GECKO_OBJDIR[sdk=iphonesimulator*]" = "$(SRCROOT)/../../../../iphone-simulator-debug/";
|
||||
INFOPLIST_FILE = GeckoEmbed/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(GECKO_OBJDIR)/dist/lib",
|
||||
"$(GECKO_OBJDIR)/mozglue/build",
|
||||
"$(GECKO_OBJDIR)/xpcom/glue/standalone",
|
||||
);
|
||||
OTHER_CODE_SIGN_FLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"$(GECKO_OBJDIR)/xpcom/glue/standalone/libxpcomglue.a",
|
||||
"$(GECKO_OBJDIR)/mozglue/build/libmozglue.dylib",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "$(GECKO_OBJDIR)/dist/include $(GECKO_OBJDIR)/dist/include/nspr";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D2C9CF4D1AA4960F0041BE29 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
"ARCHS[sdk=iphoneos*]" = armv7;
|
||||
"ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
GECKO_OBJDIR = "";
|
||||
"GECKO_OBJDIR[sdk=iphoneos*]" = "$(SRCROOT)/../../../../iphone-device-opt/";
|
||||
"GECKO_OBJDIR[sdk=iphonesimulator*]" = "$(SRCROOT)/../../../../iphone-simulator-opt/";
|
||||
INFOPLIST_FILE = GeckoEmbed/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(GECKO_OBJDIR)/dist/lib",
|
||||
"$(GECKO_OBJDIR)/mozglue/build",
|
||||
"$(GECKO_OBJDIR)/xpcom/glue/standalone",
|
||||
);
|
||||
OTHER_CODE_SIGN_FLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"$(GECKO_OBJDIR)/xpcom/glue/standalone/libxpcomglue.a",
|
||||
"$(GECKO_OBJDIR)/mozglue/build/libmozglue.dylib",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "$(GECKO_OBJDIR)/dist/include $(GECKO_OBJDIR)/dist/include/nspr";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
D2669EA61AD6EC830027914D /* Build configuration list for PBXNativeTarget "js" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D2669EA21AD6EC830027914D /* Debug */,
|
||||
D2669EA31AD6EC830027914D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D2C9CF231AA4960F0041BE29 /* Build configuration list for PBXProject "GeckoEmbed" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D2C9CF491AA4960F0041BE29 /* Debug */,
|
||||
D2C9CF4A1AA4960F0041BE29 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D2C9CF4B1AA4960F0041BE29 /* Build configuration list for PBXNativeTarget "GeckoEmbed" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D2C9CF4C1AA4960F0041BE29 /* Debug */,
|
||||
D2C9CF4D1AA4960F0041BE29 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D2C9CF201AA4960F0041BE29 /* Project object */;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:GeckoEmbed.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -1,15 +0,0 @@
|
||||
//
|
||||
// AppDelegate.h
|
||||
// GeckoEmbed
|
||||
//
|
||||
// Created by Ted Mielczarek on 3/2/15.
|
||||
// Copyright (c) 2015 Mozilla. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property(strong, nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
@ -1,53 +0,0 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// GeckoEmbed
|
||||
//
|
||||
// Created by Ted Mielczarek on 3/2/15.
|
||||
// Copyright (c) 2015 Mozilla. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application
|
||||
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
// Override point for customization after application launch.
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application {
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for
|
||||
// certain types of temporary interruptions (such as an incoming phone call or SMS message) or
|
||||
// when the user quits the application and it begins the transition to the background state. Use
|
||||
// this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates.
|
||||
// Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store
|
||||
// enough application state information to restore your application to its current state in case
|
||||
// it is terminated later. If your application supports background execution, this method is
|
||||
// called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
// Called as part of the transition from the background to the inactive state; here you can undo
|
||||
// many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If
|
||||
// the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also
|
||||
// applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
@end
|
@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Mozilla. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GeckoEmbed" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
||||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="548" y="455"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -1,68 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
@ -1,13 +0,0 @@
|
||||
//
|
||||
// ViewController.h
|
||||
// GeckoEmbed
|
||||
//
|
||||
// Created by Ted Mielczarek on 3/2/15.
|
||||
// Copyright (c) 2015 Mozilla. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ViewController : UIViewController
|
||||
|
||||
@end
|
@ -1,27 +0,0 @@
|
||||
//
|
||||
// ViewController.m
|
||||
// GeckoEmbed
|
||||
//
|
||||
// Created by Ted Mielczarek on 3/2/15.
|
||||
// Copyright (c) 2015 Mozilla. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ViewController.h"
|
||||
|
||||
@interface ViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
@end
|
@ -1,10 +0,0 @@
|
||||
[App]
|
||||
Vendor=Mozilla
|
||||
Name=browser
|
||||
Version=1.0
|
||||
BuildID=20150209
|
||||
ID=browser@mozilla.org
|
||||
|
||||
[Gecko]
|
||||
MinVersion=34
|
||||
MaxVersion=1000
|
@ -1 +0,0 @@
|
||||
content mybrowser file:chrome/content/
|
@ -1,8 +0,0 @@
|
||||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
addEventListener("DOMContentLoaded", function loaded() {
|
||||
removeEventListener("DOMContentLoaded", loaded);
|
||||
var b = document.getElementById("browser");
|
||||
Services.obs.notifyObservers(b.docShell,
|
||||
"geckoembed-browser-loaded");
|
||||
b.loadURI("http://people.mozilla.org/~tmielczarek/iosstart.html");
|
||||
});
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
|
||||
<window title="browser"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
sizemode="maximized"
|
||||
flex="1">
|
||||
<browser type="content" src="http://mozilla.org/" flex="1"/>
|
||||
</window>
|
@ -1,4 +0,0 @@
|
||||
pref("toolkit.defaultChromeURI", "chrome://mybrowser/content/hello.xul");
|
||||
pref("browser.dom.window.dump.enabled", true);
|
||||
pref("devtools.console.stdout.chrome", true);
|
||||
pref("dom.max_script_run_time", 0);
|
@ -1,93 +0,0 @@
|
||||
//
|
||||
// main.m
|
||||
// XulRunner
|
||||
//
|
||||
// Created by Ted Mielczarek on 2/9/15.
|
||||
// Copyright (c) 2015 Mozilla. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#include "mozilla-config.h"
|
||||
#define XPCOM_GLUE 1
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "nsXPCOMGlue.h"
|
||||
#include "nsXREAppData.h"
|
||||
#include "mozilla/AppData.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
static const nsXREAppData sAppData = {sizeof(nsXREAppData),
|
||||
nullptr, // directory
|
||||
"Mozilla",
|
||||
"Browser",
|
||||
nullptr,
|
||||
"38.0a1",
|
||||
"201502090123",
|
||||
"browser@mozilla.org",
|
||||
nullptr, // copyright
|
||||
0,
|
||||
nullptr, // xreDirectory
|
||||
"38.0a1",
|
||||
"*",
|
||||
"https://crash-reports.mozilla.com/submit",
|
||||
nullptr,
|
||||
"Firefox"};
|
||||
|
||||
XRE_GetFileFromPathType XRE_GetFileFromPath;
|
||||
XRE_CreateAppDataType XRE_CreateAppData;
|
||||
XRE_FreeAppDataType XRE_FreeAppData;
|
||||
XRE_mainType XRE_main;
|
||||
|
||||
static const nsDynamicFunctionLoad kXULFuncs[] = {
|
||||
{"XRE_GetFileFromPath", (NSFuncPtr*)&XRE_GetFileFromPath},
|
||||
{"XRE_CreateAppData", (NSFuncPtr*)&XRE_CreateAppData},
|
||||
{"XRE_FreeAppData", (NSFuncPtr*)&XRE_FreeAppData},
|
||||
{"XRE_main", (NSFuncPtr*)&XRE_main},
|
||||
{nullptr, nullptr}};
|
||||
|
||||
const int MAXPATHLEN = 1024;
|
||||
const char* XPCOM_DLL = "XUL";
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
char exeDir[MAXPATHLEN];
|
||||
NSString* bundlePath = [[NSBundle mainBundle] bundlePath];
|
||||
strncpy(exeDir, [bundlePath UTF8String], MAXPATHLEN);
|
||||
strcat(exeDir, "/Frameworks/");
|
||||
strncat(exeDir, XPCOM_DLL, MAXPATHLEN - strlen(exeDir));
|
||||
|
||||
nsresult rv = XPCOMGlueStartup(exeDir);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("Couldn't load XPCOM (0x%08x) from %s\n", rv, exeDir);
|
||||
return 255;
|
||||
}
|
||||
|
||||
rv = XPCOMGlueLoadXULFunctions(kXULFuncs);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("Couldn't load XRE functions.\n");
|
||||
return 255;
|
||||
}
|
||||
|
||||
mozilla::ScopedAppData appData(&sAppData);
|
||||
|
||||
nsCOMPtr<nsIFile> greDir;
|
||||
rv = NS_NewNativeLocalFile(nsDependentCString([bundlePath UTF8String]), true,
|
||||
getter_AddRefs(greDir));
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("Couldn't find the application directory.\n");
|
||||
return 255;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIFile> appSubdir;
|
||||
greDir->Clone(getter_AddRefs(appSubdir));
|
||||
greDir->Append(NS_LITERAL_STRING("Frameworks"));
|
||||
appSubdir->Append(NS_LITERAL_STRING("browser"));
|
||||
|
||||
mozilla::SetStrongPtr(appData.directory, static_cast<nsIFile*>(appSubdir.get()));
|
||||
greDir.forget(&appData.xreDirectory);
|
||||
|
||||
int result = XRE_main(argc, argv, &appData);
|
||||
return result;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if test "${ACTION}" != "clean"; then
|
||||
echo "Building in ${GECKO_OBJDIR}"
|
||||
make -j8 -s -C $GECKO_OBJDIR binaries
|
||||
|
||||
echo "Copying files from ${GECKO_OBJDIR}/dist/bin"
|
||||
rsync -pvtrlL --exclude "Test*" \
|
||||
--exclude "test_*" --exclude "*_unittest" \
|
||||
--exclude xulrunner \
|
||||
${GECKO_OBJDIR}/dist/bin/ $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks
|
||||
|
||||
if test ${ARCHS} == "armv7"; then
|
||||
for x in $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks/*.dylib $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks/XUL; do
|
||||
echo "Signing $x"
|
||||
/usr/bin/codesign --force --sign "${EXPANDED_CODE_SIGN_IDENTITY}" --preserve-metadata=identifier,entitlements,resource-rules $x
|
||||
done
|
||||
fi
|
||||
fi
|
@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if test -z ${GECKO_OBJDIR}; then
|
||||
echo "Error: GECKO_OBJDIR not set!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "${ACTION}" != "clean"; then
|
||||
echo "Copying files from ${GECKO_OBJDIR}/dist/bin"
|
||||
mkdir -p $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks
|
||||
cp ${GECKO_OBJDIR}/mozglue/build/libmozglue.dylib $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks
|
||||
cp ${GECKO_OBJDIR}/config/external/nss/libnss3.dylib $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks
|
||||
|
||||
if test ${ARCHS} == "armv7"; then
|
||||
for x in $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks/*.dylib; do
|
||||
echo "Signing $x"
|
||||
/usr/bin/codesign --force --sign "${EXPANDED_CODE_SIGN_IDENTITY}" --preserve-metadata=identifier,entitlements,resource-rules $x
|
||||
done
|
||||
fi
|
||||
fi
|
@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Mozilla. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="js" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
||||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="548" y="455"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -1,68 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
@ -1,11 +0,0 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
bool GetDocumentsDirectory(char* dir) {
|
||||
NSSearchPathDirectory directory = NSDocumentDirectory;
|
||||
NSArray* paths = NSSearchPathForDirectoriesInDomains(directory, NSUserDomainMask, YES);
|
||||
if ([paths count] == 0) {
|
||||
return false;
|
||||
}
|
||||
strcpy(dir, [[paths objectAtIndex:0] UTF8String]);
|
||||
return true;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
#include "OSObject.cpp"
|
||||
#include "jsoptparse.cpp"
|
||||
#define main shell_main
|
||||
#include "js.cpp"
|
||||
#undef main
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
extern "C" bool GetDocumentsDirectory(char* dir);
|
||||
|
||||
// Fake editline
|
||||
char* readline(const char* prompt) { return nullptr; }
|
||||
|
||||
void add_history(char* line) {}
|
||||
|
||||
int main(int argc, char** argv, char** envp) {
|
||||
char dir[1024];
|
||||
GetDocumentsDirectory(dir);
|
||||
chdir(dir);
|
||||
return shell_main(argc, argv, envp);
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include('/toolkit/toolkit.mozbuild')
|
||||
|
||||
if CONFIG['MOZ_EXTENSIONS']:
|
||||
DIRS += ['/extensions']
|
@ -1,29 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
installer:
|
||||
|
||||
package:
|
||||
|
||||
package-compare:
|
||||
|
||||
stage-package:
|
||||
|
||||
sdk:
|
||||
|
||||
install::
|
||||
|
||||
clean::
|
||||
|
||||
distclean::
|
||||
|
||||
source-package::
|
||||
|
||||
upload::
|
||||
|
||||
source-upload::
|
||||
|
||||
hg-bundle::
|
||||
|
||||
l10n-check::
|
@ -1,8 +0,0 @@
|
||||
#! /bin/sh
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
MOZ_APP_NAME=geckoembed
|
||||
MOZ_APP_DISPLAYNAME=GeckoEmbed
|
||||
MOZ_UPDATER=
|
@ -1,9 +0,0 @@
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
imply_option('MOZ_PLACES', True)
|
||||
imply_option('MOZ_SERVICES_HEALTHREPORT', True)
|
||||
imply_option('MOZ_SERVICES_SYNC', True)
|
@ -1,3 +0,0 @@
|
||||
with Files("**"):
|
||||
BUG_COMPONENT = ("Core", "General")
|
||||
|
34
layout/base/crashtests/1539303-iframe.html
Normal file
34
layout/base/crashtests/1539303-iframe.html
Normal file
@ -0,0 +1,34 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
LI {
|
||||
min-width: max-content;
|
||||
column-count: 72;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function start () {
|
||||
document.getElementById('ul').animate({
|
||||
'scrollSnapPointsY': ['repeat(2vh', ''],
|
||||
'paddingInlineStart': ['25in', '']
|
||||
}, {
|
||||
delay: 2,
|
||||
fill: 'both',
|
||||
})
|
||||
document.getElementById('ul').scrollIntoView(false)
|
||||
}
|
||||
// reload once
|
||||
if (location.hash == "") {
|
||||
location.hash = "#hello";
|
||||
setTimeout('location.reload()', 0)
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', start)
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<ul id="ul">
|
||||
<li></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
13
layout/base/crashtests/1539303.html
Normal file
13
layout/base/crashtests/1539303.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<script>
|
||||
function run() {
|
||||
let iframe = document.querySelector("iframe");
|
||||
iframe.contentDocument.body.offsetHeight;
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<iframe src="1539303-iframe.html" onload="run()">
|
||||
</iframe>
|
||||
</body>
|
@ -563,3 +563,4 @@ pref(layout.css.column-span.enabled,true) load 1524382.html
|
||||
pref(layout.css.column-span.enabled,true) load 1533885.html
|
||||
pref(layout.css.column-span.enabled,true) load 1534146.html
|
||||
pref(layout.css.column-span.enabled,true) load 1539017.html
|
||||
load 1539303.html
|
||||
|
@ -830,13 +830,6 @@ marquee[direction="up"], marquee[direction="down"] {
|
||||
block-size: 200px;
|
||||
}
|
||||
|
||||
/* PRINT ONLY rules follow */
|
||||
@media print {
|
||||
|
||||
marquee { -moz-binding: none; }
|
||||
|
||||
}
|
||||
|
||||
/* Ruby */
|
||||
|
||||
ruby {
|
||||
|
@ -19,5 +19,5 @@ origin:
|
||||
license: "ISC"
|
||||
|
||||
# update.sh will update this value
|
||||
release: "3afc3350063ce1d68bbd0287fde4f70b4803d2eb (2019-02-13 10:28:58 +1300)"
|
||||
release: "66d9c48d916f00c396482f9c5075feacc2bc0db8 (2019-04-03 12:41:20 +0300)"
|
||||
|
||||
|
@ -303,7 +303,7 @@ cubeb_stream_init(cubeb * context, cubeb_stream ** stream, char const * stream_n
|
||||
{
|
||||
int r;
|
||||
|
||||
if (!context || !stream) {
|
||||
if (!context || !stream || !data_callback || !state_callback) {
|
||||
return CUBEB_ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ enum device_flags {
|
||||
};
|
||||
|
||||
void audiounit_stream_stop_internal(cubeb_stream * stm);
|
||||
void audiounit_stream_start_internal(cubeb_stream * stm);
|
||||
static int audiounit_stream_start_internal(cubeb_stream * stm);
|
||||
static void audiounit_close_stream(cubeb_stream *stm);
|
||||
static int audiounit_setup_stream(cubeb_stream *stm);
|
||||
static vector<AudioObjectID>
|
||||
@ -139,7 +139,7 @@ struct cubeb {
|
||||
// Store list of devices to detect changes
|
||||
vector<AudioObjectID> input_device_array;
|
||||
vector<AudioObjectID> output_device_array;
|
||||
// The queue is asynchronously deallocated once all references to it are released
|
||||
// The queue should be released when it’s no longer needed.
|
||||
dispatch_queue_t serial_queue = dispatch_queue_create(DISPATCH_QUEUE_LABEL, DISPATCH_QUEUE_SERIAL);
|
||||
// Current used channel layout
|
||||
atomic<cubeb_channel_layout> layout{ CUBEB_LAYOUT_UNDEFINED };
|
||||
@ -854,7 +854,10 @@ audiounit_reinit_stream(cubeb_stream * stm, device_flags_value flags)
|
||||
|
||||
// If the stream was running, start it again.
|
||||
if (!stm->shutdown) {
|
||||
audiounit_stream_start_internal(stm);
|
||||
r = audiounit_stream_start_internal(stm);
|
||||
if (r != CUBEB_OK) {
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
return CUBEB_OK;
|
||||
@ -1432,6 +1435,8 @@ audiounit_destroy(cubeb * ctx)
|
||||
}
|
||||
}
|
||||
|
||||
dispatch_release(ctx->serial_queue);
|
||||
|
||||
delete ctx;
|
||||
}
|
||||
|
||||
@ -1681,6 +1686,9 @@ audiounit_create_blank_aggregate_device(AudioObjectID * plugin_id, AudioDeviceID
|
||||
return CUBEB_OK;
|
||||
}
|
||||
|
||||
// The returned CFStringRef object needs to be released (via CFRelease)
|
||||
// if it's not NULL, since the reference count of the returned CFStringRef
|
||||
// object is increased.
|
||||
static CFStringRef
|
||||
get_device_name(AudioDeviceID id)
|
||||
{
|
||||
@ -1713,6 +1721,7 @@ audiounit_set_aggregate_sub_device_list(AudioDeviceID aggregate_device_id,
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
CFArrayAppendValue(aggregate_sub_devices_array, ref);
|
||||
CFRelease(ref);
|
||||
}
|
||||
for (UInt32 i = 0; i < input_sub_devices.size(); i++) {
|
||||
CFStringRef ref = get_device_name(input_sub_devices[i]);
|
||||
@ -1721,6 +1730,7 @@ audiounit_set_aggregate_sub_device_list(AudioDeviceID aggregate_device_id,
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
CFArrayAppendValue(aggregate_sub_devices_array, ref);
|
||||
CFRelease(ref);
|
||||
}
|
||||
|
||||
AudioObjectPropertyAddress aggregate_sub_device_list = { kAudioAggregateDevicePropertyFullSubDeviceList,
|
||||
@ -1762,6 +1772,9 @@ audiounit_set_master_aggregate_device(const AudioDeviceID aggregate_device_id)
|
||||
NULL,
|
||||
size,
|
||||
&master_sub_device);
|
||||
if (master_sub_device) {
|
||||
CFRelease(master_sub_device);
|
||||
}
|
||||
if (rv != noErr) {
|
||||
LOG("AudioObjectSetPropertyData/kAudioAggregateDevicePropertyMasterSubDevice, rv=%d", rv);
|
||||
return CUBEB_ERROR;
|
||||
@ -2874,18 +2887,25 @@ audiounit_stream_destroy(cubeb_stream * stm)
|
||||
delete stm;
|
||||
}
|
||||
|
||||
void
|
||||
static int
|
||||
audiounit_stream_start_internal(cubeb_stream * stm)
|
||||
{
|
||||
OSStatus r;
|
||||
if (stm->input_unit != NULL) {
|
||||
r = AudioOutputUnitStart(stm->input_unit);
|
||||
assert(r == 0);
|
||||
if (r != noErr) {
|
||||
LOG("AudioOutputUnitStart (input) rv=%d", r);
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
}
|
||||
if (stm->output_unit != NULL) {
|
||||
r = AudioOutputUnitStart(stm->output_unit);
|
||||
assert(r == 0);
|
||||
if (r != noErr) {
|
||||
LOG("AudioOutputUnitStart (output) rv=%d", r);
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
}
|
||||
return CUBEB_OK;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -2895,7 +2915,10 @@ audiounit_stream_start(cubeb_stream * stm)
|
||||
stm->shutdown = false;
|
||||
stm->draining = false;
|
||||
|
||||
audiounit_stream_start_internal(stm);
|
||||
int r = audiounit_stream_start_internal(stm);
|
||||
if (r != CUBEB_OK) {
|
||||
return r;
|
||||
}
|
||||
|
||||
stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_STARTED);
|
||||
|
||||
@ -3428,6 +3451,9 @@ audiounit_get_devices_of_type(cubeb_device_type devtype)
|
||||
} else {
|
||||
it++;
|
||||
}
|
||||
if (name) {
|
||||
CFRelease(name);
|
||||
}
|
||||
}
|
||||
|
||||
/* Expected sorted but did not find anything in the docs. */
|
||||
|
@ -1449,6 +1449,7 @@ int wasapi_init(cubeb ** context, char const * context_name)
|
||||
com_ptr<IMMDevice> device;
|
||||
HRESULT hr = get_default_endpoint(device, eRender);
|
||||
if (FAILED(hr)) {
|
||||
XASSERT(hr != CO_E_NOTINITIALIZED);
|
||||
LOG("It wasn't able to find a default rendering device: %lx", hr);
|
||||
hr = get_default_endpoint(device, eCapture);
|
||||
if (FAILED(hr)) {
|
||||
|
@ -506,6 +506,26 @@ struct AssertionConditionType {
|
||||
} while (false)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MOZ_DIAGNOSTIC_ASSERT_IF is like MOZ_ASSERT_IF, but using
|
||||
* MOZ_DIAGNOSTIC_ASSERT as the underlying assert.
|
||||
*
|
||||
* See the block comment for MOZ_DIAGNOSTIC_ASSERT above for more details on how
|
||||
* diagnostic assertions work and how to use them.
|
||||
*/
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
# define MOZ_DIAGNOSTIC_ASSERT_IF(cond, expr) \
|
||||
do { \
|
||||
if (cond) { \
|
||||
MOZ_DIAGNOSTIC_ASSERT(expr); \
|
||||
} \
|
||||
} while (false)
|
||||
#else
|
||||
# define MOZ_DIAGNOSTIC_ASSERT_IF(cond, expr) \
|
||||
do { \
|
||||
} while (false)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MOZ_ASSUME_UNREACHABLE_MARKER() expands to an expression which states that
|
||||
* it is undefined behavior for execution to reach this point. No guarantees
|
||||
|
@ -322,4 +322,12 @@ interface nsIURI : nsISupports
|
||||
* passed over IPC. For deserialization, see nsIURIMutator.
|
||||
*/
|
||||
[noscript, notxpcom] void serialize(in URIParams aParams);
|
||||
|
||||
%{C++
|
||||
// MOZ_DBG support
|
||||
friend std::ostream& operator<<(std::ostream& aOut, const nsIURI& aURI) {
|
||||
nsIURI* uri = const_cast<nsIURI*>(&aURI);
|
||||
return aOut << "nsIURI { " << uri->GetSpecOrDefault() << " }";
|
||||
}
|
||||
%}
|
||||
};
|
||||
|
@ -28,7 +28,6 @@ class LintMeta(type):
|
||||
|
||||
for project in (
|
||||
'browser',
|
||||
'embedding/ios',
|
||||
'extensions',
|
||||
'js',
|
||||
'memory',
|
||||
|
@ -418,10 +418,8 @@ impl nsStyleImage {
|
||||
use self::structs::NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE as CLOSEST_SIDE;
|
||||
use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER as FARTHEST_CORNER;
|
||||
use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE as FARTHEST_SIDE;
|
||||
use crate::values::computed::image::LineDirection;
|
||||
use crate::values::computed::position::Position;
|
||||
use crate::values::computed::Length;
|
||||
use crate::values::generics::image::{Circle, ColorStop, CompatMode, Ellipse};
|
||||
use crate::values::generics::image::{Circle, ColorStop, Ellipse};
|
||||
use crate::values::generics::image::{EndingShape, GradientKind, ShapeExtent};
|
||||
|
||||
let gecko_gradient = bindings::Gecko_GetGradientImageValue(self)
|
||||
@ -834,8 +832,7 @@ impl TrackSize<LengthPercentage> {
|
||||
/// Return TrackSize from given two nsStyleCoord
|
||||
pub fn from_gecko_style_coords<T: CoordData>(gecko_min: &T, gecko_max: &T) -> Self {
|
||||
use crate::gecko_bindings::structs::root::nsStyleUnit;
|
||||
use crate::values::computed::length::LengthPercentage;
|
||||
use crate::values::generics::grid::{TrackBreadth, TrackSize};
|
||||
use crate::values::generics::grid::TrackBreadth;
|
||||
|
||||
if gecko_min.unit() == nsStyleUnit::eStyleUnit_None {
|
||||
debug_assert!(
|
||||
@ -862,8 +859,6 @@ impl TrackSize<LengthPercentage> {
|
||||
|
||||
/// Save TrackSize to given gecko fields.
|
||||
pub fn to_gecko_style_coords<T: CoordDataMut>(&self, gecko_min: &mut T, gecko_max: &mut T) {
|
||||
use crate::values::generics::grid::TrackSize;
|
||||
|
||||
match *self {
|
||||
TrackSize::FitContent(ref lop) => {
|
||||
// Gecko sets min value to None and max value to the actual value in fit-content
|
||||
@ -893,8 +888,6 @@ impl TrackListValue<LengthPercentage, Integer> {
|
||||
|
||||
/// Save TrackSize to given gecko fields.
|
||||
pub fn to_gecko_style_coords<T: CoordDataMut>(&self, gecko_min: &mut T, gecko_max: &mut T) {
|
||||
use crate::values::generics::grid::TrackListValue;
|
||||
|
||||
match *self {
|
||||
TrackListValue::TrackSize(ref size) => size.to_gecko_style_coords(gecko_min, gecko_max),
|
||||
_ => unreachable!("Should only transform from track-size computed values"),
|
||||
@ -918,8 +911,6 @@ where
|
||||
pub fn from_gecko_rect(
|
||||
sides: &crate::gecko_bindings::structs::nsStyleSides,
|
||||
) -> Option<crate::values::generics::rect::Rect<T>> {
|
||||
use crate::values::generics::rect::Rect;
|
||||
|
||||
Some(Rect::new(
|
||||
T::from_gecko_style_coord(&sides.data_at(0)).expect("coord[0] cound not convert"),
|
||||
T::from_gecko_style_coord(&sides.data_at(1)).expect("coord[1] cound not convert"),
|
||||
|
@ -317,7 +317,6 @@ impl GeckoStyleCoordConvertible for ScrollSnapPoint<LengthPercentage> {
|
||||
|
||||
fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
|
||||
use crate::gecko_bindings::structs::root::nsStyleUnit;
|
||||
use crate::values::generics::gecko::ScrollSnapPoint;
|
||||
|
||||
Some(match coord.unit() {
|
||||
nsStyleUnit::eStyleUnit_None => ScrollSnapPoint::None,
|
||||
|
@ -986,7 +986,6 @@ fn get_animation_rule(
|
||||
element: &GeckoElement,
|
||||
cascade_level: CascadeLevel,
|
||||
) -> Option<Arc<Locked<PropertyDeclarationBlock>>> {
|
||||
use crate::gecko_bindings::sugar::ownership::HasSimpleFFI;
|
||||
use crate::properties::longhands::ANIMATABLE_PROPERTY_COUNT;
|
||||
|
||||
// There's a very rough correlation between the number of effects
|
||||
|
@ -1239,7 +1239,7 @@ impl StrongRuleNode {
|
||||
use crate::gecko_bindings::structs::NS_AUTHOR_SPECIFIED_BACKGROUND;
|
||||
use crate::gecko_bindings::structs::NS_AUTHOR_SPECIFIED_BORDER;
|
||||
use crate::gecko_bindings::structs::NS_AUTHOR_SPECIFIED_PADDING;
|
||||
use crate::properties::{CSSWideKeyword, LonghandId, LonghandIdSet};
|
||||
use crate::properties::{CSSWideKeyword, LonghandId};
|
||||
use crate::properties::{PropertyDeclaration, PropertyDeclarationId};
|
||||
use crate::values::specified::Color;
|
||||
use std::borrow::Cow;
|
||||
|
@ -211,8 +211,6 @@ where
|
||||
type Item = (&'a S, SheetRebuildKind);
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
use std::mem;
|
||||
|
||||
loop {
|
||||
let potential_sheet = self.iter.next()?;
|
||||
|
||||
|
@ -307,8 +307,6 @@ pub fn resolve_style<E>(
|
||||
where
|
||||
E: TElement,
|
||||
{
|
||||
use crate::style_resolver::StyleResolverForElement;
|
||||
|
||||
debug_assert!(
|
||||
rule_inclusion == RuleInclusion::DefaultOnly ||
|
||||
pseudo.map_or(false, |p| p.is_before_or_after()) ||
|
||||
@ -406,7 +404,6 @@ pub fn recalc_style_at<E, D, F>(
|
||||
D: DomTraversal<E>,
|
||||
F: FnMut(E::ConcreteNode),
|
||||
{
|
||||
use crate::traversal_flags::TraversalFlags;
|
||||
use std::cmp;
|
||||
|
||||
let flags = context.shared.traversal_flags;
|
||||
|
@ -118,7 +118,7 @@ impl ToCss for FontTag {
|
||||
where
|
||||
W: Write,
|
||||
{
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
use byteorder::ByteOrder;
|
||||
use std::str;
|
||||
|
||||
let mut raw = [0u8; 4];
|
||||
|
@ -3550,7 +3550,6 @@ fn parse_property_into(
|
||||
quirks_mode: QuirksMode,
|
||||
reporter: Option<&ParseErrorReporter>,
|
||||
) -> Result<(), ()> {
|
||||
use style_traits::ParsingMode;
|
||||
let value = unsafe { value.as_ref().unwrap().as_str_unchecked() };
|
||||
let url_data = unsafe { UrlExtraData::from_ptr_ref(&data) };
|
||||
let parsing_mode = ParsingMode::from_bits_truncate(parsing_mode);
|
||||
@ -4300,7 +4299,7 @@ pub unsafe extern "C" fn Servo_DeclarationBlock_SetIdentStringValue(
|
||||
value: *mut nsAtom,
|
||||
) {
|
||||
use style::properties::longhands::_x_lang::computed_value::T as Lang;
|
||||
use style::properties::{LonghandId, PropertyDeclaration};
|
||||
use style::properties::PropertyDeclaration;
|
||||
|
||||
let long = get_longhand_from_id!(property);
|
||||
let prop = match_wrap_declared! { long,
|
||||
@ -4320,7 +4319,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetKeywordValue(
|
||||
) {
|
||||
use num_traits::FromPrimitive;
|
||||
use style::properties::longhands;
|
||||
use style::properties::{LonghandId, PropertyDeclaration};
|
||||
use style::properties::PropertyDeclaration;
|
||||
use style::values::generics::font::FontStyle;
|
||||
use style::values::specified::BorderStyle;
|
||||
use style::values::specified::Display;
|
||||
@ -4384,7 +4383,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetIntValue(
|
||||
) {
|
||||
use style::properties::longhands::_moz_script_level::SpecifiedValue as MozScriptLevel;
|
||||
use style::properties::longhands::_x_span::computed_value::T as Span;
|
||||
use style::properties::{LonghandId, PropertyDeclaration};
|
||||
use style::properties::PropertyDeclaration;
|
||||
|
||||
let long = get_longhand_from_id!(property);
|
||||
let prop = match_wrap_declared! { long,
|
||||
@ -4455,7 +4454,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetPixelValue(
|
||||
value: f32,
|
||||
) {
|
||||
use style::properties::longhands::border_spacing::SpecifiedValue as BorderSpacing;
|
||||
use style::properties::{LonghandId, PropertyDeclaration};
|
||||
use style::properties::PropertyDeclaration;
|
||||
use style::values::generics::length::Size;
|
||||
use style::values::generics::NonNegative;
|
||||
use style::values::generics::length::LengthPercentageOrAuto;
|
||||
@ -4517,7 +4516,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetLengthValue(
|
||||
unit: structs::nsCSSUnit,
|
||||
) {
|
||||
use style::properties::longhands::_moz_script_min_size::SpecifiedValue as MozScriptMinSize;
|
||||
use style::properties::{LonghandId, PropertyDeclaration};
|
||||
use style::properties::PropertyDeclaration;
|
||||
use style::values::generics::NonNegative;
|
||||
use style::values::generics::length::Size;
|
||||
use style::values::specified::length::NoCalcLength;
|
||||
@ -4564,7 +4563,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetNumberValue(
|
||||
) {
|
||||
use style::properties::longhands::_moz_script_level::SpecifiedValue as MozScriptLevel;
|
||||
use style::properties::longhands::_moz_script_size_multiplier::SpecifiedValue as MozScriptSizeMultiplier;
|
||||
use style::properties::{LonghandId, PropertyDeclaration};
|
||||
use style::properties::PropertyDeclaration;
|
||||
|
||||
let long = get_longhand_from_id!(property);
|
||||
|
||||
@ -4584,7 +4583,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetPercentValue(
|
||||
property: nsCSSPropertyID,
|
||||
value: f32,
|
||||
) {
|
||||
use style::properties::{LonghandId, PropertyDeclaration};
|
||||
use style::properties::PropertyDeclaration;
|
||||
use style::values::computed::Percentage;
|
||||
use style::values::generics::NonNegative;
|
||||
use style::values::generics::length::{Size, LengthPercentageOrAuto};
|
||||
@ -4614,7 +4613,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetAutoValue(
|
||||
declarations: &RawServoDeclarationBlock,
|
||||
property: nsCSSPropertyID,
|
||||
) {
|
||||
use style::properties::{LonghandId, PropertyDeclaration};
|
||||
use style::properties::PropertyDeclaration;
|
||||
use style::values::generics::length::{LengthPercentageOrAuto, Size};
|
||||
|
||||
let long = get_longhand_from_id!(property);
|
||||
@ -4638,7 +4637,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetCurrentColor(
|
||||
declarations: &RawServoDeclarationBlock,
|
||||
property: nsCSSPropertyID,
|
||||
) {
|
||||
use style::properties::{LonghandId, PropertyDeclaration};
|
||||
use style::properties::PropertyDeclaration;
|
||||
use style::values::specified::Color;
|
||||
|
||||
let long = get_longhand_from_id!(property);
|
||||
@ -4663,7 +4662,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetColorValue(
|
||||
) {
|
||||
use style::gecko::values::convert_nscolor_to_rgba;
|
||||
use style::properties::longhands;
|
||||
use style::properties::{LonghandId, PropertyDeclaration};
|
||||
use style::properties::PropertyDeclaration;
|
||||
use style::values::specified::Color;
|
||||
|
||||
let long = get_longhand_from_id!(property);
|
||||
@ -4688,7 +4687,6 @@ pub extern "C" fn Servo_DeclarationBlock_SetFontFamily(
|
||||
declarations: &RawServoDeclarationBlock,
|
||||
value: *const nsAString,
|
||||
) {
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use style::properties::longhands::font_family::SpecifiedValue as FontFamily;
|
||||
use style::properties::PropertyDeclaration;
|
||||
|
||||
@ -5060,8 +5058,6 @@ pub extern "C" fn Servo_GetComputedKeyframeValues(
|
||||
raw_data: &RawServoStyleSet,
|
||||
computed_keyframes: &mut nsTArray<structs::ComputedKeyframeValues>,
|
||||
) {
|
||||
use style::properties::LonghandIdSet;
|
||||
|
||||
let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
|
||||
let metrics = get_metrics_provider_for_product();
|
||||
|
||||
|
@ -5,11 +5,11 @@
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Test: CSS display:contents; in Shadow DOM</title>
|
||||
<title>Reference: CSS display:contents; in Shadow DOM</title>
|
||||
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=907396">
|
||||
<style>
|
||||
html,body {
|
||||
color:black; background-color:white; font-size:16px; padding:0; margin:0;
|
||||
color:black; background-color:white; font:12px/1 monospace; padding:0; margin:0;
|
||||
}
|
||||
|
||||
span { color:blue; }
|
@ -0,0 +1,221 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html class="reftest-wait" lang="en-US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: CSS display:contents; in Shadow DOM</title>
|
||||
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=907396">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-display/">
|
||||
<link rel="match" href="display-contents-shadow-dom-1-ref.html">
|
||||
<style>
|
||||
html,body {
|
||||
color:black; background-color:white; font:12px/1 monospace; padding:0; margin:0;
|
||||
}
|
||||
.before::before, ::slotted(.before)::before {content: "a ";}
|
||||
.after::after, ::slotted(.after)::after {content: " c";}
|
||||
div.before::before {content: "X ";}
|
||||
div.after::after {content: " Y";}
|
||||
.b, .c, ::slotted(.b), ::slotted(.c) { display:contents; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="host1" class="before"></div>
|
||||
<span id="host2"></span>
|
||||
<div id="host3" class="after"></div>
|
||||
<div id="host4" class="before after"></div>
|
||||
<div id="host5" class="after"></div>
|
||||
<div id="host6" class="before"></div>
|
||||
<div id="host7"></div>
|
||||
<div id="host8" class="after"></div>
|
||||
<div id="host9" class="before after"></div>
|
||||
<div id="hostA" class="after"></div>
|
||||
<div id="hostB"></div>
|
||||
<div id="hostC"></div>
|
||||
<div id="hostD"></div>
|
||||
<div id="hostE"></div>
|
||||
<div id="hostF" class="before"></div>
|
||||
<div id="hostG"></div>
|
||||
<span id="hostH"></span>
|
||||
<div id="hostI"></div>
|
||||
<div id="hostJ"></div>
|
||||
<span id="hostK"></span>
|
||||
<div id="hostL"></div>
|
||||
<div id="hostM"><i slot=i>Two</i><b slot=b>One</b></div>
|
||||
<div id="hostN"><i slot=i class="c">Two</i><b slot=b>One</b></div>
|
||||
<div id="hostO"><i slot=i>Two</i><b slot=b class="c">One</b></div>
|
||||
<div id="hostP"><i slot=i class="c">Two</i><b slot=b class="c">One</b></div>
|
||||
<div id="hostQ" class="c" style="color:blue"><i slot=i class="c">Two</i><b slot=b class="c">One</b></div>Three
|
||||
<div id="hostS" class="c"><span class="c">S</span></div>
|
||||
<div id="hostT" class="c">T</div>
|
||||
<div id="hostU"><span slot="c">U</span></div>
|
||||
<div id="hostV" class="c" style="color:red"><b slot="b" class="c" style="color:inherit">V</b></div>
|
||||
|
||||
<script>
|
||||
function shadow(id) {
|
||||
return document.getElementById(id).attachShadow({mode:"open"});
|
||||
}
|
||||
function span(s) {
|
||||
var e = document.createElement("span");
|
||||
var t = document.createTextNode(s);
|
||||
e.appendChild(t);
|
||||
return e;
|
||||
}
|
||||
function text(s) {
|
||||
return document.createTextNode(s);
|
||||
}
|
||||
function contents(n, slotName) {
|
||||
var e = document.createElement("z");
|
||||
e.style.display = "contents";
|
||||
e.style.color = "blue";
|
||||
if (n) e.appendChild(n);
|
||||
if (slotName) e.setAttribute("slot", slotName);
|
||||
return e;
|
||||
}
|
||||
|
||||
function run() {
|
||||
document.body.offsetHeight;
|
||||
|
||||
shadow("host1").innerHTML = '<slot style="display:inline"></slot> c';
|
||||
shadow("host2").innerHTML = 'a <slot style="display:contents"></slot> c';
|
||||
shadow("host3").innerHTML = 'a <slot style="display:contents"></slot>';
|
||||
shadow("host4").innerHTML = '<slot style="display:contents"></slot>';
|
||||
shadow("host5").innerHTML = 'a <slot style="display:contents"></slot>';
|
||||
shadow("host6").innerHTML = '<z style="color:blue; display:contents"><slot style="display:inline"></slot></z> c';
|
||||
shadow("host7").innerHTML = 'a <slot style="display:contents"></slot> c';
|
||||
shadow("host8").innerHTML = 'a <z style="color:blue; display:contents"><slot style="display:contents"></z></slot>';
|
||||
shadow("host9").innerHTML = '<slot style="display:contents"></slot>';
|
||||
shadow("hostA").innerHTML = 'a <slot style="display:contents"></slot>';
|
||||
shadow("hostB").innerHTML = 'a <slot name="c" style="display:contents"></slot> <slot name="b" style="display:contents"></slot> B';
|
||||
shadow("hostC").innerHTML = 'A <slot name="c" style="display:contents"></slot> <slot name="b" style="display:contents"></slot> B';
|
||||
shadow("hostD").innerHTML = 'A <slot name="c" style="display:contents"></slot> <slot name="b" style="display:contents"></slot> B <slot name="b"></slot>';
|
||||
shadow("hostE").innerHTML = 'A <slot name="c" style="display:contents"></slot> <slot name="b" style="display:contents"></slot> B';
|
||||
shadow("hostF").innerHTML = '<slot name="c" style="display:contents"></slot> <slot name="b" style="display:contents"></slot> B';
|
||||
shadow("hostG").innerHTML = '<slot name="b" style="display:contents"></slot>';
|
||||
shadow("hostH").innerHTML = '<slot name="b" style="display:contents"></slot>';
|
||||
shadow("hostI").innerHTML = 'A<slot name="b" style="display:contents"></slot>';
|
||||
shadow("hostJ").innerHTML = 'A<slot name="b" style="display:contents"></slot>';
|
||||
shadow("hostK").innerHTML = '<slot name="b" style="display:contents"></slot>';
|
||||
shadow("hostL").innerHTML = '<slot name="b" style="display:contents"></slot>';
|
||||
shadow("hostM").innerHTML = '<slot name="b" style="display:contents"></slot><slot name="i" style="display:inline"></slot>';
|
||||
shadow("hostN").innerHTML = '<slot name="b" style="display:contents"></slot><slot name="i" style="display:inline"></slot>';
|
||||
shadow("hostO").innerHTML = '<slot name="b" style="display:contents"></slot><slot name="i" style="display:inline"></slot>';
|
||||
shadow("hostP").innerHTML = '<slot name="b" style="display:contents"></slot><slot name="i" style="display:inline"></slot>';
|
||||
shadow("hostQ").innerHTML = '<slot name="b" style="display:contents"></slot><slot name="i" style="display:inline"></slot>';
|
||||
}
|
||||
|
||||
function tweak() {
|
||||
document.body.offsetHeight;
|
||||
|
||||
host1.appendChild(span("1"));
|
||||
host2.appendChild(text("2"));
|
||||
host3.appendChild(span("3"));
|
||||
host4.appendChild(text("4"));
|
||||
|
||||
var e = span("5");
|
||||
e.style.display = "contents";
|
||||
host5.appendChild(e);
|
||||
|
||||
host6.appendChild(span("6"));
|
||||
host7.appendChild(contents(text("7")));
|
||||
host8.appendChild(contents(span("8")));
|
||||
host9.appendChild(contents(text("9")));
|
||||
|
||||
var e = contents(span("A"));
|
||||
hostA.appendChild(e);
|
||||
|
||||
var e = contents(text("2"), "b");
|
||||
hostB.appendChild(e);
|
||||
var e = contents(text("1"), "c");
|
||||
hostB.appendChild(e);
|
||||
|
||||
var e = contents(text("2"), "b");
|
||||
e.className = "after";
|
||||
hostC.appendChild(e);
|
||||
var e = contents(text("1"), "c");
|
||||
e.className = "before";
|
||||
hostC.appendChild(e);
|
||||
|
||||
var e = contents(text("2"), "b");
|
||||
e.className = "before after";
|
||||
hostD.appendChild(e);
|
||||
var e = contents(text(" 3"), "b");
|
||||
e.className = "before after";
|
||||
hostD.appendChild(e);
|
||||
var e = contents(text("1"), "c");
|
||||
e.className = "before";
|
||||
hostD.appendChild(e);
|
||||
|
||||
var e = contents(contents(text("2")), "b");
|
||||
e.className = "before after";
|
||||
hostE.appendChild(e);
|
||||
var e2 = contents(text("1"), "c");
|
||||
e2.className = "before after";
|
||||
hostE.insertBefore(e2, e);
|
||||
|
||||
var e = contents(text("2"), "b");
|
||||
e.className = "before after";
|
||||
hostF.appendChild(e);
|
||||
var e2 = contents(text("1"), "c");
|
||||
e2.className = "before after";
|
||||
hostF.insertBefore(e2, e);
|
||||
|
||||
var e = contents(contents(text("1")), "b");
|
||||
hostG.appendChild(e);
|
||||
var e = contents(text("2"), "b");
|
||||
e.className = "before after";
|
||||
hostG.appendChild(e);
|
||||
|
||||
var e = contents(contents(text("2")), "b");
|
||||
hostH.appendChild(e);
|
||||
var e2 = contents(text("1"), "b");
|
||||
e2.className = "before after";
|
||||
hostH.insertBefore(e2, e);
|
||||
|
||||
var e = contents(text("b"), "b");
|
||||
hostI.appendChild(e);
|
||||
var e = span("c");
|
||||
e.setAttribute("slot", "b");
|
||||
hostI.appendChild(e);
|
||||
|
||||
var e = contents(contents(text("b")), "b");
|
||||
hostJ.appendChild(e);
|
||||
var e = span("c");
|
||||
e.setAttribute("slot", "b");
|
||||
hostJ.appendChild(e);
|
||||
|
||||
var inner = span("b");
|
||||
inner.className = "after";
|
||||
var e = contents(contents(inner), "b");
|
||||
hostK.appendChild(e);
|
||||
var e = span("d");
|
||||
e.setAttribute("slot", "b");
|
||||
hostK.appendChild(e);
|
||||
|
||||
var inner = contents(null);
|
||||
inner.className = "before";
|
||||
var e = contents(inner, "b");
|
||||
hostL.appendChild(e);
|
||||
var e = span("b");
|
||||
e.setAttribute("slot", "b");
|
||||
hostL.appendChild(e);
|
||||
|
||||
document.body.offsetHeight;
|
||||
setTimeout(function() {
|
||||
shadow("hostS");
|
||||
shadow("hostT");
|
||||
shadow("hostU");
|
||||
shadow("hostV").innerHTML = '<z style="color:green"><slot name="b"></slot></z>';
|
||||
|
||||
document.body.offsetHeight;
|
||||
document.documentElement.removeAttribute("class");
|
||||
},0);
|
||||
}
|
||||
|
||||
run();
|
||||
setTimeout(tweak, 0);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1832,6 +1832,7 @@ EnvironmentCache.prototype = {
|
||||
|
||||
if (AppConstants.platform === "win") {
|
||||
data.isWow64 = getSysinfoProperty("isWow64", null);
|
||||
data.isWowARM64 = getSysinfoProperty("isWowARM64", null);
|
||||
} else if (AppConstants.platform == "android") {
|
||||
data.device = this._getDeviceData();
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ Structure:
|
||||
memoryMB: <number>,
|
||||
virtualMaxMB: <number>, // windows-only
|
||||
isWow64: <bool>, // windows-only
|
||||
isWowARM64: <bool>, // windows-only
|
||||
cpu: {
|
||||
count: <number>, // desktop only, e.g. 8, or null on failure - logical cpus
|
||||
cores: <number>, // desktop only, e.g., 4, or null on failure - physical cores
|
||||
|
@ -548,6 +548,8 @@ function checkSystemSection(data) {
|
||||
if (gIsWindows) {
|
||||
Assert.equal(typeof data.system.isWow64, "boolean",
|
||||
"isWow64 must be available on Windows and have the correct type.");
|
||||
Assert.equal(typeof data.system.isWowARM64, "boolean",
|
||||
"isWowARM64 must be available on Windows and have the correct type.");
|
||||
Assert.ok("virtualMaxMB" in data.system, "virtualMaxMB must be available.");
|
||||
Assert.ok(Number.isFinite(data.system.virtualMaxMB),
|
||||
"virtualMaxMB must be a number.");
|
||||
|
@ -364,6 +364,15 @@ IAccessibleConfig:
|
||||
the computer's registry. The value is always set to "NoSystemTypeLibOrPS"
|
||||
type: string
|
||||
|
||||
IndexedDBShutdownTimeout:
|
||||
description: >
|
||||
This annotation is present if IndexedDB shutdown was not finished in time
|
||||
and the browser was crashed instead of waiting for IndexedDB shutdown to
|
||||
finish. The condition that caused the hang is contained in the annotation.
|
||||
type: string
|
||||
content: false
|
||||
ping: true
|
||||
|
||||
InstallTime:
|
||||
description: >
|
||||
The time when Firefox was installed expressed as seconds since the Epoch
|
||||
|
@ -154,7 +154,8 @@ NS_IMETHODIMP nsNativeAppSupportCocoa::Start(bool* _retval) {
|
||||
NSArray* arguments = [[NSProcessInfo processInfo] arguments];
|
||||
BOOL shallProceedLikeNoRemote = NO;
|
||||
for (NSString* arg in arguments) {
|
||||
if ([arg isEqualToString:@"-no-remote"] || [arg isEqualToString:@"-headless"]) {
|
||||
if ([arg isEqualToString:@"-no-remote"] || [arg isEqualToString:@"-headless"] ||
|
||||
[arg isEqualToString:@"--no-remote"] || [arg isEqualToString:@"--headless"]) {
|
||||
shallProceedLikeNoRemote = YES;
|
||||
break;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
with Files("**"):
|
||||
BUG_COMPONENT = ("Core", "Widget")
|
||||
BUG_COMPONENT = ("Firefox", "Headless")
|
||||
|
||||
DIRS += ['tests']
|
||||
|
||||
|
@ -1480,7 +1480,7 @@ inline already_AddRefed<T> do_AddRef(const nsCOMPtr<T>& aObj) {
|
||||
|
||||
template <class T>
|
||||
std::ostream& operator<<(std::ostream& aOut, const nsCOMPtr<T>& aObj) {
|
||||
return aOut << aObj.get();
|
||||
return mozilla::DebugValue(aOut, aObj.get());
|
||||
}
|
||||
|
||||
#endif // !defined(nsCOMPtr_h___)
|
||||
|
@ -731,14 +731,43 @@ nsresult nsSystemInfo::Init() {
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
BOOL isWow64;
|
||||
BOOL gotWow64Value = IsWow64Process(GetCurrentProcess(), &isWow64);
|
||||
// IsWow64Process2 is only available on Windows 10+, so we have to dynamically
|
||||
// check for its existence.
|
||||
typedef BOOL(WINAPI* LPFN_IWP2)(HANDLE, USHORT*, USHORT*);
|
||||
LPFN_IWP2 iwp2 = reinterpret_cast<LPFN_IWP2>(GetProcAddress(
|
||||
GetModuleHandle(L"kernel32"), "IsWow64Process2"));
|
||||
BOOL isWow64 = false;
|
||||
USHORT processMachine = IMAGE_FILE_MACHINE_UNKNOWN;
|
||||
USHORT nativeMachine = IMAGE_FILE_MACHINE_UNKNOWN;
|
||||
BOOL gotWow64Value;
|
||||
if (iwp2) {
|
||||
gotWow64Value = iwp2(GetCurrentProcess(), &processMachine, &nativeMachine);
|
||||
if (gotWow64Value) {
|
||||
isWow64 = (processMachine != IMAGE_FILE_MACHINE_UNKNOWN);
|
||||
}
|
||||
} else {
|
||||
gotWow64Value = IsWow64Process(GetCurrentProcess(), &isWow64);
|
||||
// The function only indicates a WOW64 environment if it's 32-bit x86
|
||||
// running on x86-64, so emulate what IsWow64Process2 would have given.
|
||||
if (gotWow64Value && isWow64) {
|
||||
processMachine = IMAGE_FILE_MACHINE_I386;
|
||||
nativeMachine = IMAGE_FILE_MACHINE_AMD64;
|
||||
}
|
||||
}
|
||||
NS_WARNING_ASSERTION(gotWow64Value, "IsWow64Process failed");
|
||||
if (gotWow64Value) {
|
||||
// Set this always, even for the x86-on-arm64 case.
|
||||
rv = SetPropertyAsBool(NS_LITERAL_STRING("isWow64"), !!isWow64);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
// Additional information if we're running x86-on-arm64
|
||||
bool isWowARM64 = (processMachine == IMAGE_FILE_MACHINE_I386 &&
|
||||
nativeMachine == IMAGE_FILE_MACHINE_ARM64);
|
||||
rv = SetPropertyAsBool(NS_LITERAL_STRING("isWowARM64"), !!isWowARM64);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
if (NS_FAILED(GetProfileHDDInfo())) {
|
||||
// We might have been called before profile-do-change. We'll observe that
|
||||
|
@ -541,5 +541,13 @@ interface nsIFile : nsISupports
|
||||
%{C++
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
#include "nsDirectoryServiceUtils.h"
|
||||
#include "nsString.h"
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& aOut, const nsIFile& aFile) {
|
||||
nsIFile* file = const_cast<nsIFile*>(&aFile);
|
||||
nsAutoString path;
|
||||
file->GetPath(path);
|
||||
return aOut << "nsIFile { " << path << " }";
|
||||
}
|
||||
#endif
|
||||
%}
|
||||
|
Loading…
x
Reference in New Issue
Block a user