Commit graph

2035 commits

Author SHA1 Message Date
Brad Jorsch eabb081c4f Handle non-finite numbers
There's no reason LuaStandalone cannot handle NaN and Inf.

Also, add some unit tests to check this.

Change-Id: I8570242a792e212489ad24dfc04fb1f2940190a5
2012-12-13 13:40:18 -05:00
Translation updater bot bbd155c72a Localisation updates from http://translatewiki.net.
Change-Id: I644d9959a543693add908e4a0aadfd3faad21005
2012-12-04 21:07:32 +00:00
Tim Starling d5bd1102d0 Fixed transmission of \0 from Lua standalone
* string.format() truncates the string at a null character, causing a
  deadlock when Lua attempts to send null characters to PHP. Use
  concatenation instead.
* Added test.
* Fixed an error reporting issue in the console, which I happened to
  notice at the same time as the above bug.

Change-Id: I2e6061a04512557492bffbd04bc09ca3bc1d80d6
2012-12-03 17:46:11 +11:00
Translation updater bot 037463715c Localisation updates from http://translatewiki.net.
Change-Id: I6d8fad75ee4d4f23f1dbc6eda37cecdc017b349f
2012-11-27 21:09:21 +00:00
Translation updater bot 54aef84b55 Localisation updates from http://translatewiki.net.
Change-Id: Ib77390bf10acdcd236e444144b6619f693a0e26c
2012-11-19 20:19:31 +00:00
Brad Jorsch 50cde6fe8d Handle cloned parsers correctly
If the parser is cloned, we need to give the new instance a new
ScribuntoEngine. Otherwise when one of the clones has ParserClearState
called, the engine for the other will also be unexpectedly destroyed.

Change-Id: Ia6ded082e5adddfbd91387bca825a305ccbf831d
Depends-On: Ieec65c908d71e89b9a66f83b9a626f842aadacbb
2012-11-16 11:27:55 -05:00
Translation updater bot c2aa4c7c39 Localisation updates from http://translatewiki.net.
Change-Id: Id4b1bb86b43fb60efd81c2a11da4a1d9990bb5a5
2012-11-02 20:20:32 +00:00
Translation updater bot f3c9525a2b Localisation updates from http://translatewiki.net.
Change-Id: I47231de2f7d4c3bcae0578dc3debf76560e60cb8
2012-10-31 20:40:52 +00:00
Translation updater bot 396bf79e27 Localisation updates from http://translatewiki.net.
Change-Id: I493e7a04b756e2488aa613c0a22663ee44756c3b
2012-10-22 01:43:21 +00:00
Siebrand Mazeland e7dd3e5275 Replace remaining wfMsgExt calls.
All of these were in getScriptTraceHtml, which used some magic ($msgOptions) which is no
longer that easy when using the Message class. As only inContentLanguage ('content') was
used, I documented that, and added the relevant code paths.

I tried to keep the code as readable and brief as possible and also removed an unused
local variable ($linedefined).

Change-Id: I38e1ce0bf90d9aa462e88ca7c795fcc848c4f118
2012-10-09 06:08:48 +00:00
Siebrand Mazeland 9d5759e985 Merge "Reformat JavaScript and CSS code." 2012-10-07 23:58:45 +00:00
Siebrand Mazeland d88f246cfc Merge "Replace deprecated methods." 2012-10-07 14:18:39 +00:00
Siebrand Mazeland ce27d6eefc Reformat JavaScript and CSS code.
Change-Id: Id5630bacfbc97ace3d2c68b69403b463eb6b5e87
2012-10-07 16:13:39 +02:00
Siebrand Mazeland 42c0c55225 Replace deprecated methods.
Change-Id: Ifab19bbc6f75148c8dcee758e09149280e2b229b
2012-10-07 02:59:30 +02:00
Siebrand Mazeland 7e43f640a6 Tweaks and fixes suggested by JSHint/JSLint.
Change-Id: Ia2e089dba787fafbd48e27a3da197dec328c5181
2012-10-07 02:36:28 +02:00
Translation updater bot 840a9fa586 Localisation updates from http://translatewiki.net.
Change-Id: I0af2b3951ca6ffdba0aa35721d44596d8692b86a
2012-10-03 20:17:56 +00:00
Translation updater bot 26e1149f64 Localisation updates from http://translatewiki.net.
Change-Id: I9ee9799add485fbac4274d38468297cc5ea4a954
2012-10-02 13:55:11 +00:00
Translation updater bot 303b8c0517 Localisation updates from http://translatewiki.net.
Change-Id: I0bb1c31875ae5739a162ca87b1ad6a2ab2b43bda
2012-09-26 19:52:17 +00:00
Tim Starling 27428cad87 Remove trailing whitespace
Test commit for wmf branch update script

