Merge "mw.Upload.BookletLayout: Don't explode when the API call fails with 'exception'"
[lhc/web/wiklou.git] / resources / src / mediawiki / mediawiki.js
index 82b4588..b04e01c 100644 (file)
                                obj[ key ] = val;
                        } : function ( obj, key, val, msg ) {
                                msg = 'Use of "' + key + '" is deprecated.' + ( msg ? ( ' ' + msg ) : '' );
-                               // Support: IE8
-                               // Can throw on Object.defineProperty.
-                               try {
-                                       Object.defineProperty( obj, key, {
-                                               configurable: true,
-                                               enumerable: true,
-                                               get: function () {
-                                                       mw.track( 'mw.deprecate', key );
-                                                       mw.log.warn( msg );
-                                                       return val;
-                                               },
-                                               set: function ( newVal ) {
-                                                       mw.track( 'mw.deprecate', key );
-                                                       mw.log.warn( msg );
-                                                       val = newVal;
-                                               }
-                                       } );
-                               } catch ( err ) {
-                                       // Fallback to creating a copy of the value to the object.
-                                       obj[ key ] = val;
-                               }
+                               Object.defineProperty( obj, key, {
+                                       configurable: true,
+                                       enumerable: true,
+                                       get: function () {
+                                               mw.track( 'mw.deprecate', key );
+                                               mw.log.warn( msg );
+                                               return val;
+                                       },
+                                       set: function ( newVal ) {
+                                               mw.track( 'mw.deprecate', key );
+                                               mw.log.warn( msg );
+                                               val = newVal;
+                                       }
+                               } );
+
                        };
 
                        return log;