bug 716818 - potential race condition in GeckoThread r=mfinkle

This commit is contained in:
Brad Lassey 2012-01-10 00:02:03 -08:00
parent 88e3637cca
commit cd8cf6f1e3
2 changed files with 4 additions and 10 deletions

View File

@ -1460,7 +1460,7 @@ abstract public class GeckoApp
prefetchDNS(intent.getData());
sGeckoThread = new GeckoThread(intent, mLastUri, mLastTitle);
sGeckoThread = new GeckoThread(intent, mLastUri);
if (!ACTION_DEBUG.equals(intent.getAction()) &&
checkAndSetLaunchState(LaunchState.Launching, LaunchState.Launched))
sGeckoThread.start();
@ -1482,6 +1482,8 @@ abstract public class GeckoApp
mBrowserToolbar = (BrowserToolbar) findViewById(R.id.browser_toolbar);
}
mBrowserToolbar.setTitle(mLastTitle);
mFavicons = new Favicons(this);
// setup gecko layout

View File

@ -54,12 +54,10 @@ public class GeckoThread extends Thread {
Intent mIntent;
String mUri;
String mTitle;
GeckoThread (Intent intent, String uri, String title) {
GeckoThread (Intent intent, String uri) {
mIntent = intent;
mUri = uri;
mTitle = title;
}
public void run() {
@ -95,12 +93,6 @@ public class GeckoThread extends Thread {
Log.w(LOGTAG, "zerdatime " + new Date().getTime() + " - runGecko");
// and then fire us up
app.mMainHandler.post(new Runnable() {
public void run() {
app.mBrowserToolbar.setTitle(mTitle);
}
});
try {
Log.w(LOGTAG, "RunGecko - URI = " + mUri);