Commit ef651b34 authored by Anna Henningsen's avatar Anna Henningsen Committed by Commit Bot

[isolate] Add null checks to native_context getters

Having had these would have saved me quite a bit of time :)

Change-Id: I36a04cc89db9ceaa786a146d01a6b0f4444f5729
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914214Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65015}
parent fc175857
...@@ -26,10 +26,12 @@ void Isolate::set_context(Context context) { ...@@ -26,10 +26,12 @@ void Isolate::set_context(Context context) {
} }
Handle<NativeContext> Isolate::native_context() { Handle<NativeContext> Isolate::native_context() {
DCHECK(!context().is_null());
return handle(context().native_context(), this); return handle(context().native_context(), this);
} }
NativeContext Isolate::raw_native_context() { NativeContext Isolate::raw_native_context() {
DCHECK(!context().is_null());
return context().native_context(); return context().native_context();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment