MarkTraceur has submitted this change and it was merged.
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(-)
Approvals:
MarkTraceur: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: Iea67d455c6f598eba5247fcf6b0af1f95e72a37b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits