You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{message }}
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
If I try to evaluate a program that uses a library extending native prototypes, LightTable loses connection with the Node process, saying it crashed, and the console reads the following:
…/LightTable/LightTable.app/Contents/Resources/app.nw/plugins/javascript/node/ltnodeclient.js:99 vm.runInContext(cleanCode(fs.readFileSync(path)), sb, path); ^ TypeError: Object function Object(){[native code] } has no method 'extend' at …/Watai/src/lib/mootools-additions.js:3:8
Indeed, it seems that the sbRequire function wraps original require calls without sharing prototypes, since all modules are evaluated in their own (shared) context, not in the global context.
For reference, this behavior can be tested by trying to evaluate stuff in Watai’s src/index.js.