Assure that we call MakeCurrent in all our WebGL function entry points




5 years ago
a year ago


(Reporter: jgilbert, Unassigned)


Firefox Tracking Flags

(Not tracked)




5 years ago
So we've hit cases where WebGL entry points don't MakeCurrent themselves. Since GL is stateful in this respect, most of the time we don't notice. We would only notice if we interleaved a MakeCurrent on a different context right before a call that's missing its own MakeCurrent.

There are two main approaches. Neither takes a very long time to make, but they're both fairly large patches to review. (boring, but not that complicated)

We can either do this dynamically, at runtime, and ASSERT that our current scope has MadeCurrent.
Or, we can do this statically, where we actually pass through a 'safe' GL object through our callstacks to all the inner functions that make GL calls.

The static approach is more invasive, but is actually much easier from a maintenance standpoint, since errors are generally caught at compile-time.

The dynamic approach is a little less invasive, but takes a long time to iterate through all the asserts we hit at runtime. Also, it is more likely to be missing paths, if they aren't exercised in the set of tests we run.


5 years ago
See Also: → bug 999713

Comment 1

a year ago
We added IsCurrent asserts a while back, and bug 1390386 is looking to implicitly call MakeCurrent, which eliminates this problem.
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.