Giter Site home page Giter Site logo

Comments (2)

erights avatar erights commented on August 30, 2024
).then(harden, harden);

Aside from hardening, this is not semantics preserving. You probably meant:

).then(harden, (er) => { throw harden(er); })

or

).then(harden, (er) => Promise.reject(harden(er)))

from agoric-sdk.

erights avatar erights commented on August 30, 2024

We need to do more of this hardening ourselves, even in the return context. If we release objects we've made without hardening them, then they are not defensive. In this particular case the array is fresh and transferred rather than shared, so there's not actually any damage our clients can do to us by mutating the array. But the testing code doesn't have any way to tell. And we don't have enough static checks to tell at the releasing side either. As @dckc says, about 40% of our overall engineering effort is fighting the pervasive mutability of JS.

Assigning this to myself , not that I'm going to put in all the hardens we're missing. But I can take the lead for now at figuring out how to get us to put in the hardens we need, or how to survive not doing so.

@dckc the static analysis you're thinking of doing is likely crucial to this effort. In recognition of that I'm adding you to the assignees as well.

from agoric-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.