Commit dd1b3d21 authored by Brandon Jones's avatar Brandon Jones Committed by Chromium LUCI CQ

Fix an occasional crash firing reflectionchange events on XRLightProbe

Trace function was calling the wrong superclass.

Bug: 1166921
Change-Id: I477b68c7ba6b39deddd4d32f2f4f092d6c696f60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2631285
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: default avatarAlexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843871}
parent fa11ee35
......@@ -97,7 +97,7 @@ void XRLightProbe::Trace(Visitor* visitor) const {
visitor->Trace(session_);
visitor->Trace(probe_space_);
visitor->Trace(light_estimate_);
ScriptWrappable::Trace(visitor);
EventTargetWithInlineData::Trace(visitor);
}
} // namespace blink
......@@ -153,8 +153,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
function onReceivedLightProbe(ctx, lightProbe) {
ctx.xrLightProbe = lightProbe;
setInterval(()=>onReflectionChanged(ctx),1000);
// ctx.xrLightProbe.addEventListener('reflectionchange', () => onReflectionChanged(ctx));
ctx.xrLightProbe.addEventListener('reflectionchange', () => onReflectionChanged(ctx));
}
function onReflectionChanged(ctx) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment