This is a partial fix for #45 that coalesces sandboxes for the main process, reusing a single sandbox for all modules loaded in that process, so globals like Object return the expected results in cross-module equality comparisons. In the process, it removes the "duck typing" workaround that we landed in #26.
Sandbox coalescing for renderer processes still doesn't work, and I'm not sure why, but I've described the issue in #93, and this branch continues to use discrete sandboxes for each module loaded in that process.
I also updated some commentary and un-refactored injectModuleGlobals, which is only called at one site, and which is mis-named in any case.
This is a partial fix for #45 that coalesces sandboxes for the main process, reusing a single sandbox for all modules loaded in that process, so globals like Object return the expected results in cross-module equality comparisons. In the process, it removes the "duck typing" workaround that we landed in #26.
Sandbox coalescing for renderer processes still doesn't work, and I'm not sure why, but I've described the issue in #93, and this branch continues to use discrete sandboxes for each module loaded in that process.
I also updated some commentary and un-refactored injectModuleGlobals, which is only called at one site, and which is mis-named in any case.
@brendandahl How does this look to you?