Last modified: 2012-06-23 01:44:43 UTC
mw.Uri.clone() copies each property individually, but it doesn't make a deep copy of the properties; almost all properties are simple types where it doesn't matter, but query is an object. What's funny is that this breaks the example in the class documentation: >>> var a = new mw.Uri('http://localhost/w/index.php?foo=bar') >>> var b = a.clone() >>> a.extend({'baz':'quux'}) >>> a.toString() "http://localhost/w/index.php?foo=bar&baz=quux" >>> b.toString() "http://localhost/w/index.php?foo=bar&baz=quux"
Using deep copy now for array and object properties being copied over. https://gerrit.wikimedia.org/r/#/c/12614/
(In reply to comment #1) > Using deep copy now for array and object properties being copied over. > > https://gerrit.wikimedia.org/r/#/c/12614/ Linking to a wrong changeset?
Indeed, he meant: I1c5644409c089e0a864292b8bd5a757ac31daa89