1031: Add spidermonkey-shared.c used for both web and user scripts
commit32889bf90887d5117a60e53890a5eeaa84af33a6
authorKalle Olavi Niemitalo <kon@iki.fi>
Wed, 16 Jul 2008 09:32:24 +0000 (16 12:32 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Wed, 16 Jul 2008 09:32:24 +0000 (16 12:32 +0300)
tree1d8c6f15cf332f2cf13c1d14edc9d1003413c505
parentf479d6e82a0837244e80b86cb24436f0578e6643
1031: Add spidermonkey-shared.c used for both web and user scripts

Rename src/ecmascript/spidermonkey/util.c to
src/ecmascript/spidermonkey-shared.c and compile it also when
CONFIG_SCRIPTING_SMJS is enabled but CONFIG_ECMASCRIPT_SPIDERMONKEY is
not.  Then use its functions from src/scripting/smjs/ too.  Move the
corresponding declarations, as well as the inline functions needed by
src/scripting/smjs/, from src/ecmascript/spidermonkey/util.h to
src/ecmascript/spidermonkey-shared.h.

ELinks is nowadays using two JSRuntimes and SpiderMonkey has bugs that
make it crash in such use.  To work around them, ELinks will need to
be changed to use only one JSRuntime.  I am planning to define and
initialize that JSRuntime in src/ecmascript/spidermonkey-shared.c,
now that it's compiled whenever either of the modules is enabled.
21 files changed:
src/ecmascript/Makefile
src/ecmascript/spidermonkey-shared.c [moved from src/ecmascript/spidermonkey/util.c with 91% similarity]
src/ecmascript/spidermonkey-shared.h [copied from src/ecmascript/spidermonkey/util.h with 55% similarity]
src/ecmascript/spidermonkey/Makefile
src/ecmascript/spidermonkey/util.h
src/scripting/smjs/action_object.c
src/scripting/smjs/bookmarks.c
src/scripting/smjs/bookmarks.h
src/scripting/smjs/cache_object.c
src/scripting/smjs/core.c
src/scripting/smjs/core.h
src/scripting/smjs/elinks_object.c
src/scripting/smjs/elinks_object.h
src/scripting/smjs/global_object.c
src/scripting/smjs/global_object.h
src/scripting/smjs/globhist.c
src/scripting/smjs/hooks.c
src/scripting/smjs/keybinding.c
src/scripting/smjs/keybinding.h
src/scripting/smjs/load_uri.c
src/scripting/smjs/view_state_object.c