Changes between Version 1 and Version 4 of Ticket #1434


Ignore:
Timestamp:
04/01/2015 10:06:07 AM (5 years ago)
Author:
sebastian
Comment:

I would prefer to close #2013 as duplicate of this issue, since it was filed later and only addresses a subset of these changes.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1434

    • Property Cc sebastian trev added
    • Property Component changed from Unknown to Build-and-Release-Tools
    • Property Ready set
  • Ticket #1434 – Description

    v1 v4  
    1 We have been working on removing non-standard features from our js files. This is just the next step, removing some of those from the buildtools repository. JShydra has a lot of "for each" usage that might prove annoying to handle, because the replacement "for (..of..)" throws on null and undefined. 
     1=== Background === 
     2 
     3We already removed non-standard code from the `adblockplus` repository (#312), but there is still some non-standard code left in the `buildtools` repository which is bundled with Firefox extensions. 
     4 
     5=== What to change === 
     6* Replace `{__proto__: null}` with `Object.create(null)` in `bootstrap.js.tmpl` and `lib/keySelector.js`. 
     7* Replace `for each (..)` with `for (.. of ..)` loops in `lib/keySelector.js`. 
     8* Replace `__defineGetter__()` and `__defineSetter__()` with `Object.defineProperty()` in `lib/hooks.js` and `lib/prefs.js`. 
     9* Replace `obj.__lookupGetter__(name)` with `Object.getOwnPropertyDescriptor(obj, name).get` in `lib/hooks.js`.