Unfortunately I am having issues getting Script::New working properly.

The application first creates an isotope, scopes et cetera. 
-----------------------------------------------------------------
    Isolate* isolate = Isolate::GetCurrent();
    Locker locker(isolate);
    Isolate::Scope isolate_scope(isolate);
    HandleScope handle_scope(isolate);
    Handle<Context> context = Context::New(isolate);
    Context::Scope context_scope(context);
    if (preload_file(file_arg) != 0) {
        return 0;
    }
    {
        isolate->Exit();
        Unlocker unlocker(isolate);
        // // start all actors and wait for them
    }
    return 0;
-----------------------------------------------------------------
As far as I understand the documentation the context and scope should now 
exist throughout the application.
The scripts are create in preload_file:
-----------------------------------------------------------------
script_map[file] = Script::New(String::New(file_source.c_str(), 
file_source.size()), String::New(file.c_    str(), file.size()));
-----------------------------------------------------------------
where file_source and file are strings that exist in the scope of 
preload_file. The script_map is global and is
initialised before threads start and doesn't change.

If the program is executed I get the following error:
#
# Fatal error in CALL_AND_RETRY
# Allocation failed - process out of memory
#

The problem is most likely related to me using Script::New wrong or 
context, scope issues?
Script::New returns a local handle is it possible to use persistent handles 
instead in this case
and get rid of the context and scopes?

The reason why I am trying to precompile scripts is to keep the start up 
time of actors low.
If there are constantly actors starting for a certain task recompiling 
scripts every time they start
would be unnecessary overhead.

The only related issue I was able to find is this open issue:
https://code.google.com/p/v8/issues/detail?id=2726

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to