Skip to content

Commit 613d76e

Browse files
committed
src: shorten Object{Wrap,Unwrap}
Going back to the original names of Wrap/Unwrap now that most all the class members that duplicate the name and functionality have been removed.
1 parent f2e3be5 commit 613d76e

20 files changed

Lines changed: 156 additions & 156 deletions

src/fs_event_wrap.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void FSEventWrap::New(const FunctionCallbackInfo<Value>& args) {
100100
void FSEventWrap::Start(const FunctionCallbackInfo<Value>& args) {
101101
HandleScope scope(node_isolate);
102102

103-
FSEventWrap* wrap = UnwrapObject<FSEventWrap>(args.This());
103+
FSEventWrap* wrap = Unwrap<FSEventWrap>(args.This());
104104

105105
if (args.Length() < 1 || !args[0]->IsString()) {
106106
return ThrowTypeError("Bad arguments");
@@ -179,7 +179,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename,
179179
void FSEventWrap::Close(const FunctionCallbackInfo<Value>& args) {
180180
HandleScope scope(node_isolate);
181181

182-
FSEventWrap* wrap = UnwrapObject<FSEventWrap>(args.This());
182+
FSEventWrap* wrap = Unwrap<FSEventWrap>(args.This());
183183

184184
if (wrap == NULL || wrap->initialized_ == false)
185185
return;

src/handle_wrap.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ extern QUEUE handle_wrap_queue;
4444
void HandleWrap::Ref(const FunctionCallbackInfo<Value>& args) {
4545
HandleScope scope(node_isolate);
4646

47-
HandleWrap* wrap = UnwrapObject<HandleWrap>(args.This());
47+
HandleWrap* wrap = Unwrap<HandleWrap>(args.This());
4848

4949
if (wrap != NULL && wrap->handle__ != NULL) {
5050
uv_ref(wrap->handle__);
@@ -56,7 +56,7 @@ void HandleWrap::Ref(const FunctionCallbackInfo<Value>& args) {
5656
void HandleWrap::Unref(const FunctionCallbackInfo<Value>& args) {
5757
HandleScope scope(node_isolate);
5858

59-
HandleWrap* wrap = UnwrapObject<HandleWrap>(args.This());
59+
HandleWrap* wrap = Unwrap<HandleWrap>(args.This());
6060

6161
if (wrap != NULL && wrap->handle__ != NULL) {
6262
uv_unref(wrap->handle__);
@@ -68,7 +68,7 @@ void HandleWrap::Unref(const FunctionCallbackInfo<Value>& args) {
6868
void HandleWrap::Close(const FunctionCallbackInfo<Value>& args) {
6969
HandleScope scope(node_isolate);
7070

71-
HandleWrap* wrap = UnwrapObject<HandleWrap>(args.This());
71+
HandleWrap* wrap = Unwrap<HandleWrap>(args.This());
7272

7373
// guard against uninitialized handle or double close
7474
if (wrap == NULL || wrap->handle__ == NULL)
@@ -95,7 +95,7 @@ HandleWrap::HandleWrap(Environment* env,
9595
handle__->data = this;
9696
HandleScope scope(node_isolate);
9797
persistent().Reset(node_isolate, object);
98-
WrapObject<HandleWrap>(object, this);
98+
Wrap<HandleWrap>(object, this);
9999
QUEUE_INSERT_TAIL(&handle_wrap_queue, &handle_wrap_queue_);
100100
}
101101

src/node_contextify.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class ContextifyContext {
180180
HandleScope scope(node_isolate);
181181
Local<Object> wrapper =
182182
env->script_data_constructor_function()->NewInstance();
183-
WrapObject<ContextifyContext>(wrapper, this);
183+
Wrap<ContextifyContext>(wrapper, this);
184184
return scope.Close(wrapper);
185185
}
186186

@@ -300,7 +300,7 @@ class ContextifyContext {
300300
HandleScope scope(node_isolate);
301301

302302
ContextifyContext* ctx =
303-
UnwrapObject<ContextifyContext>(args.Data().As<Object>());
303+
Unwrap<ContextifyContext>(args.Data().As<Object>());
304304

305305
Local<Object> sandbox = PersistentToLocal(node_isolate, ctx->sandbox_);
306306
Local<Value> rv = sandbox->GetRealNamedProperty(property);
@@ -324,7 +324,7 @@ class ContextifyContext {
324324
HandleScope scope(node_isolate);
325325

326326
ContextifyContext* ctx =
327-
UnwrapObject<ContextifyContext>(args.Data().As<Object>());
327+
Unwrap<ContextifyContext>(args.Data().As<Object>());
328328

329329
PersistentToLocal(node_isolate, ctx->sandbox_)->Set(property, value);
330330
}
@@ -336,7 +336,7 @@ class ContextifyContext {
336336
HandleScope scope(node_isolate);
337337

338338
ContextifyContext* ctx =
339-
UnwrapObject<ContextifyContext>(args.Data().As<Object>());
339+
Unwrap<ContextifyContext>(args.Data().As<Object>());
340340

341341
Local<Object> sandbox = PersistentToLocal(node_isolate, ctx->sandbox_);
342342
Local<Object> proxy_global = PersistentToLocal(node_isolate,
@@ -357,7 +357,7 @@ class ContextifyContext {
357357
HandleScope scope(node_isolate);
358358

359359
ContextifyContext* ctx =
360-
UnwrapObject<ContextifyContext>(args.Data().As<Object>());
360+
Unwrap<ContextifyContext>(args.Data().As<Object>());
361361

362362
bool success = PersistentToLocal(node_isolate,
363363
ctx->sandbox_)->Delete(property);
@@ -374,7 +374,7 @@ class ContextifyContext {
374374
HandleScope scope(node_isolate);
375375

376376
ContextifyContext* ctx =
377-
UnwrapObject<ContextifyContext>(args.Data().As<Object>());
377+
Unwrap<ContextifyContext>(args.Data().As<Object>());
378378

379379
Local<Object> sandbox = PersistentToLocal(node_isolate, ctx->sandbox_);
380380
args.GetReturnValue().Set(sandbox->GetPropertyNames());
@@ -575,7 +575,7 @@ class ContextifyScript : public WeakObject {
575575
}
576576

577577
ContextifyScript* wrapped_script =
578-
UnwrapObject<ContextifyScript>(args.This());
578+
Unwrap<ContextifyScript>(args.This());
579579
Local<Script> script = PersistentToLocal(node_isolate,
580580
wrapped_script->script_);
581581

0 commit comments

Comments
 (0)