Change-Id: Iafc71899d4cd9b827ec7325453950acf4f02314c
2012-09-26 13:35:46 +10:00
Tim Starling e287d47b4a (bug 40480) Fix "undefined class constant 'PERCENT'"
Do not try to use the new LuaSandbox class constants in the
backwards-compatible section of the code.

Change-Id: I0c4ca9e019095fce5bd1c1d17dbdf36dc198dfb7
2012-09-25 14:55:11 +10:00
Translation updater bot 071f22b295 Localisation updates from http://translatewiki.net.
Change-Id: I7881ef8c8ad93a8647618de5b45f65740ab6e5cc
2012-09-23 19:05:01 +00:00
Victor Vasiliev e286aba827 Merge "tests: skip CPU limit test on Darwin" 2012-09-22 05:45:40 +00:00
Translation updater bot 895c023996 Localisation updates from http://translatewiki.net.
Change-Id: I525c685727dad72d3e03d39c00d3d136d7eba2dd
2012-09-19 20:42:53 +00:00
Translation updater bot a2d18c9613 Localisation updates from http://translatewiki.net.
Change-Id: Id385858058d4654b63809078fa30d82fec06b11f
2012-09-16 19:55:29 +00:00
Translation updater bot 48f735fec8 Localisation updates from http://translatewiki.net.
Change-Id: I9ebadad0f6e83634aa9a677e4ca4b68ad2af81be
2012-09-15 19:53:13 +00:00
Translation updater bot 250bfc4e72 Localisation updates from http://translatewiki.net.
Change-Id: Idd46e729928cb3d272a5e8ef1c33c0f62edbe4fc
2012-09-14 21:10:41 +00:00
Translation updater bot ed05cb627f Localisation updates from http://translatewiki.net.
Change-Id: Ia17a6972df0832aa4262948c7d864bffb8ce74b0
2012-09-13 20:45:12 +00:00
Antoine Musso a179bd6182 tests: skip CPU limit test on Darwin
The Darwin does not support POSIX timer which is being used to limit CPU
usage. Running the tests on Mac OS X would never end so we are just
skipping it.

Change-Id: I56c3e8cd1cba15d33256192aa7e721e6448c7a2e
2012-09-12 17:46:47 -07:00
Translation updater bot 01fc480cb2 Localisation updates from http://translatewiki.net.
Change-Id: I3f87ced73d7c8ce12926e7b2900d5a6983f94f17
2012-09-12 19:55:16 +00:00
Tim Starling b6ee139cdc (bug 39816) Remove undefined template callback
Change-Id: I644d73ff3471889f2dc27515ba7d5db7ebe4ea1f
2012-09-06 15:34:14 +10:00
Tim Starling 776cc1f93d (bug 39606) Add a tracking category for script errors
Change-Id: I5a925ccd41e494a7b06d98b1e1656250b80c143a
2012-09-06 14:56:42 +10:00
Tim Starling aacca08815 Add mw.getCurrentFrame()
Provide a convenient means to access the current frame so that the
parameter passed to module functions won't need to be conventionally
stored in a global variable.

Change-Id: I0254d86a1094866a3ce4899e4021d0b33367bb35
2012-09-06 14:54:26 +10:00
Tim Starling 9859591271 Allow time functions in LuaStandalone
As in LuaSandbox I7e116c76

