Opened 4 years ago

Last modified 4 years ago

#4090 closed change

Make require() load modules lazily — at Initial Version

Reported by: trev Assignee: trev
Priority: P3 Milestone: Adblock-Plus-1.12.1-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: sebastian, kzar Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29345407/
https://codereview.adblockplus.org/29345518/

Description

Background

Currently, all modules will load immediately in order to generate their scopes. This makes it necessary to specify them in a very specific order in the convert_js section of metadata.common, otherwise require could be called for a module before its scope is defined.

What to change

With #4088 the module scopes won't be executed immediately. Our require() implementation should then call the scope when called for the first time for a module.

Change History (0)

Note: See TracTickets for help on using tickets.