Closed Bug 593850 Opened 11 years ago Closed 11 years ago

fix a bunch of failing webgl tests

Categories

(Core :: Canvas: WebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: vlad, Assigned: vlad)

Details

Attachments

(6 files)

There's a bunch of webgl tests that are failing for simple reasons.
this is already checked in upstream; these tests shouldn't be referencing debugcontext.
Attachment #472438 - Flags: review?(bjacob)
Attachment #472434 - Flags: review?(bjacob) → review+
Comment on attachment 472435 [details] [diff] [review]
fix gl-scissor test

Note: need to send these changes upstream or they will be lost the next time we sync.
Attachment #472435 - Flags: review?(bjacob) → review+
Attachment #472436 - Flags: review?(bjacob) → review+
Attachment #472437 - Flags: review?(bjacob) → review+
Attachment #472438 - Flags: review?(bjacob) → review+
Comment on attachment 472439 [details] [diff] [review]
fix bad-args and null-args tests

 NS_IMETHODIMP
 WebGLContext::LinkProgram(nsIWebGLProgram *pobj)
 {
+    if (!pobj)
+        return ErrorInvalidValue("linkProgram");
+
     GLuint progname;
     WebGLProgram *program;
     if (!GetConcreteObjectAndGLName("linkProgram", pobj, &program, &progname))


I don't understand this one. GetConcreteObject and friends already do generate ErrorInvalidValue on null objects (unless &isNull is passed). So why is it needed to add these if(!pobj) checks?
Also, just "linkProgram" is too elusive an error message. How about "linkProgram: null program passed".
(In reply to comment #7)
> Comment on attachment 472435 [details] [diff] [review]
> fix gl-scissor test
> 
> Note: need to send these changes upstream or they will be lost the next time we
> sync.

Already checked in upstream

(In reply to comment #8)
> Comment on attachment 472439 [details] [diff] [review]
> fix bad-args and null-args tests
> 
>  NS_IMETHODIMP
>  WebGLContext::LinkProgram(nsIWebGLProgram *pobj)
>  {
> +    if (!pobj)
> +        return ErrorInvalidValue("linkProgram");
> +
>      GLuint progname;
>      WebGLProgram *program;
>      if (!GetConcreteObjectAndGLName("linkProgram", pobj, &program, &progname))
> 
> 
> I don't understand this one. GetConcreteObject and friends already do generate
> ErrorInvalidValue on null objects (unless &isNull is passed). So why is it
> needed to add these if(!pobj) checks?

Ah yeah, you're right.. this was added in an earlier version where I thought these were supposed to be no-ops, but I was wrong.  I'll get rid of them.
all checked in, with ErrorInvalidValue crap removed.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment on attachment 472439 [details] [diff] [review]
fix bad-args and null-args tests

This patch has already landed.
Attachment #472439 - Flags: review?(bjacob)
You need to log in before you can comment on or make changes to this bug.