ELinks 0.18.0
Data Structures | Macros | Typedefs | Functions | Variables
spidermonkey-shared.h File Reference
#include <jsapi.h>
#include <jsfriendapi.h>
#include <js/Conversions.h>
#include "util/string.h"
Include dependency graph for spidermonkey-shared.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  spidermonkeyFunctionSpec
 An ELinks-specific replacement for JSFunctionSpec. More...
 

Macros

#define ELINKS_CAST_PROP_PARAMS
 

Typedefs

typedef struct spidermonkeyFunctionSpec spidermonkeyFunctionSpec
 An ELinks-specific replacement for JSFunctionSpec.
 

Functions

int spidermonkey_runtime_addref (void)
 
void spidermonkey_runtime_release (void)
 
void spidermonkey_release_all_runtimes (void)
 
bool spidermonkey_DefineFunctions (JSContext *cx, JSObject *obj, const spidermonkeyFunctionSpec *fs)
 
JSObject * spidermonkey_InitClass (JSContext *cx, JSObject *obj, JSObject *parent_proto, const JSClass *clasp, JSNative constructor, unsigned int nargs, JSPropertySpec *ps, const spidermonkeyFunctionSpec *fs, JSPropertySpec *static_ps, const spidermonkeyFunctionSpec *static_fs, const char *name)
 
bool spidermonkey_check_if_function_name (const spidermonkeyFunctionSpec funcs[], const char *string)
 
static char * jsval_to_string (JSContext *ctx, JS::HandleValue hvp)
 
static char * jsid_to_string (JSContext *ctx, JS::HandleId hid)
 

Variables

JSRuntime * spidermonkey_runtime
 
JSContext * main_ctx
 
long spidermonkey_memory_limit
 

Macro Definition Documentation

◆ ELINKS_CAST_PROP_PARAMS

#define ELINKS_CAST_PROP_PARAMS
Value:
JSObject *obj = (hobj.get()); \
JS::Value *vp = (hvp.address());

Typedef Documentation

◆ spidermonkeyFunctionSpec

An ELinks-specific replacement for JSFunctionSpec.

Bug 1016: In SpiderMonkey 1.7 bundled with XULRunner 1.8, jsapi.h defines JSFunctionSpec in different ways depending on whether MOZILLA_1_8_BRANCH is defined, and there is no obvious way for ELinks to check whether MOZILLA_1_8_BRANCH was defined when the library was built. Avoid the unstable JSFunctionSpec definitions and use this ELinks-specific structure instead.

Function Documentation

◆ jsid_to_string()

static char * jsid_to_string ( JSContext *  ctx,
JS::HandleId  hid 
)
inlinestatic

◆ jsval_to_string()

static char * jsval_to_string ( JSContext *  ctx,
JS::HandleValue  hvp 
)
inlinestatic

◆ spidermonkey_check_if_function_name()

bool spidermonkey_check_if_function_name ( const spidermonkeyFunctionSpec  funcs[],
const char *  string 
)

◆ spidermonkey_DefineFunctions()

bool spidermonkey_DefineFunctions ( JSContext *  cx,
JSObject *  obj,
const spidermonkeyFunctionSpec *  fs 
)

◆ spidermonkey_InitClass()

JSObject * spidermonkey_InitClass ( JSContext *  cx,
JSObject *  obj,
JSObject *  parent_proto,
const JSClass *  clasp,
JSNative  constructor,
unsigned int  nargs,
JSPropertySpec *  ps,
const spidermonkeyFunctionSpec *  fs,
JSPropertySpec *  static_ps,
const spidermonkeyFunctionSpec *  static_fs,
const char *  name 
)

◆ spidermonkey_release_all_runtimes()

void spidermonkey_release_all_runtimes ( void  )

◆ spidermonkey_runtime_addref()

int spidermonkey_runtime_addref ( void  )

◆ spidermonkey_runtime_release()

void spidermonkey_runtime_release ( void  )

Variable Documentation

◆ main_ctx

JSContext* main_ctx
extern

◆ spidermonkey_memory_limit

long spidermonkey_memory_limit
extern

◆ spidermonkey_runtime

JSRuntime* spidermonkey_runtime
extern