From 1cc09c677798a1d97f8379a0bbe71e07e6d79fed Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 1 May 2013 15:33:49 -0400 Subject: [PATCH] Bug 867685 - Ensure setIsRTL updates the viewport metrics atomically. r=Cwiiis --- mobile/android/base/gfx/GeckoLayerClient.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mobile/android/base/gfx/GeckoLayerClient.java b/mobile/android/base/gfx/GeckoLayerClient.java index 8ff83f9331d..d4c68546f2f 100644 --- a/mobile/android/base/gfx/GeckoLayerClient.java +++ b/mobile/android/base/gfx/GeckoLayerClient.java @@ -517,8 +517,10 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget } void setIsRTL(boolean aIsRTL) { - ImmutableViewportMetrics newMetrics = getViewportMetrics().setIsRTL(aIsRTL); - setViewportMetrics(newMetrics, false); + synchronized (getLock()) { + ImmutableViewportMetrics newMetrics = getViewportMetrics().setIsRTL(aIsRTL); + setViewportMetrics(newMetrics, false); + } } /** This function is invoked by Gecko via JNI; be careful when modifying signature.