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

Issue 29804571: Noissue - Remove unnecessary references to undefined (Closed)

Created:
June 12, 2018, 4:27 a.m. by Manish Jethani
Modified:
June 12, 2018, 9:15 a.m.
Reviewers:
sergei, kzar
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

undefined is a global variable of type "undefined". Access to undefined, the variable, is significantly slower than just using null instead. This is why we use the check `typeof foo == "undefined"` rather than `foo == undefined` all over the place. This patch removes the last remaining references to undefined.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use null in sparse array #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -4 lines) Patch
M lib/content/elemHideEmulation.js View 1 1 chunk +1 line, -1 line 1 comment Download
M lib/filterStorage.js View 1 chunk +1 line, -1 line 0 comments Download
M lib/synchronizer.js View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 4
Manish Jethani
June 12, 2018, 4:27 a.m. (2018-06-12 04:27:52 UTC) #1
Manish Jethani
Patch Set 1 https://codereview.adblockplus.org/29804571/diff/29804572/lib/filterStorage.js File lib/filterStorage.js (left): https://codereview.adblockplus.org/29804571/diff/29804572/lib/filterStorage.js#oldcode769 lib/filterStorage.js:769: this.wantObj = undefined; There's no reason ...
June 12, 2018, 4:33 a.m. (2018-06-12 04:33:25 UTC) #2
Manish Jethani
Patch Set 2: Use null in sparse array https://codereview.adblockplus.org/29804571/diff/29805555/lib/content/elemHideEmulation.js File lib/content/elemHideEmulation.js (left): https://codereview.adblockplus.org/29804571/diff/29805555/lib/content/elemHideEmulation.js#oldcode190 lib/content/elemHideEmulation.js:190: regexpRegexp.exec(text) ...
June 12, 2018, 7:47 a.m. (2018-06-12 07:47:51 UTC) #3
sergei
June 12, 2018, 9:12 a.m. (2018-06-12 09:12:31 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld