Use WeakPtr for extension parent pointer.

This commit is contained in:
wolfbeast 2019-07-20 18:08:16 +02:00 committed by Roy Tam
commit 08ccf18274
8 changed files with 55 additions and 33 deletions

View file

@ -29,15 +29,10 @@ WebGLExtensionDebugShaders::GetTranslatedShaderSource(const WebGLShader& shader,
{
retval.SetIsVoid(true);
if (mIsLost) {
mContext->ErrorInvalidOperation("%s: Extension is lost.",
"getTranslatedShaderSource");
if (mIsLost || !mContext) {
return;
}
if (mContext->IsContextLost())
return;
if (!mContext->ValidateObject("getShaderTranslatedSource: shader", shader))
return;