dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Show dimensions in TraditionalImageGallery"
[lhc/web/wiklou.git]
/
includes
/
parser
/
Parser.php
diff --git
a/includes/parser/Parser.php
b/includes/parser/Parser.php
index
b3e37a4
..
d8722ba
100644
(file)
--- a/
includes/parser/Parser.php
+++ b/
includes/parser/Parser.php
@@
-245,7
+245,7
@@
class Parser {
public $currentRevisionCache;
/**
public $currentRevisionCache;
/**
- * @var bool Recursive call protection.
+ * @var bool
|string
Recursive call protection.
* This variable should be treated as if it were private.
*/
public $mInParse = false;
* This variable should be treated as if it were private.
*/
public $mInParse = false;
@@
-4974,6
+4974,7
@@
class Parser {
$ig->setContextTitle( $this->mTitle );
$ig->setShowBytes( false );
$ig->setContextTitle( $this->mTitle );
$ig->setShowBytes( false );
+ $ig->setShowDimensions( false );
$ig->setShowFilename( false );
$ig->setParser( $this );
$ig->setHideBadImages();
$ig->setShowFilename( false );
$ig->setParser( $this );
$ig->setHideBadImages();
@@
-6072,9
+6073,13
@@
class Parser {
protected function lock() {
if ( $this->mInParse ) {
throw new MWException( "Parser state cleared while parsing. "
protected function lock() {
if ( $this->mInParse ) {
throw new MWException( "Parser state cleared while parsing. "
- . "Did you call Parser::parse recursively?
"
);
+ . "Did you call Parser::parse recursively?
Lock is held by: " . $this->mInParse
);
}
}
- $this->mInParse = true;
+
+ // Save the backtrace when locking, so that if some code tries locking again,
+ // we can print the lock owner's backtrace for easier debugging
+ $e = new Exception;
+ $this->mInParse = $e->getTraceAsString();
$recursiveCheck = new ScopedCallback( function() {
$this->mInParse = false;
$recursiveCheck = new ScopedCallback( function() {
$this->mInParse = false;