Commit bbad11d3 authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

Remove use of V8CallBoolean in ImageData.

This is deprecated in favor of explicitly checking with v8::Maybe<bool>::To.

Bug: 670615
Change-Id: I71e8f3c1f643a7eabfaf25359581c15565513302
Reviewed-on: https://chromium-review.googlesource.com/c/1298049Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602408}
parent 2f450a83
...@@ -560,10 +560,14 @@ v8::Local<v8::Object> ImageData::AssociateWithWrapper( ...@@ -560,10 +560,14 @@ v8::Local<v8::Object> ImageData::AssociateWithWrapper(
// of the ImageData object to the created v8 object, eliminating the // of the ImageData object to the created v8 object, eliminating the
// C++ callback when accessing the "data" property. // C++ callback when accessing the "data" property.
v8::Local<v8::Value> pixel_array = ToV8(data_.Get(), wrapper, isolate); v8::Local<v8::Value> pixel_array = ToV8(data_.Get(), wrapper, isolate);
bool defined_property;
if (pixel_array.IsEmpty() || if (pixel_array.IsEmpty() ||
!V8CallBoolean(wrapper->DefineOwnProperty( !wrapper
isolate->GetCurrentContext(), V8AtomicString(isolate, "data"), ->DefineOwnProperty(isolate->GetCurrentContext(),
pixel_array, v8::ReadOnly))) V8AtomicString(isolate, "data"), pixel_array,
v8::ReadOnly)
.To(&defined_property) ||
!defined_property)
return v8::Local<v8::Object>(); return v8::Local<v8::Object>();
} }
return wrapper; return wrapper;
......
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