Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vm crash #194

Open
JustablockCode opened this issue Feb 10, 2024 · 2 comments
Open

vm crash #194

JustablockCode opened this issue Feb 10, 2024 · 2 comments

Comments

@JustablockCode
Copy link

when extension returns [Object object] vm crashes

@CST1229
Copy link

CST1229 commented Feb 10, 2024

https://docs.turbowarp.org/development/extensions/unsandboxed#increased-power-brings-increased-responsibility

Input and boolean blocks must return a valid value. While sandboxed extensions are free to neglect this, unsandboxed extensions that don't return proper values (string, number, or boolean) can break scripts in unknown ways.

@FurryR
Copy link

FurryR commented Apr 21, 2024

class ReturnValue extends String {
  constructor (value) {
    super(value.toString())
    this.value = value
  }
}
// ...
block (args, util) {
  return new ReturnValue({})
}

may help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants