Loading
Bug 1811929 - Fix JNI crash caused by passing incorrect jobject type. r=gfx-reviewers,nical
The function ANativeWindow_fromSurface() takes a jobject that is supposed to be a Surface. Prior to bug 1706656 GeckoSurface was a subclass of Surface, meaning we passed the correct type. However, GeckoSurface no longer derives from Surface meaning we hit this JNI crash. To fix this, call GeckoSurface->GetSurface() to get the underlying Surface object. Note that this code path is only active if the user has modified the pref gfx.use-surfacetexture-textures. So although the volume is high, it appears to be limited to a small number of users. Differential Revision: https://phabricator.services.mozilla.com/D167659