| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -248,8 +248,7 @@ MaybeLocal<Value> MakeCallback(Isolate* isolate, | |||
| 248 | 248 | Local<Value> argv[], | |
| 249 | 249 | async_context asyncContext) { | |
| 250 | 250 | // Check can_call_into_js() first because calling Get() might do so. | |
| 251 | - Environment* env = | ||
| 252 | - Environment::GetCurrent(recv->GetCreationContext().ToLocalChecked()); | ||
| 251 | + Environment* env = Environment::GetCurrent(recv->GetCreationContextChecked()); | ||
| 253 | 252 | CHECK_NOT_NULL(env); | |
| 254 | 253 | if (!env->can_call_into_js()) return Local<Value>(); | |
| 255 | 254 | ||
@@ -279,7 +278,7 @@ MaybeLocal<Value> MakeCallback(Isolate* isolate, | |||
| 279 | 278 | // Because of the AssignToContext() call in src/node_contextify.cc, | |
| 280 | 279 | // the two contexts need not be the same. | |
| 281 | 280 | Environment* env = | |
| 282 | - Environment::GetCurrent(callback->GetCreationContext().ToLocalChecked()); | ||
| 281 | + Environment::GetCurrent(callback->GetCreationContextChecked()); | ||
| 283 | 282 | CHECK_NOT_NULL(env); | |
| 284 | 283 | Context::Scope context_scope(env->context()); | |
| 285 | 284 | MaybeLocal<Value> ret = | |
@@ -302,7 +301,7 @@ MaybeLocal<Value> MakeSyncCallback(Isolate* isolate, | |||
| 302 | 301 | int argc, | |
| 303 | 302 | Local<Value> argv[]) { | |
| 304 | 303 | Environment* env = | |
| 305 | - Environment::GetCurrent(callback->GetCreationContext().ToLocalChecked()); | ||
| 304 | + Environment::GetCurrent(callback->GetCreationContextChecked()); | ||
| 306 | 305 | CHECK_NOT_NULL(env); | |
| 307 | 306 | if (!env->can_call_into_js()) return Local<Value>(); | |
| 308 | 307 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,8 +55,7 @@ v8::Local<v8::Object> BaseObject::object() const { | |||
| 55 | 55 | v8::Local<v8::Object> BaseObject::object(v8::Isolate* isolate) const { | |
| 56 | 56 | v8::Local<v8::Object> handle = object(); | |
| 57 | 57 | ||
| 58 | - DCHECK_EQ(handle->GetCreationContext().ToLocalChecked()->GetIsolate(), | ||
| 59 | - isolate); | ||
| 58 | + DCHECK_EQ(handle->GetCreationContextChecked()->GetIsolate(), isolate); | ||
| 60 | 59 | DCHECK_EQ(env()->isolate(), isolate); | |
| 61 | 60 | ||
| 62 | 61 | return handle; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,7 +88,7 @@ Local<Context> ModuleWrap::context() const { | |||
| 88 | 88 | // If this fails, there is likely a bug e.g. ModuleWrap::context() is accessed | |
| 89 | 89 | // before the ModuleWrap constructor completes. | |
| 90 | 90 | CHECK(obj->IsObject()); | |
| 91 | - return obj.As<Object>()->GetCreationContext().ToLocalChecked(); | ||
| 91 | + return obj.As<Object>()->GetCreationContextChecked(); | ||
| 92 | 92 | } | |
| 93 | 93 | ||
| 94 | 94 | ModuleWrap* ModuleWrap::GetFromModule(Environment* env, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -790,7 +790,7 @@ void MessagePort::OnMessage(MessageProcessingMode mode) { | |||
| 790 | 790 | ||
| 791 | 791 | HandleScope handle_scope(env()->isolate()); | |
| 792 | 792 | Local<Context> context = | |
| 793 | - object(env()->isolate())->GetCreationContext().ToLocalChecked(); | ||
| 793 | + object(env()->isolate())->GetCreationContextChecked(); | ||
| 794 | 794 | ||
| 795 | 795 | size_t processing_limit; | |
| 796 | 796 | if (mode == MessageProcessingMode::kNormalOperation) { | |
@@ -1048,7 +1048,7 @@ bool GetTransferList(Environment* env, | |||
| 1048 | 1048 | void MessagePort::PostMessage(const FunctionCallbackInfo<Value>& args) { | |
| 1049 | 1049 | Environment* env = Environment::GetCurrent(args); | |
| 1050 | 1050 | Local<Object> obj = args.This(); | |
| 1051 | - Local<Context> context = obj->GetCreationContext().ToLocalChecked(); | ||
| 1051 | + Local<Context> context = obj->GetCreationContextChecked(); | ||
| 1052 | 1052 | ||
| 1053 | 1053 | if (args.Length() == 0) { | |
| 1054 | 1054 | return THROW_ERR_MISSING_ARGS(env, "Not enough arguments to " | |
@@ -1134,9 +1134,9 @@ void MessagePort::ReceiveMessage(const FunctionCallbackInfo<Value>& args) { | |||
| 1134 | 1134 | return; | |
| 1135 | 1135 | } | |
| 1136 | 1136 | ||
| 1137 | - MaybeLocal<Value> payload = port->ReceiveMessage( | ||
| 1138 | - port->object()->GetCreationContext().ToLocalChecked(), | ||
| 1139 | - MessageProcessingMode::kForceReadMessages); | ||
| 1137 | + MaybeLocal<Value> payload = | ||
| 1138 | + port->ReceiveMessage(port->object()->GetCreationContextChecked(), | ||
| 1139 | + MessageProcessingMode::kForceReadMessages); | ||
| 1140 | 1140 | if (!payload.IsEmpty()) | |
| 1141 | 1141 | args.GetReturnValue().Set(payload.ToLocalChecked()); | |
| 1142 | 1142 | } | |
@@ -1547,7 +1547,7 @@ static void MessageChannel(const FunctionCallbackInfo<Value>& args) { | |||
| 1547 | 1547 | return; | |
| 1548 | 1548 | } | |
| 1549 | 1549 | ||
| 1550 | - Local<Context> context = args.This()->GetCreationContext().ToLocalChecked(); | ||
| 1550 | + Local<Context> context = args.This()->GetCreationContextChecked(); | ||
| 1551 | 1551 | Context::Scope context_scope(context); | |
| 1552 | 1552 | ||
| 1553 | 1553 | MessagePort* port1 = MessagePort::New(env, context); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -907,7 +907,7 @@ void GetEnvMessagePort(const FunctionCallbackInfo<Value>& args) { | |||
| 907 | 907 | Local<Object> port = env->message_port(); | |
| 908 | 908 | CHECK_IMPLIES(!env->is_main_thread(), !port.IsEmpty()); | |
| 909 | 909 | if (!port.IsEmpty()) { | |
| 910 | - CHECK_EQ(port->GetCreationContext().ToLocalChecked()->GetIsolate(), | ||
| 910 | + CHECK_EQ(port->GetCreationContextChecked()->GetIsolate(), | ||
| 911 | 911 | args.GetIsolate()); | |
| 912 | 912 | args.GetReturnValue().Set(port); | |
| 913 | 913 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments