@@ -117,6 +117,7 @@ using v8::Local;
117
117
using v8::Locker;
118
118
using v8::MaybeLocal;
119
119
using v8::Message;
120
+ using v8::Name;
120
121
using v8::Number;
121
122
using v8::Object;
122
123
using v8::ObjectTemplate;
@@ -2470,15 +2471,15 @@ static void LinkedBinding(const FunctionCallbackInfo<Value>& args) {
2470
2471
args.GetReturnValue ().Set (effective_exports);
2471
2472
}
2472
2473
2473
- static void ProcessTitleGetter (Local<String > property,
2474
+ static void ProcessTitleGetter (Local<Name > property,
2474
2475
const PropertyCallbackInfo<Value>& info) {
2475
2476
char buffer[512 ];
2476
2477
uv_get_process_title (buffer, sizeof (buffer));
2477
2478
info.GetReturnValue ().Set (String::NewFromUtf8 (info.GetIsolate (), buffer));
2478
2479
}
2479
2480
2480
2481
2481
- static void ProcessTitleSetter (Local<String > property,
2482
+ static void ProcessTitleSetter (Local<Name > property,
2482
2483
Local<Value> value,
2483
2484
const PropertyCallbackInfo<void >& info) {
2484
2485
node::Utf8Value title (info.GetIsolate (), value);
@@ -2707,13 +2708,13 @@ static Local<Object> GetFeatures(Environment* env) {
2707
2708
}
2708
2709
2709
2710
2710
- static void DebugPortGetter (Local<String > property,
2711
+ static void DebugPortGetter (Local<Name > property,
2711
2712
const PropertyCallbackInfo<Value>& info) {
2712
2713
info.GetReturnValue ().Set (debug_port);
2713
2714
}
2714
2715
2715
2716
2716
- static void DebugPortSetter (Local<String > property,
2717
+ static void DebugPortSetter (Local<Name > property,
2717
2718
Local<Value> value,
2718
2719
const PropertyCallbackInfo<void >& info) {
2719
2720
debug_port = value->Int32Value ();
@@ -2725,7 +2726,7 @@ static void DebugPause(const FunctionCallbackInfo<Value>& args);
2725
2726
static void DebugEnd (const FunctionCallbackInfo<Value>& args);
2726
2727
2727
2728
2728
- void NeedImmediateCallbackGetter (Local<String > property,
2729
+ void NeedImmediateCallbackGetter (Local<Name > property,
2729
2730
const PropertyCallbackInfo<Value>& info) {
2730
2731
Environment* env = Environment::GetCurrent (info);
2731
2732
const uv_check_t * immediate_check_handle = env->immediate_check_handle ();
@@ -2736,7 +2737,7 @@ void NeedImmediateCallbackGetter(Local<String> property,
2736
2737
2737
2738
2738
2739
static void NeedImmediateCallbackSetter (
2739
- Local<String > property,
2740
+ Local<Name > property,
2740
2741
Local<Value> value,
2741
2742
const PropertyCallbackInfo<void >& info) {
2742
2743
Environment* env = Environment::GetCurrent (info);
@@ -2820,10 +2821,12 @@ void SetupProcessObject(Environment* env,
2820
2821
2821
2822
Local<Object> process = env->process_object ();
2822
2823
2823
- process->SetAccessor (env->title_string (),
2824
- ProcessTitleGetter,
2825
- ProcessTitleSetter,
2826
- env->as_external ());
2824
+ auto maybe = process->SetAccessor (env->context (),
2825
+ env->title_string (),
2826
+ ProcessTitleGetter,
2827
+ ProcessTitleSetter,
2828
+ env->as_external ());
2829
+ CHECK (maybe.FromJust ());
2827
2830
2828
2831
// process.version
2829
2832
READONLY_PROPERTY (process,
@@ -2986,10 +2989,12 @@ void SetupProcessObject(Environment* env,
2986
2989
2987
2990
READONLY_PROPERTY (process, " pid" , Integer::New (env->isolate (), getpid ()));
2988
2991
READONLY_PROPERTY (process, " features" , GetFeatures (env));
2989
- process->SetAccessor (env->need_imm_cb_string (),
2990
- NeedImmediateCallbackGetter,
2991
- NeedImmediateCallbackSetter,
2992
- env->as_external ());
2992
+ maybe = process->SetAccessor (env->context (),
2993
+ env->need_imm_cb_string (),
2994
+ NeedImmediateCallbackGetter,
2995
+ NeedImmediateCallbackSetter,
2996
+ env->as_external ());
2997
+ CHECK (maybe.FromJust ());
2993
2998
2994
2999
// -e, --eval
2995
3000
if (eval_string) {
@@ -3074,10 +3079,13 @@ void SetupProcessObject(Environment* env,
3074
3079
process->Set (env->exec_path_string (), exec_path_value);
3075
3080
delete[] exec_path;
3076
3081
3077
- process->SetAccessor (env->debug_port_string (),
3078
- DebugPortGetter,
3079
- DebugPortSetter,
3080
- env->as_external ());
3082
+ maybe = process->SetAccessor (env->context (),
3083
+ env->debug_port_string (),
3084
+ DebugPortGetter,
3085
+ DebugPortSetter,
3086
+ env->as_external ());
3087
+ CHECK (maybe.FromJust ());
3088
+
3081
3089
3082
3090
// define various internal methods
3083
3091
env->SetMethod (process,
0 commit comments