Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/coreUtils.js

Issue 29746555: Issue 6564 - Replace desc and extend with __proto__ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created April 8, 2018, 8:57 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/filterClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/coreUtils.js
===================================================================
--- a/lib/coreUtils.js
+++ b/lib/coreUtils.js
@@ -12,34 +12,16 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
"use strict";
-function desc(properties)
-{
- let descriptor = {};
- let keys = Object.keys(properties);
-
- for (let key of keys)
- descriptor[key] = Object.getOwnPropertyDescriptor(properties, key);
-
- return descriptor;
-}
-exports.desc = desc;
-
-function extend(cls, properties)
-{
- return Object.create(cls.prototype, desc(properties));
-}
-exports.extend = extend;
-
function findIndex(iterable, callback, thisArg)
{
let index = 0;
for (let item of iterable)
{
if (callback.call(thisArg, item))
return index;
« no previous file with comments | « no previous file | lib/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld