bytenode/bytenode

New `LoadBrowserProcessSpecificV8Snapshot` functionality in Electron

jjeff opened this issue · 1 comments

jjeff commented

I'm still trying to get my head around the new LoadBrowserProcessSpecificV8Snapshot Electron functionality and its relationship to Bytenode... and in particular, its relationship to V8 getting deprecated in Electron renderers.

Here are the release notes for Electron 22. Note also, the discussion around the issue that lead to this feature.

It looks like this only affects the main process for now And I'm trying to figure out what "Any other process will use the same path as is used today" means... But does this mean that we could load a Bytenode .jsc file into Electron directly without a loader file?

Anyway, just wanted to start a discussion here and see what this means from a Bytenode perspective.

Initial thoughts:

I have no clue what does the "path used today" part mean. Maybe it means that custom paths for the snapshot is not supported and you have to use the predefined one? I don't know.

For .jsc files to be loaded via this feature: I think at least they have to be compiled using the --no-module flag. Otherwise, even if they are loaded into context, they cannot run without the loader. They are just functions that need to be called in a specific way to get the module.exports populated ... etc.

But even with the --no-module flag, I doubt that they will work. They will likely fail the v8 sanity checks. We need to try and see.