Bug 933378 part 3. Fix the ErrorResult usage in PeerConnectionImpl to not use ErrorResult directly anymore. r=jib

This commit is contained in:
Boris Zbarsky 2016-07-15 22:35:13 -04:00
Родитель de3dccf7da
Коммит e84fe03fe3
1 изменённых файлов: 10 добавлений и 1 удалений

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

@ -138,7 +138,15 @@ static const char* logTag = "PeerConnectionImpl";
// Getting exceptions back down from PCObserver is generally not harmful.
namespace {
class JSErrorResult : public ErrorResult
// This is a terrible hack. The problem is that SuppressException is not
// inline, and we link this file without libxul in some cases (e.g. for our test
// setup). So we can't use ErrorResult or IgnoredErrorResult because those call
// SuppressException... And we can't use FastErrorResult because we can't
// include BindingUtils.h, because our linking is completely fucked up. Use
// BaseErrorResult directly. Please do not let me see _anyone_ doing this
// without really careful review from someone who knows what they are doing.
class JSErrorResult :
public binding_danger::TErrorResult<binding_danger::JustAssertCleanupPolicy>
{
public:
~JSErrorResult()
@ -169,6 +177,7 @@ public:
}
}
operator JSErrorResult &() { return mRv; }
operator ErrorResult &() { return mRv; }
private:
JSErrorResult mRv;
bool isCopy;