зеркало из https://github.com/mozilla/gecko-dev.git
Bug 691976 - NULL check the JSContext before using JS_updateMallocCounter. r=Bas
This commit is contained in:
Родитель
9fc01ffbc5
Коммит
dcf9ee4bf1
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче