v8toolkit
0.0.1
Utility library for embedding V8 Javascript engine in a c++ program
|
#include <javascript.h>
Static Public Member Functions | |
static void | expose_gc () |
static void | set_max_memory (int memory_size_in_mb) |
static void | init (int argc, char **argv, std::string const &snapshot_directory="") |
static void | cleanup () |
static IsolatePtr | create_isolate () |
A singleton responsible for initializing the v8 platform and creating isolate helpers.
Definition at line 656 of file javascript.h.
|
static |
Definition at line 396 of file javascript.cpp.
|
static |
Definition at line 402 of file javascript.cpp.
|
static |
Parses argv for v8-specific options, applies them, and removes them from argv and adjusts argc accordingly.
snapshot_directory | directory in which to look for v8 snapshot .bin files. Leave as empty string if linking against v8 compiled with use_snapshots=false |
Definition at line 408 of file javascript.cpp.
References v8toolkit::expose_gc(), and v8toolkit::process_v8_flags().
Referenced by main().
|
static |
Shuts down V8. Any subsequent V8 usage is probably undefined, so make sure everything is done before you call this.
Definition at line 434 of file javascript.cpp.
|
static |
Creates a new Isolate wrapping a new v8::Isolate instance. An Isolate will remain as long as the caller has a shared_ptr to the Isolate or any Contexts created from the Isolate still exist.
Definition at line 444 of file javascript.cpp.
References v8toolkit::Context::Isolate, v8toolkit::Context::isolate, and v8toolkit::Script::Script().
Referenced by JavaScriptFixture::JavaScriptFixture().