-
Notifications
You must be signed in to change notification settings - Fork 424
Native Values That Are Not Allowed to Serialize #444
Comments
(Summarizing offline discussion with Sebastian.) |
I thought of a name for this API: |
Recently, It should be straightforward...
In this approach, without involving |
I think there are two different use cases for primitives to be tainted like this.
|
I used to have a magic string for this but we can do better. It would be good to have a materialized value that can be read and used as any other value, but if it ever ends up in the serialized output it should throw.
An example of this is a native file handle. It can be valid to use it during compilation such as in Node's start up phase. However, it will be invalid by the time the application revives. So it can only be temporary.
I used to add this to the module system cache so that if it ever got serialized, I'd know to fix it so that it can be fully cleaned up at the end rather than accidentally live with a bloated output.
The text was updated successfully, but these errors were encountered: