Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/249929

Change subject: Scribunto_LuaSandboxEngine::getResourceUsage(): call load()
......................................................................

Scribunto_LuaSandboxEngine::getResourceUsage(): call load()

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

Change-Id: I275b093dd7d5f4873ec4b912823322e6e533cae1
---
M engines/LuaSandbox/Engine.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/29/249929/1

diff --git a/engines/LuaSandbox/Engine.php b/engines/LuaSandbox/Engine.php
index 019c6b4..7eb9c2e 100644
--- a/engines/LuaSandbox/Engine.php
+++ b/engines/LuaSandbox/Engine.php
@@ -29,6 +29,7 @@
        }
 
        public function getResourceUsage( $resource ) {
+               $this->load();
                switch ( $resource ) {
                case self::MEM_PEAK_BYTES:
                        return $this->interpreter->getPeakMemoryUsage();

-- 
To view, visit https://gerrit.wikimedia.org/r/249929
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I275b093dd7d5f4873ec4b912823322e6e533cae1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to