Bug 974053 - fix ODR violation with mozilla::dom::workers::TeardownRunnable::Run; r=khuey

This commit is contained in:
Nathan Froyd 2014-02-18 15:02:24 -05:00
Родитель 7ccd3071f6
Коммит f244ed766e
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -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))) {