Giter VIP home page Giter VIP logo

Comments (4)

tabatkins avatar tabatkins commented on July 17, 2024

This could have an impact on other scripts running in the background worker.
Should we restart the environement after such an error or not?

Why would that be necessary? Errors don't corrupt the scripting environment, they just tear down the call stack until they're caught (or land at the top scripting context). An error will just invalidate that particular call; the next one will start fresh.

That's important to know for scripts which may want to share data because if the worker can be restarted during a single-frame step, there's no way to accurately pass information from one script to another (or one run to another).

Workers can be restarted in a single frame step; they can be restarted arbitrarily. Between every single invocation, possibly. There is no reliable way to "stash" information between calls, and we're actively seeking to require low-impact ways to make this less reliable, like using a pool of contexts and randomly switching between them between calls.

from css-houdini-drafts.

FremyCompany avatar FremyCompany commented on July 17, 2024

The issue I had in mind is that the script being stopped at some random point in execution may leave a buggy environment around it (globals or scope-local globals incorrectly set, caches filled with buggy values, etc...), which may cause ulterior failures.

Maybe I'm overthinking this issue though, but I wanted to make sure someone else gave it some thought, too.

from css-houdini-drafts.

tabatkins avatar tabatkins commented on July 17, 2024

Your script shouldn't be messing with the global environment in the first place; doing it at all is a mistake, and if you fuck yourself up by getting an error before you can clean up, that's your own fault.

from css-houdini-drafts.

FremyCompany avatar FremyCompany commented on July 17, 2024

Ok, good pooint

from css-houdini-drafts.

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.