Commit 4f180191 authored by danakj's avatar danakj Committed by Commit Bot

Don't pass a null v8 handle for an empty bitmap.

This causes v8 to crash, instead we pass no 3rd argument at all, which
it will handle gracefully as an undefined.

R=ishell@chromium.org

Bug: 1093391
Change-Id: I1fdfe64bef348062495e2d5d6db940f36f2db982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2419141Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808505}
parent 3e313645
......@@ -109,8 +109,8 @@ std::vector<v8::Local<v8::Value>> ConvertBitmapToV8(
args.push_back(v8::Number::New(isolate, bitmap.info().width()));
args.push_back(v8::Number::New(isolate, bitmap.info().height()));
if (bitmap.isNull()) {
// Empty value for the bitmap.
args.emplace_back();
// The 3rd argument will be undefined (an empty argument is not valid and
// would crash).
return args;
}
......
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