зеркало из https://github.com/mozilla/gecko-dev.git
Bug 974053 - fix ODR violation with mozilla::dom::workers::TeardownRunnable::Run; r=khuey
This commit is contained in:
Родитель
7ccd3071f6
Коммит
f244ed766e
|
@ -341,10 +341,10 @@ private:
|
|||
nsTArray<nsString> mStrings;
|
||||
};
|
||||
|
||||
class TeardownRunnable : public nsRunnable
|
||||
class TeardownConsoleRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
TeardownRunnable(ConsoleProxy* aProxy)
|
||||
TeardownConsoleRunnable(ConsoleProxy* aProxy)
|
||||
: mProxy(aProxy)
|
||||
{
|
||||
}
|
||||
|
@ -392,7 +392,8 @@ WorkerConsole::~WorkerConsole()
|
|||
MOZ_COUNT_DTOR(WorkerConsole);
|
||||
|
||||
if (mProxy) {
|
||||
nsRefPtr<TeardownRunnable> runnable = new TeardownRunnable(mProxy);
|
||||
nsRefPtr<TeardownConsoleRunnable> runnable =
|
||||
new TeardownConsoleRunnable(mProxy);
|
||||
mProxy = nullptr;
|
||||
|
||||
if (NS_FAILED(NS_DispatchToMainThread(runnable))) {
|
||||
|
|
|
@ -312,10 +312,10 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class TeardownRunnable : public nsRunnable
|
||||
class TeardownURLRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
TeardownRunnable(URLProxy* aURLProxy)
|
||||
TeardownURLRunnable(URLProxy* aURLProxy)
|
||||
: mURLProxy(aURLProxy)
|
||||
{
|
||||
}
|
||||
|
@ -576,7 +576,8 @@ URL::~URL()
|
|||
MOZ_COUNT_DTOR(workers::URL);
|
||||
|
||||
if (mURLProxy) {
|
||||
nsRefPtr<TeardownRunnable> runnable = new TeardownRunnable(mURLProxy);
|
||||
nsRefPtr<TeardownURLRunnable> runnable =
|
||||
new TeardownURLRunnable(mURLProxy);
|
||||
mURLProxy = nullptr;
|
||||
|
||||
if (NS_FAILED(NS_DispatchToMainThread(runnable))) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче