Unrelated; WME script is not based on any existing scripting engine.
I didn't study SpiderMonkey too deeply, but I'm not sure it could handle all the features necessary for game scripting, such as many separate threads running, the ability to break execution at any time, to save the entire state of all scripts and restore it later etc.
It is always a great dilemma whether to choose an existing scripting component or to create your own from scratch. Both approaches have their pros and cons.
If I had to choose a pre-made scripting engine today, I'd probably go for
Lua, it's lightweight, supports threading and could be easily modified to support the game-spcific features.