Bug 714713 - Comparison of strings using == [r=dougt a=akeybl]
authorMark Finkle <mfinkle@mozilla.com>
Tue, 03 Jan 2012 12:19:44 -0500
changeset 84022 5e4a83c69eef11e71fef087dd0fb435f6823ee3a
parent 84021 11ed60b8dc20c1c4590e8c487dc25c763fa7a474
child 84023 3fb197649a8715c8502da46d205550c1b1f2f38a
push id685
push usermfinkle@mozilla.com
push dateSat, 07 Jan 2012 06:09:55 +0000
treeherdermozilla-aurora@58b188a5513d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt, akeybl
bugs714713
milestone11.0a2
Bug 714713 - Comparison of strings using == [r=dougt a=akeybl]
mobile/android/base/GeckoApp.java
mobile/android/base/GeckoAppShell.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -606,18 +606,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
@@ -868,17 +868,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() {