v8toolkit  0.0.1
Utility library for embedding V8 Javascript engine in a c++ program
Static Public Member Functions | List of all members
v8toolkit::Platform Class Reference

#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 ()
 

Detailed Description

A singleton responsible for initializing the v8 platform and creating isolate helpers.

Definition at line 656 of file javascript.h.

Member Function Documentation

void v8toolkit::Platform::expose_gc ( )
static

Definition at line 396 of file javascript.cpp.

void v8toolkit::Platform::set_max_memory ( int  memory_size_in_mb)
static

Definition at line 402 of file javascript.cpp.

void v8toolkit::Platform::init ( int  argc,
char **  argv,
std::string const &  snapshot_directory = "" 
)
static

Parses argv for v8-specific options, applies them, and removes them from argv and adjusts argc accordingly.

Parameters
snapshot_directorydirectory 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().

Here is the call graph for this function:

Here is the caller graph for this function:

void v8toolkit::Platform::cleanup ( )
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.

std::shared_ptr< Isolate > v8toolkit::Platform::create_isolate ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: