forked from TurboWarp/scratch-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
Extensions attempting to access runtime.extensionRuntimeOptions encounter a TypeError because this property is not initialized in the Runtime constructor.
Requested Solution
Add proper initialization in the Runtime class constructor:
// In src/engine/runtime.js constructor
this.extensionRuntimeOptions = {};Requirements
- ONLY modify the Runtime constructor - do not delete or modify any other code
- Add the single line initialization
- Add tests to verify the property exists and is accessible
- Add JSDoc documentation for the property
- DO NOT delete any files
- DO NOT remove any existing functionality
- DO NOT modify files other than runtime.js and test files
Success Criteria
- Property
extensionRuntimeOptionsis initialized as empty object - Extensions can safely access the property without TypeError
- All existing tests continue to pass
- New tests verify the initialization
- Total changes should be ~10-20 lines added across runtime.js and test files
Related
- Replaces JS extension: initialize runtime.extensionRuntimeOptions and guard unsandbox flag to prevent TypeError #16 (which made unintended destructive changes)
- Backlink: JS extension: initialize runtime.extensionRuntimeOptions and guard unsandbox flag to prevent TypeError #16
- Requested by: @supervoidcoder
⚠️ Important Warning for AI Agents
This is a 2-line fix in the constructor. If your solution involves:
- Deleting hundreds or thousands of lines
- Removing entire files
- Modifying core VM functionality beyond the constructor
- Making changes to virtual-machine.js
STOP IMMEDIATELY and reconsider your approach. You are probably going down the wrong path.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working