Fail gracefully when we can't get a texture sync handle. (bug 1207665 part 4, r=bas,vladan)

This commit is contained in:
David Anderson 2015-09-29 11:20:01 -07:00
parent 43fdee2ce8
commit ae08a8de3b
2 changed files with 12 additions and 1 deletions

View File

@ -23,6 +23,7 @@
#include "mozilla/Services.h"
#include "mozilla/EnumeratedArray.h"
#include "mozilla/Telemetry.h"
#include <dxgi1_2.h>
@ -1365,7 +1366,10 @@ DeviceAttachmentsD3D11::InitSyncObject()
if (FAILED(hr) || !mSyncHandle) {
gfxCriticalError() << "Failed to get SharedHandle for sync texture. Result: "
<< hexa(hr);
MOZ_CRASH();
NS_DispatchToMainThread(NS_NewRunnableFunction([] () -> void {
Accumulate(Telemetry::D3D11_SYNC_HANDLE_FAILURE, 1);
}));
return false;
}
return true;

View File

@ -9767,6 +9767,13 @@
"kind": "count",
"description": "Attempt to notify ServiceWorker of push notification resubscription."
},
"D3D11_SYNC_HANDLE_FAILURE": {
"alert_emails": ["bschouten@mozilla.com","danderson@mozilla.com","msreckovic@mozilla.com","ashughes@mozilla.com"],
"expires_in_version": "50",
"releaseChannelCollection": "opt-out",
"kind": "count",
"description": "Number of times the D3D11 compositor failed to get a texture sync handle."
},
"PLUGIN_ACTIVATION_COUNT": {
"alert_emails": ["cpeterson@mozilla.com"],
"expires_in_version": "48",