Scribunto_LuaSandboxEngine::getResourceUsage(): call load()

This is required for ensuring $this->interpreter is available. See
::getLimitReportData(), which does the same thing.

Change-Id: I275b093dd7d5f4873ec4b912823322e6e533cae1
This commit is contained in:
Ori Livneh 2015-10-29 16:52:21 -07:00
parent 7e63874c5c
commit b5df651e1e

View file

@ -29,6 +29,7 @@ class Scribunto_LuaSandboxEngine extends Scribunto_LuaEngine {
} }
public function getResourceUsage( $resource ) { public function getResourceUsage( $resource ) {
$this->load();
switch ( $resource ) { switch ( $resource ) {
case self::MEM_PEAK_BYTES: case self::MEM_PEAK_BYTES:
return $this->interpreter->getPeakMemoryUsage(); return $this->interpreter->getPeakMemoryUsage();