Commit 36f6f5e1 authored by ofrobots's avatar ofrobots Committed by Commit bot

Replace old CHECKs by DCHECKs in HandleApiCall

HandleApiCall is one of the most heavily used builtins on Node.js.
Replace some old CHECKs with DCHECKs.

R=ishell@chromium.org, jochen@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1804433005

Cr-Commit-Position: refs/heads/master@{#34758}
parent ad91d1c6
......@@ -3908,9 +3908,9 @@ MUST_USE_RESULT MaybeHandle<Object> HandleApiCallHelper(
HandleScope scope(isolate);
Handle<HeapObject> function = args.target<HeapObject>();
Handle<JSReceiver> receiver;
// TODO(ishell): turn this back to a DCHECK.
CHECK(function->IsFunctionTemplateInfo() ||
Handle<JSFunction>::cast(function)->shared()->IsApiFunction());
DCHECK(function->IsFunctionTemplateInfo() ||
Handle<JSFunction>::cast(function)->shared()->IsApiFunction());
Handle<FunctionTemplateInfo> fun_data =
function->IsFunctionTemplateInfo()
......@@ -3956,8 +3956,7 @@ MUST_USE_RESULT MaybeHandle<Object> HandleApiCallHelper(
Object* raw_call_data = fun_data->call_code();
if (!raw_call_data->IsUndefined()) {
// TODO(ishell): remove this debugging code.
CHECK(raw_call_data->IsCallHandlerInfo());
DCHECK(raw_call_data->IsCallHandlerInfo());
CallHandlerInfo* call_data = CallHandlerInfo::cast(raw_call_data);
Object* callback_obj = call_data->callback();
v8::FunctionCallback callback =
......
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