Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
src: replace usage of deprecated Has
  • Loading branch information
targos committed Feb 9, 2016
commit af8ee14805570fedb503aef2ed1b6118a75f652f
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2379,7 +2379,7 @@ static void Binding(const FunctionCallbackInfo<Value>& args) {
Local<Object> cache = env->binding_cache_object();
Local<Object> exports;

if (cache->Has(module)) {
if (cache->Has(env->context(), module).FromJust()) {
exports = cache->Get(module)->ToObject(env->isolate());
args.GetReturnValue().Set(exports);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/node_os.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) {
name = OneByteString(env->isolate(), raw_name);
#endif

if (ret->Has(name)) {
if (ret->Has(env->context(), name).FromJust()) {
ifarr = Local<Array>::Cast(ret->Get(name));
} else {
ifarr = Array::New(env->isolate());
Expand Down
6 changes: 4 additions & 2 deletions src/stream_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ void StreamBase::AfterShutdown(ShutdownWrap* req_wrap, int status) {
req_wrap_obj
};

if (req_wrap->object()->Has(env->oncomplete_string()))
if (req_wrap->object()->Has(env->context(),
env->oncomplete_string()).FromJust())
req_wrap->MakeCallback(env->oncomplete_string(), ARRAY_SIZE(argv), argv);

delete req_wrap;
Expand Down Expand Up @@ -387,7 +388,8 @@ void StreamBase::AfterWrite(WriteWrap* req_wrap, int status) {
wrap->ClearError();
}

if (req_wrap->object()->Has(env->oncomplete_string()))
if (req_wrap->object()->Has(env->context(),
env->oncomplete_string()).FromJust())
req_wrap->MakeCallback(env->oncomplete_string(), ARRAY_SIZE(argv), argv);

req_wrap->Dispose();
Expand Down