Bug 714713 - Comparison of strings using == [r=dougt]
authorMark Finkle <mfinkle@mozilla.com>
Tue, 03 Jan 2012 12:19:44 -0500
changeset 83687 c90dc56f83f0d52b61197b9ae93a5493a1f9f7dd
parent 83686 695adbd228787b43d83d34f3e4cbe605c19ab607
child 83688 94c669ea03c2314d95f586fe613d07263711145c
push id4537
push usermfinkle@mozilla.com
push dateTue, 03 Jan 2012 17:20:12 +0000
treeherdermozilla-inbound@5bbbb0127380 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt
bugs714713
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 714713 - Comparison of strings using == [r=dougt]
mobile/android/base/GeckoApp.java
mobile/android/base/GeckoAppShell.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -607,18 +607,17 @@ abstract public class GeckoApp
 
                 HistoryEntry lastHistoryEntry = tab.getLastHistoryEntry();
                 if (lastHistoryEntry == null)
                     return;
 
                 if (getLayerController().getLayerClient() != mSoftwareLayerClient)
                     return;
 
-                if (mLastUri == lastHistoryEntry.mUri &&
-                    mLastTitle == lastHistoryEntry.mTitle)
+                if (lastHistoryEntry.mUri.equals(mLastUri))
                     return;
    
                 mLastViewport = mSoftwareLayerClient.getGeckoViewportMetrics().toJSON();
                 mLastUri = lastHistoryEntry.mUri;
                 mLastTitle = lastHistoryEntry.mTitle;
                 Bitmap bitmap = mSoftwareLayerClient.getBitmap();
                 if (bitmap != null) {
                     ByteArrayOutputStream bos = new ByteArrayOutputStream();
--- a/mobile/android/base/GeckoAppShell.java
+++ b/mobile/android/base/GeckoAppShell.java
@@ -870,17 +870,17 @@ public class GeckoAppShell
                         text = cm.getText().toString();
                 }
                 try {
                     sClipboardQueue.put(text != null ? text : EMPTY_STRING);
                 } catch (InterruptedException ie) {}
             }});
         try {
             String ret = sClipboardQueue.take();
-            return (ret == EMPTY_STRING ? null : ret);
+            return (EMPTY_STRING.equals(ret) ? null : ret);
         } catch (InterruptedException ie) {}
         return null;
     }
 
     static void setClipboardText(final String text) {
         getHandler().post(new Runnable() { 
             @SuppressWarnings("deprecation")
             public void run() {