This is fallout from Bug 1167235 - Use a fast method of double buffering for canvas.
It is possible for the CanvasRenderingContext2D to be destroyed while we're in the
middle of the call to nsObserverService::NotifyObservers() for shutdown.
This leaves the shutdown observer with a dangling pointer to the canvas, so this
patch explicitly clears the pointer when the context goes away.
- Checks for restricted or encrypted content
- Dispatching 'encrypted' events
- Dispatching 'key needed' events
- HTML Media Element media keys system
- EME telemetry
- HTML Media Element EME API
This is the main bulk for #26, isolating EME-specific code.