Change-Id: I783e2ae802999701ebcd4d1a1b3d113a21b4ca9e
2012-09-06 11:01:53 +10:00
Tim Starling 996ea62765 LuaSandbox profiler support
Add a profiler report to the limit report for pages with more than 1s
of Lua time. Uses the profiler introduced in I0b83a914 of LuaSandbox.

Also, fixed some circular references which were preventing the
LuaSandbox object from being destroyed when Scribunto::resetEngine()
was called. Otherwise a large number of interval timers could be started
due to a LuaSandbox object resource leak.

Change-Id: I5487fe2623974939d07f09f7197e86a5f297a8f1
2012-09-06 01:00:20 +00:00
Translation updater bot 2bc7fac2f7 Localisation updates from http://translatewiki.net.
Change-Id: I3e61139bc26df539dea57fc306b60f568c4f1992
2012-09-05 19:24:20 +00:00
Translation updater bot aea0553458 Localisation updates from http://translatewiki.net.
Change-Id: I05222a32f2b3d0f3d359904b45b5cc486c1a1f3c
2012-08-31 19:52:29 +00:00
Translation updater bot deaf8ecaf0 Localisation updates from http://translatewiki.net.
Change-Id: I7a327cdcd903c40a8e7d62a526609054905f7d8b
2012-08-29 19:22:59 +00:00
Tim Starling 89cf9f187d Fixed parser tests broken by I97f7732010ebfebcf494ac9e308275b34dbb9609
Change-Id: Ifd46b5dd25edd912d3fc2ebb92326da11c9df67b
2012-08-28 16:23:52 +10:00
Tim Starling ea1347a620 Don't run Preprocessor::preprocessToObj() on cache hits
Don't run Preprocessor::preprocessToObj() for frame:preprocess() on
cache hits, only do it on cache misses. The rationale for passing a
PPNode from expandTemplate() to doCachedExpansion() remains: Parser
implements its own cache, as well as extra logic, inside
getTemplateDom().

Change-Id: I29e85e3e98d9590bbd1ae49fb2bb4deaa895edc9
2012-08-27 11:14:25 +10:00
Amir E. Aharoni c8809168b4 Add Hebrew namespace aliases
Change-Id: Iafa658b113525b72e813961e7565a6046aca1219
2012-08-26 18:20:59 +00:00
Translation updater bot 8403384819 Localisation updates from http://translatewiki.net.
Change-Id: Ifeac328990da73d38e65087b6378fa0f1bd63b3b
2012-08-25 19:02:31 +00:00
Translation updater bot f204940db2 Localisation updates from http://translatewiki.net.
Change-Id: Ib995e4d86f412a69c4c8a2d7540e2116103050bf
2012-08-22 19:54:19 +00:00
Translation updater bot dd1bf82ab8 Localisation updates from http://translatewiki.net.
Change-Id: I21fd2e389d2c532c813394363e08183c859ce7c9
2012-08-21 20:09:41 +00:00
Translation updater bot 73b5e91465 Localisation updates from http://translatewiki.net.
Change-Id: Ib2a37996dbdba125a96b4734577ba1b17a98d48c
2012-08-20 19:21:38 +00:00
Translation updater bot 01fc0d0a1f Localisation updates from http://translatewiki.net.
Change-Id: I1badb00cf5810ce9a3188cb7783d47b8e4251d75
2012-08-19 14:50:06 +00:00
Translation updater bot b4731fec23 Localisation updates from http://translatewiki.net.
Change-Id: I8e91cf2de63bde362f939968b3fddff92257e5e5
2012-08-17 13:08:33 +00:00
Siebrand 0a9082d8b2 Merge "Rephrased two messages to make them clearer" 2012-08-17 08:06:30 +00:00
Siebrand 8fd06a55dc Merge "Rephrase scribunto-ignore-errors" 2012-08-17 08:06:08 +00:00
Translation updater bot 7b63a55daa Localisation updates from http://translatewiki.net.
Change-Id: Ibfaac777ddd24a61188a207cd48fe2ca04b8885d
2012-08-16 20:28:51 +00:00
Translation updater bot 58e6a872ec Localisation updates from http://translatewiki.net.
Change-Id: I319433962b104a733f483e200c6752f8fbd51fc6
2012-08-15 19:55:52 +00:00