Opened 22 months ago

Closed 22 months ago

Last modified 21 months ago

#6020 closed defect (fixed)

Unnecessary code being included in webpack bundles

Reported by: kzar Assignee: kzar
Priority: P2 Milestone:
Module: Automation Keywords:
Cc: trev, sebastian, tlucas, sylvaing@… Blocked By:
Blocking: #6022 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29602573/

Description (last modified by trev)

Environment

adblockpluschrome ecdd8caaf81a

How to reproduce

  1. Open the Chrome developer tools for the background page
  2. Click the Sources pane and expand the webpack:// section

Observed behaviour

The unused (webpack)/buildin/global.js is listed.

Expected behaviour

That file should not be listed, since we don't use it!

Notes

The code in question uses eval which is flagged by Mozilla's add-on linter. It is never being used and wouldn't work anyway because of CSP.

Change History (11)

comment:1 Changed 22 months ago by kzar

  • Cc awagner@… kewisch@… removed
  • Summary changed from Unnesissary code being included in webpack bundles to Unnecessary code being included in webpack bundles

comment:2 Changed 22 months ago by tlucas

  • Ready set

comment:3 Changed 22 months ago by trev

  • Description modified (diff)

comment:4 Changed 22 months ago by kzar

According to https://webpack.github.io/analyse it's being included due to a "cjs require" in adblockpluscore/lib/rusha.js.

Last edited 22 months ago by kzar (previous) (diff)

comment:5 Changed 22 months ago by kzar

It's this check in adblockpluscore/lib/rusha.js which is causing it: typeof global !== 'undefined' && global.Buffer && global.Buffer.isBuffer(data)

comment:6 Changed 22 months ago by kzar

  • Component changed from Build-and-Release-Tools to Core

comment:7 Changed 22 months ago by kzar

  • Component changed from Core to Build-and-Release-Tools
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:8 Changed 22 months ago by abpbot

comment:9 Changed 22 months ago by kzar

  • Blocking 6022 added

comment:10 Changed 22 months ago by kzar

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:11 Changed 21 months ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Done. Files/code no longer present in webpack:// section.

ABP 3.0.1.1939
Chrome 62 / Windows 10

Note: See TracTickets for help on using tickets.