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
Platform: Darwin Callisto 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
Subsystem: repl
Calling the undocumented REPLServer.createContext() has unexpected side effects. When the method is called, the value for the server instance's underscoreAssigned and lines properties reset. Here is a reproducible test case.
The internal method `REPLServer.createContext()` had
unexpected side effects. When called, the value for the
`underscoreAssigned` and `lines` properties were reset.
This change ensures that those properties are not modified
when a context is created.
Fixes: nodejs#14226
Refs: nodejs#7619
PR-URL: nodejs#14331
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
addaleax
pushed a commit
to addaleax/ayo
that referenced
this issue
Sep 5, 2017
The internal method `REPLServer.createContext()` had
unexpected side effects. When called, the value for the
`underscoreAssigned` and `lines` properties were reset.
This change ensures that those properties are not modified
when a context is created.
Fixes: nodejs/node#14226
Refs: nodejs/node#7619
PR-URL: nodejs/node#14331
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Calling the undocumented
REPLServer.createContext()
has unexpected side effects. When the method is called, the value for the server instance'sunderscoreAssigned
andlines
properties reset. Here is a reproducible test case.The overwriting of
underscoreAssigned
was introduced in ad8257f, while the overwriting oflines
is 6 years old at least.I discovered this when looking for usages of
createContext()
in the interest of deprecating it andREPLServer.resetContext()
for #7619.The text was updated successfully, but these errors were encountered: