Closed Bug 706052 Opened 13 years ago Closed 13 years ago

Unwrap to dom::Element instead of nsIDOMElement in texSubImage2D/texImage2D

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 730554

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

Attachments

(2 files)

After bug 704088, that's all we need in WebGLContext::{TexSubImage2D_dom,TexImage2D_dom}.
Comment on attachment 584403 [details] [diff] [review] Unwrap to dom::Element instead of nsIDOMElement in texSubImage2D/texImage2D; This looks ok, but we can speed this up even more by adding a dom::Element specialization of xpc_qsUnwrapArg, right? Should be pretty easy...
Attachment #584403 - Flags: review?(bzbarsky) → review+
Doesn't bug 563659 make that hard? (There is a specialization for nsGenericElement, but that unwraps to nsIContent first, so I don't see how it would be much of an improvement.)
> (There is a specialization for nsGenericElement, but that unwraps to nsIContent first, > so I don't see how it would be much of an improvement.) It's an improvement because unrwapping to nsIContent does the fast-path unwrap using castNativeFromWrapper instead of having to call QueryInterface (which is what unwrap to dom::Element has to do right now). So adding a specialization for dom::Element that looks just like the nsGenericElement one would be a win.
Ah, that was the missing bit. I did xpc_qsUnwrapThis as well while I was there. (Never mind the NS_SPECIALIZE_TEMPLATE bits, this is an old tree without bug 706010.)
Attachment #584812 - Flags: review?(bzbarsky)
Comment on attachment 584812 [details] [diff] [review] Part b: dom::Element specialization r=me
Attachment #584812 - Flags: review?(bzbarsky) → review+
Applying the two patches causes crashes in M1: https://tbpl.mozilla.org/?tree=Try&rev=ef8775dc7503 And just the first gives timeouts: https://tbpl.mozilla.org/?tree=Try&rev=09222a9f4307
I guess the timeouts were because of the "if (NS_FAILED(rv)) return JS_FALSE;", which triggered because we were no longer unwrapping to a scriptable interface. Anyway, fixed in bug 730554.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: