Bug 714713 - Comparison of strings using == [r=dougt]
☠☠ backed out by 1d00e560e0dc ☠ ☠
authorMark Finkle <mfinkle@mozilla.com>
Tue, 03 Jan 2012 00:56:57 -0500
changeset 83652 0284b1ff46c6c7decbc14d1492be1964a8580af1
parent 83651 ddf371bc13f0d4ad827e0da6c2420352629f3955
child 83653 03f3e1ebcd6462114e8b5b6d4129d6b58dc2beea
push id4524
push usermfinkle@mozilla.com
push dateTue, 03 Jan 2012 05:59:00 +0000
treeherdermozilla-inbound@172f007cc17c [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,18 @@ 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 (mLastUri.equals(lastHistoryEntry.mUri) &&
+                    mLastTitle.equals(lastHistoryEntry.mTitle))
                     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 (ret.equals(EMPTY_STRING) ? null : ret);
         } catch (InterruptedException ie) {}
         return null;
     }
 
     static void setClipboardText(final String text) {
         getHandler().post(new Runnable() { 
             @SuppressWarnings("deprecation")
             public void run() {