mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 00:05:00 +00:00
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:
parent
7e63874c5c
commit
b5df651e1e
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue