Skip to content
Snippets Groups Projects
Commit 4f01361a authored by deuce's avatar deuce
Browse files

Create stdio objects in background threads if they exist in the foreground.

These bits may need protection to ensure they are the CORRECT objects.
parent 7ef61e7d
No related branches found
No related tags found
No related merge requests found
......@@ -394,6 +394,12 @@ js_load(JSContext *cx, uintN argc, jsval *arglist)
js_CreateBbsObject(bg->cx, bg->obj);
if (JS_HasProperty(cx, obj, "console", &success) && success)
js_CreateConsoleObject(bg->cx, bg->obj);
if (JS_HasProperty(cx, obj, "stdin", &success) && success)
js_CreateFileObject(bg->cx, bg->obj, "stdin", stdin);
if (JS_HasProperty(cx, obj, "stdout", &success) && success)
js_CreateFileObject(bg->cx, bg->obj, "stdout", stdout);
if (JS_HasProperty(cx, obj, "stderr", &success) && success)
js_CreateFileObject(bg->cx, bg->obj, "stderr", stderr);
JS_SetContextPrivate(bg->cx, bg);
exec_cx = bg->cx;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment