diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp index b70ec90eb5e9..cf1e4e117355 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp @@ -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 { public: ~JSErrorResult() @@ -169,6 +177,7 @@ public: } } operator JSErrorResult &() { return mRv; } + operator ErrorResult &() { return mRv; } private: JSErrorResult mRv; bool isCopy;