|
@ -911,7 +911,7 @@ void SetupDomainUse(const FunctionCallbackInfo<Value>& args) { |
|
|
if (using_domains) return; |
|
|
if (using_domains) return; |
|
|
HandleScope scope(node_isolate); |
|
|
HandleScope scope(node_isolate); |
|
|
using_domains = true; |
|
|
using_domains = true; |
|
|
Local<Object> process = Local<Object>::New(node_isolate, process_p); |
|
|
Local<Object> process = PersistentToLocal(process_p); |
|
|
Local<Value> tdc_v = process->Get(String::New("_tickDomainCallback")); |
|
|
Local<Value> tdc_v = process->Get(String::New("_tickDomainCallback")); |
|
|
Local<Value> ndt_v = process->Get(String::New("_nextDomainTick")); |
|
|
Local<Value> ndt_v = process->Get(String::New("_nextDomainTick")); |
|
|
if (!tdc_v->IsFunction()) { |
|
|
if (!tdc_v->IsFunction()) { |
|
@ -991,8 +991,8 @@ MakeDomainCallback(const Handle<Object> object, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// process nextTicks after call
|
|
|
// process nextTicks after call
|
|
|
Local<Object> process = Local<Object>::New(node_isolate, process_p); |
|
|
Local<Object> process = PersistentToLocal(process_p); |
|
|
Local<Function> fn = Local<Function>::New(node_isolate, process_tickCallback); |
|
|
Local<Function> fn = PersistentToLocal(process_tickCallback); |
|
|
fn->Call(process, 0, NULL); |
|
|
fn->Call(process, 0, NULL); |
|
|
|
|
|
|
|
|
if (try_catch.HasCaught()) { |
|
|
if (try_catch.HasCaught()) { |
|
@ -1009,7 +1009,7 @@ MakeCallback(const Handle<Object> object, |
|
|
int argc, |
|
|
int argc, |
|
|
Handle<Value> argv[]) { |
|
|
Handle<Value> argv[]) { |
|
|
// TODO Hook for long stack traces to be made here.
|
|
|
// TODO Hook for long stack traces to be made here.
|
|
|
Local<Object> process = Local<Object>::New(node_isolate, process_p); |
|
|
Local<Object> process = PersistentToLocal(process_p); |
|
|
|
|
|
|
|
|
// lazy load no domain next tick callbacks
|
|
|
// lazy load no domain next tick callbacks
|
|
|
if (process_tickCallback.IsEmpty()) { |
|
|
if (process_tickCallback.IsEmpty()) { |
|
@ -1036,7 +1036,7 @@ MakeCallback(const Handle<Object> object, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// process nextTicks after call
|
|
|
// process nextTicks after call
|
|
|
Local<Function> fn = Local<Function>::New(node_isolate, process_tickCallback); |
|
|
Local<Function> fn = PersistentToLocal(process_tickCallback); |
|
|
fn->Call(process, 0, NULL); |
|
|
fn->Call(process, 0, NULL); |
|
|
|
|
|
|
|
|
if (try_catch.HasCaught()) { |
|
|
if (try_catch.HasCaught()) { |
|
@ -1078,7 +1078,7 @@ MakeCallback(const Handle<Object> object, |
|
|
|
|
|
|
|
|
void SetErrno(uv_err_t err) { |
|
|
void SetErrno(uv_err_t err) { |
|
|
HandleScope scope(node_isolate); |
|
|
HandleScope scope(node_isolate); |
|
|
Local<Object> process = Local<Object>::New(node_isolate, process_p); |
|
|
Local<Object> process = PersistentToLocal(process_p); |
|
|
|
|
|
|
|
|
static Cached<String> errno_symbol; |
|
|
static Cached<String> errno_symbol; |
|
|
if (errno_symbol.IsEmpty()) { |
|
|
if (errno_symbol.IsEmpty()) { |
|
@ -1903,7 +1903,7 @@ void FatalException(Handle<Value> error, Handle<Message> message) { |
|
|
if (fatal_exception_symbol.IsEmpty()) |
|
|
if (fatal_exception_symbol.IsEmpty()) |
|
|
fatal_exception_symbol = String::New("_fatalException"); |
|
|
fatal_exception_symbol = String::New("_fatalException"); |
|
|
|
|
|
|
|
|
Local<Object> process = Local<Object>::New(node_isolate, process_p); |
|
|
Local<Object> process = PersistentToLocal(process_p); |
|
|
Local<Value> fatal_v = process->Get(fatal_exception_symbol); |
|
|
Local<Value> fatal_v = process->Get(fatal_exception_symbol); |
|
|
|
|
|
|
|
|
if (!fatal_v->IsFunction()) { |
|
|
if (!fatal_v->IsFunction()) { |
|
@ -1958,7 +1958,7 @@ static void Binding(const FunctionCallbackInfo<Value>& args) { |
|
|
String::Utf8Value module_v(module); |
|
|
String::Utf8Value module_v(module); |
|
|
node_module_struct* modp; |
|
|
node_module_struct* modp; |
|
|
|
|
|
|
|
|
Local<Object> cache = Local<Object>::New(node_isolate, binding_cache); |
|
|
Local<Object> cache = PersistentToLocal(binding_cache); |
|
|
Local<Object> exports; |
|
|
Local<Object> exports; |
|
|
|
|
|
|
|
|
if (cache->Has(module)) { |
|
|
if (cache->Has(module)) { |
|
@ -1971,7 +1971,7 @@ static void Binding(const FunctionCallbackInfo<Value>& args) { |
|
|
char buf[1024]; |
|
|
char buf[1024]; |
|
|
snprintf(buf, 1024, "Binding %s", *module_v); |
|
|
snprintf(buf, 1024, "Binding %s", *module_v); |
|
|
|
|
|
|
|
|
Local<Array> modules = Local<Array>::New(node_isolate, module_load_list); |
|
|
Local<Array> modules = PersistentToLocal(module_load_list); |
|
|
uint32_t l = modules->Length(); |
|
|
uint32_t l = modules->Length(); |
|
|
modules->Set(l, String::New(buf)); |
|
|
modules->Set(l, String::New(buf)); |
|
|
|
|
|
|
|
|