GWicke has uploaded a new change for review.
https://gerrit.wikimedia.org/r/64014
Change subject: Fix some more environment class bugs
......................................................................
Fix some more environment class bugs
This patch makes config caching finally work across requests by moving the
cache to MWParserEnvironment.prototype.
Another fix makes sure that template fetch requests don't leak across
top-level requests.
Change-Id: Iea67d455c6f598eba5247fcf6b0af1f95e72a37b
---
M js/lib/mediawiki.parser.environment.js
1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid
refs/changes/14/64014/1
diff --git a/js/lib/mediawiki.parser.environment.js
b/js/lib/mediawiki.parser.environment.js
index 77de685..9333d8f 100644
--- a/js/lib/mediawiki.parser.environment.js
+++ b/js/lib/mediawiki.parser.environment.js
@@ -104,7 +104,13 @@
// Tracing object
this.tracer = new Tracer(this);
+
+ // Outstanding page requests (for templates etc)
+ this.requestQueue = {};
};
+
+// Cache for wiki configurations, shared between requests.
+MWParserEnvironment.prototype.confCache = {};
/**
* @property {Object} page
@@ -188,9 +194,6 @@
* @property {ParsoidConfig} conf.parsoid
*/
-// Outstanding page requests (for templates etc)
-// Class-static
-MWParserEnvironment.prototype.requestQueue = {};
/**
* @method
@@ -280,7 +283,6 @@
uri = this.conf.parsoid.interwikiMap[prefix] ||
this.conf.parsoid.interwikiMap.en;
this.conf.parsoid.apiURI = uri;
- this.confCache = this.confCache || {};
if ( !this.conf.parsoid.fetchConfig ) {
// Use the name of a cache file as the source of the config.
--
To view, visit https://gerrit.wikimedia.org/r/64014
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea67d455c6f598eba5247fcf6b0af1f95e72a37b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits