mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 691976 - NULL check the JSContext before using JS_updateMallocCounter. r=Bas
This commit is contained in:
parent
6b37a39ade
commit
45907293a3
@ -1264,7 +1264,10 @@ nsCanvasRenderingContext2DAzure::SetDimensions(PRInt32 width, PRInt32 height)
|
||||
}
|
||||
|
||||
gCanvasAzureMemoryUsed += width * height * 4;
|
||||
JS_updateMallocCounter(nsContentUtils::GetCurrentJSContext(), width * height * 4);
|
||||
JSContext* context = nsContentUtils::GetCurrentJSContext();
|
||||
if (context) {
|
||||
JS_updateMallocCounter(context, width * height * 4);
|
||||
}
|
||||
}
|
||||
|
||||
return InitializeWithTarget(target, width, height);
|
||||
|
Loading…
Reference in New Issue
Block a user