mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-29 07:32:30 +00:00
Refactor freezing of JS objects
- Shallow-freezing of objects is never used in our codebase, so remove that code path. - Deep-freeze is bugged in recent versions of SpiderMonkey (see bug https://bugzilla.mozilla.org/show_bug.cgi?id=1930258). Until a fix and/or a better API is provided, reimplement this feature by recusively freezing object properties. - Add tests for the deepfreeze function.
This commit is contained in:
@@ -124,7 +124,7 @@ JS::Value GetEngineInfo(const ScriptInterface& scriptInterface)
|
||||
"engine_version", engine_version,
|
||||
"mods", mods);
|
||||
|
||||
Script::FreezeObject(rq, metainfo, true);
|
||||
Script::DeepFreezeObject(rq, metainfo);
|
||||
|
||||
return metainfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user