Closed Bug 1290032 Opened 8 years ago Closed 8 years ago

[WebGL2] pass gl.getSamplerParameter() in gl-object-get-calls.html

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: jerry, Assigned: jerry)

References

Details

Attachments

(1 file, 1 obsolete file)

Gecko doesn't return null value when we have invalidEnum.
Attached patch return null for InvalidEnum. v1 (obsolete) — Splinter Review
Attachment #8775502 - Flags: review?(jgilbert)
Comment on attachment 8775502 [details] [diff] [review]
return null for InvalidEnum. v1

Review of attachment 8775502 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/canvas/WebGL2ContextSamplers.cpp
@@ +205,5 @@
>  {
>      if (IsContextLost())
>          return;
>  
> +    retval.set(JS::NullValue());

I am also curious about the return value for context lost.

If it is also a nullValue(), a lot of functions need to be updated.

@@ +211,4 @@
>      if (!sampler || sampler->IsDeleted())
>          return ErrorInvalidOperation("getSamplerParameter: invalid sampler");
>  
>      if (!ValidateSamplerParameterName(pname, "getSamplerParameter"))

ValidateSamplerParameterName() only setup InvalidEnum(), but it doesn't set the retval to NullValue().
Comment on attachment 8775502 [details] [diff] [review]
return null for InvalidEnum. v1

Review of attachment 8775502 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/canvas/WebGL2ContextSamplers.cpp
@@ +205,5 @@
>  {
>      if (IsContextLost())
>          return;
>  
> +    retval.set(JS::NullValue());

It's nullValue. Put this before IsContextLost.
Attachment #8775502 - Flags: review?(jgilbert) → review-
Attachment #8775502 - Attachment is obsolete: true
Attachment #8775819 - Flags: review?(jgilbert) → review+
Just a simple fix.
Please land the attachment 8775819 [details] [diff] [review] to m-c.
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/85b1e566b5b8
return null for InvalidEnum. r=jgilbert
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/85b1e566b5b8
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: