electron/shell/browser
Samuel Attard ac031bf8de
feat: I guess it's esm (#37535)
* fix: allow ESM loads from within ASAR files

* fix: ensure that ESM entry points finish loading before app ready

* fix: allow loading ESM entrypoints via default_app

* fix: allow ESM loading for renderer preloads

* docs: document current known limitations of esm

* chore: add patches to support blending esm handlers

* refactor: use SetDefersLoading instead of JoinAppCode in renderers

Blink has it's own event loop so pumping the uv loop in the renderer is not enough, luckily in blink we can suspend the loading of the frame while we do additional work.

* chore: add patch to expose SetDefersLoading

* fix: use fileURLToPath instead of pathname

* chore: update per PR feedback

* fix: fs.exists/existsSync should never throw

* fix: convert path to file url before importing

* fix: oops

* fix: oops

* Update docs/tutorial/esm-limitations.md

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* windows...

* windows...

* chore: update patches

* spec: fix tests and document empty body edge case

* Apply suggestions from code review

Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* spec: add tests for esm

* spec: windows

* chore: update per PR feedback

* chore: update patches

* Update shell/common/node_bindings.h

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* chore: update patches

* rebase

* use cjs loader by default for preload scripts

* chore: fix lint

* chore: update patches

* chore: update patches

* chore: fix patches

* build: debug depshash

* ?

* Revert "build: debug depshash"

This reverts commit 0de82523fb.

* chore: allow electron as builtin protocol in esm loader

* Revert "Revert "build: debug depshash""

This reverts commit ff86b1243c.

* chore: fix esm doc

* chore: update node patches

---------

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
2023-08-30 17:38:07 -07:00
..
api chore: remove deprecated `ipcRenderer.sendTo()` (#39087) 2023-08-28 10:29:27 -04:00
badging chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
bluetooth chore: eliminate a few uses of base::AdaptCallbackForRepeating() (#38293) 2023-05-18 17:01:44 -04:00
extensions feat: support `chrome.scripting` extension APIs (#39395) 2023-08-28 10:39:28 -04:00
hid perf: small perf changes in HidChooserController (#39057) 2023-07-19 16:54:30 +02:00
lib refactor: add gin_helper::Dictionary::CreateEmpty() helper (#39547) 2023-08-21 10:43:41 +09:00
linux chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
mac chore: cleanup arc migration helpers (#39606) 2023-08-23 09:54:21 -04:00
media chore: bump chromium to 117.0.5852.0 (main) (#38891) 2023-07-01 16:22:55 -04:00
net chore: bump chromium to 117.0.5913.0 (main) (#39172) 2023-07-31 10:47:32 -07:00
notifications chore: bump chromium to 117.0.5923.0 (main) (#39304) 2023-08-04 10:47:29 +02:00
osr chore: bump chromium to 118.0.5949.0 (main) (#39505) 2023-08-15 15:44:24 -04:00
plugins chore: bump chromium to 98.0.4706.0 (main) (#31555) 2021-11-24 09:45:59 +01:00
printing chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
resources chore: strip trailing whitespace (#35969) 2023-02-01 12:59:16 +01:00
serial refactor: add gin_helper::Dictionary::CreateEmpty() helper (#39547) 2023-08-21 10:43:41 +09:00
ui chore: cleanup arc migration helpers (#39606) 2023-08-23 09:54:21 -04:00
usb refactor: prefer Sorted variant of MakeFixedFlatSet() (#39537) 2023-08-17 08:58:04 -05:00
webauthn fix: WebAuthn Discoverable Credential (Resident Credential) (#35374) 2022-09-20 15:47:42 -07:00
win fix: initial dark mode title bar on Windows 10 (#39287) 2023-07-31 22:02:23 -07:00
auto_updater.cc refactor: change defined(MAS_BUILD) to IS_MAS_BUILD() (#36332) 2022-11-14 12:46:52 -08:00
auto_updater.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
auto_updater_mac.mm chore: bump chromium to 117.0.5923.0 (main) (#39304) 2023-08-04 10:47:29 +02:00
browser.cc fix: set supported scale factors on startup (#38836) 2023-06-20 12:24:03 -04:00
browser.h fix: set supported scale factors on startup (#38836) 2023-06-20 12:24:03 -04:00
browser_linux.cc chore: bump chromium to 113.0.5668.0 (main) (#37646) 2023-03-22 20:09:13 -04:00
browser_mac.mm chore: cleanup arc migration helpers (#39606) 2023-08-23 09:54:21 -04:00
browser_observer.h feat: add `did-resign-active` event on app (#37933) 2023-04-18 16:53:39 +02:00
browser_process_impl.cc chore: bump chromium to 117.0.5892.0 (main) (#39118) 2023-07-19 00:26:27 +02:00
browser_process_impl.h chore: bump chromium to 117.0.5892.0 (main) (#39118) 2023-07-19 00:26:27 +02:00
browser_win.cc refactor: add gin_helper::Dictionary::CreateEmpty() helper (#39547) 2023-08-21 10:43:41 +09:00
certificate_manager_model.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
certificate_manager_model.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
child_web_contents_tracker.cc chore: bump chromium to 99.0.4767.0 (main) (#31986) 2022-01-10 17:31:39 -05:00
child_web_contents_tracker.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
cookie_change_notifier.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
cookie_change_notifier.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
draggable_region_provider.h refactor: move draggable regions to WebContents (#36230) 2022-11-07 10:15:57 -08:00
electron_api_ipc_handler_impl.cc chore: remove deprecated `ipcRenderer.sendTo()` (#39087) 2023-08-28 10:29:27 -04:00
electron_api_ipc_handler_impl.h chore: remove deprecated `ipcRenderer.sendTo()` (#39087) 2023-08-28 10:29:27 -04:00
electron_autofill_driver.cc fix: account for `BrowserView` bounds in setting autofill popup bounds (#38489) 2023-06-06 10:21:42 +02:00
electron_autofill_driver.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_autofill_driver_factory.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
electron_autofill_driver_factory.h chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
electron_browser_client.cc fix: Chrome Extensions service worker host registration (#39290) 2023-08-01 15:04:38 +09:00
electron_browser_client.h chore: bump chromium to 117.0.5897.0 (main) (#39147) 2023-07-20 09:36:59 +02:00
electron_browser_context.cc fix: instantiate tab video tracks from BrowserCaptureMediaStreamTrack (#39074) 2023-08-23 10:49:24 +02:00
electron_browser_context.h chore: bump chromium to 117.0.5852.0 (main) (#38891) 2023-07-01 16:22:55 -04:00
electron_browser_main_parts.cc feat: I guess it's esm (#37535) 2023-08-30 17:38:07 -07:00
electron_browser_main_parts.h refactor: node::Environment self-cleanup (#39604) 2023-08-23 09:56:16 -04:00
electron_browser_main_parts_linux.cc chore: bump chromium to 110.0.5415.0 (main) (#36186) 2022-11-17 14:59:23 -05:00
electron_browser_main_parts_mac.mm chore: cleanup arc migration helpers (#39606) 2023-08-23 09:54:21 -04:00
electron_browser_main_parts_posix.cc chore: bump chromium to 103.0.5046.0 (main) (#33906) 2022-05-17 12:48:40 -04:00
electron_download_manager_delegate.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
electron_download_manager_delegate.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_gpu_client.cc chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
electron_gpu_client.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
electron_javascript_dialog_manager.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
electron_javascript_dialog_manager.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
electron_navigation_throttle.cc feat: add `will-frame-navigate` event (#34418) 2023-03-28 10:55:41 -04:00
electron_navigation_throttle.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
electron_pdf_web_contents_helper_client.cc chore: bump chromium to 108.0.5329.0 (main) (#35628) 2022-10-03 13:21:00 -07:00
electron_pdf_web_contents_helper_client.h chore: bump chromium to 108.0.5329.0 (main) (#35628) 2022-10-03 13:21:00 -07:00
electron_permission_manager.cc chore: bump chromium to 117.0.5938.0 (main) (#39375) 2023-08-15 10:49:41 -05:00
electron_permission_manager.h chore: bump chromium to 117.0.5938.0 (main) (#39375) 2023-08-15 10:49:41 -05:00
electron_speech_recognition_manager_delegate.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
electron_speech_recognition_manager_delegate.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
electron_web_contents_utility_handler_impl.cc refactor: use content::GlobalRenderFrameHostId (#38843) 2023-06-20 15:32:31 +02:00
electron_web_contents_utility_handler_impl.h refactor: use content::GlobalRenderFrameHostId (#38843) 2023-06-20 15:32:31 +02:00
electron_web_ui_controller_factory.cc chore: clean up forward declarations (#29904) 2021-07-02 09:51:37 +09:00
electron_web_ui_controller_factory.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
event_emitter_mixin.h refactor: simplify events (#37099) 2023-02-13 13:39:18 -08:00
extended_web_contents_observer.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
fake_location_provider.cc chore: bump chromium to 116.0.5845.0 (main) (#38827) 2023-06-22 10:51:15 +02:00
fake_location_provider.h chore: bump chromium to 116.0.5845.0 (main) (#38827) 2023-06-22 10:51:15 +02:00
feature_list.cc build: remove enable_picture_in_picture build flag (#38620) 2023-06-07 23:56:31 -07:00
feature_list.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
file_select_helper.cc chore: stop using a `RenderWidgetHost` observer in `FileSelectHelper` (#38168) 2023-05-04 21:43:29 +02:00
file_select_helper.h chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
file_select_helper_mac.mm chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
font_defaults.cc chore: fix clang-tidy warnings (#38079) 2023-04-26 10:09:54 -04:00
font_defaults.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
javascript_environment.cc refactor: node::Environment self-cleanup (#39604) 2023-08-23 09:56:16 -04:00
javascript_environment.h refactor: node::Environment self-cleanup (#39604) 2023-08-23 09:56:16 -04:00
login_handler.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
login_handler.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
microtasks_runner.cc chore: bump chromium to 107.0.5274.0 (main) (#35375) 2022-09-07 09:46:37 +02:00
microtasks_runner.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
native_browser_view.cc chore: trim unused STL includes (#29414) 2021-06-01 10:34:44 +09:00
native_browser_view.h chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
native_browser_view_mac.h chore: bump chromium to 117.0.5892.0 (main) (#39118) 2023-07-19 00:26:27 +02:00
native_browser_view_mac.mm fix: ensure `BrowserView` bounds are always relative to window (#39605) 2023-08-23 09:55:31 -04:00
native_browser_view_views.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
native_browser_view_views.h chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
native_window.cc fix: `resizable: false` should disable fullscreen button at start (#39086) 2023-07-25 12:18:36 -04:00
native_window.h fix: reparenting after `BrowserWindow.destroy()` (#39062) 2023-07-26 16:47:32 +02:00
native_window_features.cc feat: enable WaylandWindowDecorations by default (#39582) 2023-08-24 17:02:05 -04:00
native_window_features.h fix: Add support for Wayland window decorations (#29618) 2022-01-26 13:59:09 -08:00
native_window_mac.h fix: reparenting after `BrowserWindow.destroy()` (#39062) 2023-07-26 16:47:32 +02:00
native_window_mac.mm fix: ensure windows respect fullscreenability with different resizability values (#39620) 2023-08-24 16:54:08 -04:00
native_window_observer.h feat: replace scroll-touch* with generic input-event (#35531) 2022-09-27 12:47:46 -07:00
native_window_views.cc fix: explorer restart does not recreated thumbnail toolbar buttons (#39551) 2023-08-21 09:43:49 +09:00
native_window_views.h fix: explorer restart does not recreated thumbnail toolbar buttons (#39551) 2023-08-21 09:43:49 +09:00
native_window_views_win.cc fix: explorer restart does not recreated thumbnail toolbar buttons (#39551) 2023-08-21 09:43:49 +09:00
network_hints_handler_impl.cc chore: bump chromium to 113.0.5636.0 (main) (#37130) 2023-03-10 10:07:42 -06:00
network_hints_handler_impl.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
protocol_registry.cc chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
protocol_registry.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
relauncher.cc chore: use emplace when possible (#37877) 2023-04-11 15:21:03 +09:00
relauncher.h chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
relauncher_linux.cc chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
relauncher_mac.cc chore: use emplace when possible (#37877) 2023-04-11 15:21:03 +09:00
relauncher_win.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
session_preferences.cc refactor: add SessionPreferences::CreateForBrowserContext() (#38656) 2023-06-09 11:20:43 -05:00
session_preferences.h refactor: add SessionPreferences::CreateForBrowserContext() (#38656) 2023-06-09 11:20:43 -05:00
special_storage_policy.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
special_storage_policy.h chore: bump chromium to 106.0.5216.0 (main) (#34993) 2022-08-17 11:35:53 -07:00
web_contents_permission_helper.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
web_contents_permission_helper.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
web_contents_preferences.cc feat: I guess it's esm (#37535) 2023-08-30 17:38:07 -07:00
web_contents_preferences.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
web_contents_zoom_controller.cc refactor: update `WebContentsZoomController` (#39428) 2023-08-15 10:33:30 +09:00
web_contents_zoom_controller.h refactor: update `WebContentsZoomController` (#39428) 2023-08-15 10:33:30 +09:00
web_contents_zoom_observer.h refactor: update `WebContentsZoomController` (#39428) 2023-08-15 10:33:30 +09:00
web_view_guest_delegate.cc refactor: update `WebContentsZoomController` (#39428) 2023-08-15 10:33:30 +09:00
web_view_guest_delegate.h refactor: update `WebContentsZoomController` (#39428) 2023-08-15 10:33:30 +09:00
web_view_manager.cc chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
web_view_manager.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
window_list.cc fix: DCHECK when calling app.exit() (#33035) 2022-02-23 16:27:54 +01:00
window_list.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
window_list_observer.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
zoom_level_delegate.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
zoom_level_delegate.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00