HomeWildfire Games

Make JS GUI Objects Proxy objects.

Description

Make JS GUI Objects Proxy objects.

The JS-side counterparts of C++ objects are now Proxy objects, in anticipation of SM60 changes that remove the get/set hooks entirely.
This makes semantic sense too as they are essentially phantom wrappers around the C++ objects, with no proper JS representation.

By using different proxy handlers for different GUI object types, we can further fix issues encountered in D2136 by defining the relevant functions only on objects that should have them.

The main complexity with proxy handlers is that Spidermonkey assumes in several places that they are static and data-less, so they cannot be used directly to hold data. This diff works around that issue by storing per-script-interface data in the CGui directly.

Further API changes in SM60 make this slightly cleaner.

Comments by: Itms

Refs #5859

Differential Revision: https://code.wildfiregames.com/D2768