summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordustinnewman98 <dustinnewman98@gmail.com>2018-03-01 22:11:55 -0800
committerMichaƫl Zasso <targos@protonmail.com>2018-03-22 15:54:52 +0100
commit49b2969ef4731ad4a3b63476d80ce31075526613 (patch)
tree98ebe9eb18fc2ca8ec0ac6cd5d4bc791bcae0a63 /src
parent4e1f0907dae9916215985a9f81bf3dec1eeaeaef (diff)
downloadandroid-node-v8-49b2969ef4731ad4a3b63476d80ce31075526613.tar.gz
android-node-v8-49b2969ef4731ad4a3b63476d80ce31075526613.tar.bz2
android-node-v8-49b2969ef4731ad4a3b63476d80ce31075526613.zip
vm: migrate isContext to internal/errors
PR-URL: https://github.com/nodejs/node/pull/19268 Refs: https://github.com/nodejs/node/issues/18106 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src')
-rw-r--r--src/node_contextify.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/node_contextify.cc b/src/node_contextify.cc
index a7f46f6126..91df37b37d 100644
--- a/src/node_contextify.cc
+++ b/src/node_contextify.cc
@@ -276,10 +276,8 @@ void ContextifyContext::MakeContext(const FunctionCallbackInfo<Value>& args) {
void ContextifyContext::IsContext(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
- if (!args[0]->IsObject()) {
- env->ThrowTypeError("sandbox must be an object");
- return;
- }
+ CHECK(args[0]->IsObject());
+
Local<Object> sandbox = args[0].As<Object>();
Maybe<bool> result =