[Webkit-unassigned] [Bug 49999] better V8 bindings for HTML5 ImageData
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 24 09:00:29 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=49999
--- Comment #2 from Vitaly Repeshko <vitalyr at chromium.org> 2010-11-24 09:00:29 PST ---
(In reply to comment #1)
> Created an attachment (id=74714)
--> (https://bugs.webkit.org/attachment.cgi?id=74714&action=review) [details]
> proposed patch
The key part here is avoiding hitting a C++ callback when reading the "data" property on a JS wrapper of ImageData object. Setting a pure JS property on the wrapper is a good idea. Yet modifying the way the value of the property is computed is not necessary and I think can be only harmful. Instead of creating a new object template and instantiating it, we should reuse the CanvasPixelArray wraper, i.e. do something like this:
if (!wrapper.IsEmpty()) {
v8::Handle<v8::Value> pixelArray = toV8(impl->data());
if (!pixelArray.IsEmpty())
wrapper->Set(v8::String::NewSymbol("data"), pixelArray, v8::ReadOnly);
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list