@@ -909,7 +909,6 @@ Local<Value> WinapiErrnoException(Isolate* isolate,
909909
910910
911911void SetupAsyncListener (const FunctionCallbackInfo<Value>& args) {
912- HandleScope handle_scope (args.GetIsolate ());
913912 Environment* env = Environment::GetCurrent (args.GetIsolate ());
914913
915914 assert (args[0 ]->IsObject ());
@@ -979,7 +978,6 @@ void RunMicrotasks(const FunctionCallbackInfo<Value>& args) {
979978
980979
981980void SetupNextTick (const FunctionCallbackInfo<Value>& args) {
982- HandleScope handle_scope (args.GetIsolate ());
983981 Environment* env = Environment::GetCurrent (args.GetIsolate ());
984982
985983 assert (args[0 ]->IsObject ());
@@ -1552,7 +1550,6 @@ static Local<Value> ExecuteString(Environment* env,
15521550
15531551static void GetActiveRequests (const FunctionCallbackInfo<Value>& args) {
15541552 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1555- HandleScope scope (env->isolate ());
15561553
15571554 Local<Array> ary = Array::New (args.GetIsolate ());
15581555 QUEUE* q = NULL ;
@@ -1573,7 +1570,6 @@ static void GetActiveRequests(const FunctionCallbackInfo<Value>& args) {
15731570// implemented here for consistency with GetActiveRequests().
15741571void GetActiveHandles (const FunctionCallbackInfo<Value>& args) {
15751572 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1576- HandleScope scope (env->isolate ());
15771573
15781574 Local<Array> ary = Array::New (env->isolate ());
15791575 QUEUE* q = NULL ;
@@ -1603,7 +1599,6 @@ static void Abort(const FunctionCallbackInfo<Value>& args) {
16031599
16041600static void Chdir (const FunctionCallbackInfo<Value>& args) {
16051601 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1606- HandleScope scope (env->isolate ());
16071602
16081603 if (args.Length () != 1 || !args[0 ]->IsString ()) {
16091604 // FIXME(bnoordhuis) ThrowTypeError?
@@ -1620,7 +1615,6 @@ static void Chdir(const FunctionCallbackInfo<Value>& args) {
16201615
16211616static void Cwd (const FunctionCallbackInfo<Value>& args) {
16221617 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1623- HandleScope scope (env->isolate ());
16241618#ifdef _WIN32
16251619 /* MAX_PATH is in characters, not bytes. Make sure we have enough headroom. */
16261620 char buf[MAX_PATH * 4 ];
@@ -1644,7 +1638,6 @@ static void Cwd(const FunctionCallbackInfo<Value>& args) {
16441638
16451639static void Umask (const FunctionCallbackInfo<Value>& args) {
16461640 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1647- HandleScope scope (env->isolate ());
16481641 uint32_t old;
16491642
16501643 if (args.Length () < 1 || args[0 ]->IsUndefined ()) {
@@ -1793,7 +1786,6 @@ static void GetGid(const FunctionCallbackInfo<Value>& args) {
17931786
17941787static void SetGid (const FunctionCallbackInfo<Value>& args) {
17951788 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1796- HandleScope scope (env->isolate ());
17971789
17981790 if (!args[0 ]->IsUint32 () && !args[0 ]->IsString ()) {
17991791 return env->ThrowTypeError (" setgid argument must be a number or a string" );
@@ -1813,7 +1805,6 @@ static void SetGid(const FunctionCallbackInfo<Value>& args) {
18131805
18141806static void SetUid (const FunctionCallbackInfo<Value>& args) {
18151807 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1816- HandleScope scope (env->isolate ());
18171808
18181809 if (!args[0 ]->IsUint32 () && !args[0 ]->IsString ()) {
18191810 return env->ThrowTypeError (" setuid argument must be a number or a string" );
@@ -1833,7 +1824,6 @@ static void SetUid(const FunctionCallbackInfo<Value>& args) {
18331824
18341825static void GetGroups (const FunctionCallbackInfo<Value>& args) {
18351826 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1836- HandleScope scope (env->isolate ());
18371827
18381828 int ngroups = getgroups (0 , NULL );
18391829
@@ -1872,7 +1862,6 @@ static void GetGroups(const FunctionCallbackInfo<Value>& args) {
18721862
18731863static void SetGroups (const FunctionCallbackInfo<Value>& args) {
18741864 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1875- HandleScope scope (env->isolate ());
18761865
18771866 if (!args[0 ]->IsArray ()) {
18781867 return env->ThrowTypeError (" argument 1 must be an array" );
@@ -1904,7 +1893,6 @@ static void SetGroups(const FunctionCallbackInfo<Value>& args) {
19041893
19051894static void InitGroups (const FunctionCallbackInfo<Value>& args) {
19061895 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1907- HandleScope scope (env->isolate ());
19081896
19091897 if (!args[0 ]->IsUint32 () && !args[0 ]->IsString ()) {
19101898 return env->ThrowTypeError (" argument 1 must be a number or a string" );
@@ -1954,15 +1942,12 @@ static void InitGroups(const FunctionCallbackInfo<Value>& args) {
19541942
19551943
19561944void Exit (const FunctionCallbackInfo<Value>& args) {
1957- Environment* env = Environment::GetCurrent (args.GetIsolate ());
1958- HandleScope scope (env->isolate ());
19591945 exit (args[0 ]->Int32Value ());
19601946}
19611947
19621948
19631949static void Uptime (const FunctionCallbackInfo<Value>& args) {
19641950 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1965- HandleScope scope (env->isolate ());
19661951 double uptime;
19671952
19681953 uv_update_time (env->event_loop ());
@@ -1974,7 +1959,6 @@ static void Uptime(const FunctionCallbackInfo<Value>& args) {
19741959
19751960void MemoryUsage (const FunctionCallbackInfo<Value>& args) {
19761961 Environment* env = Environment::GetCurrent (args.GetIsolate ());
1977- HandleScope scope (env->isolate ());
19781962
19791963 size_t rss;
19801964 int err = uv_resident_set_memory (&rss);
@@ -2002,7 +1986,6 @@ void MemoryUsage(const FunctionCallbackInfo<Value>& args) {
20021986
20031987void Kill (const FunctionCallbackInfo<Value>& args) {
20041988 Environment* env = Environment::GetCurrent (args.GetIsolate ());
2005- HandleScope scope (env->isolate ());
20061989
20071990 if (args.Length () != 2 ) {
20081991 return env->ThrowError (" Bad argument." );
@@ -2024,7 +2007,6 @@ void Kill(const FunctionCallbackInfo<Value>& args) {
20242007// Pass in an Array from a previous hrtime() call to instead get a time diff.
20252008void Hrtime (const FunctionCallbackInfo<Value>& args) {
20262009 Environment* env = Environment::GetCurrent (args.GetIsolate ());
2027- HandleScope scope (env->isolate ());
20282010
20292011 uint64_t t = uv_hrtime ();
20302012
@@ -2079,7 +2061,6 @@ typedef void (UV_DYNAMIC* extInit)(Handle<Object> exports);
20792061// when two contexts try to load the same shared object. Maybe have a shadow
20802062// cache that's a plain C list or hash table that's shared across contexts?
20812063void DLOpen (const FunctionCallbackInfo<Value>& args) {
2082- HandleScope handle_scope (args.GetIsolate ());
20832064 Environment* env = Environment::GetCurrent (args.GetIsolate ());
20842065 struct node_module * mp;
20852066 uv_lib_t lib;
@@ -2223,7 +2204,6 @@ void OnMessage(Handle<Message> message, Handle<Value> error) {
22232204
22242205
22252206static void Binding (const FunctionCallbackInfo<Value>& args) {
2226- HandleScope handle_scope (args.GetIsolate ());
22272207 Environment* env = Environment::GetCurrent (args.GetIsolate ());
22282208
22292209 Local<String> module = args[0 ]->ToString ();
@@ -2528,7 +2508,6 @@ static void DebugEnd(const FunctionCallbackInfo<Value>& args);
25282508
25292509void NeedImmediateCallbackGetter (Local<String> property,
25302510 const PropertyCallbackInfo<Value>& info) {
2531- HandleScope handle_scope (info.GetIsolate ());
25322511 Environment* env = Environment::GetCurrent (info.GetIsolate ());
25332512 const uv_check_t * immediate_check_handle = env->immediate_check_handle ();
25342513 bool active = uv_is_active (
@@ -2589,14 +2568,12 @@ void StopProfilerIdleNotifier(Environment* env) {
25892568
25902569
25912570void StartProfilerIdleNotifier (const FunctionCallbackInfo<Value>& args) {
2592- HandleScope handle_scope (args.GetIsolate ());
25932571 Environment* env = Environment::GetCurrent (args.GetIsolate ());
25942572 StartProfilerIdleNotifier (env);
25952573}
25962574
25972575
25982576void StopProfilerIdleNotifier (const FunctionCallbackInfo<Value>& args) {
2599- HandleScope handle_scope (args.GetIsolate ());
26002577 Environment* env = Environment::GetCurrent (args.GetIsolate ());
26012578 StopProfilerIdleNotifier (env);
26022579}
@@ -2847,7 +2824,6 @@ static void SignalExit(int signo) {
28472824// function, it is useful to bypass JavaScript entirely.
28482825static void RawDebug (const FunctionCallbackInfo<Value>& args) {
28492826 Environment* env = Environment::GetCurrent (args.GetIsolate ());
2850- HandleScope scope (env->isolate ());
28512827
28522828 assert (args.Length () == 1 && args[0 ]->IsString () &&
28532829 " must be called with a single string" );
@@ -3217,7 +3193,6 @@ static void RegisterSignalHandler(int signal,
32173193
32183194void DebugProcess (const FunctionCallbackInfo<Value>& args) {
32193195 Environment* env = Environment::GetCurrent (args.GetIsolate ());
3220- HandleScope scope (env->isolate ());
32213196
32223197 if (args.Length () != 1 ) {
32233198 return env->ThrowError (" Invalid number of arguments." );
@@ -3306,7 +3281,6 @@ static int RegisterDebugSignalHandler() {
33063281static void DebugProcess (const FunctionCallbackInfo<Value>& args) {
33073282 Isolate* isolate = args.GetIsolate ();
33083283 Environment* env = Environment::GetCurrent (isolate);
3309- HandleScope scope (isolate);
33103284 DWORD pid;
33113285 HANDLE process = NULL ;
33123286 HANDLE thread = NULL ;
0 commit comments