Bug 345745 [Compatibility] Editors occasionally fail to persist state (org.eclipse.ui.internal.emptyEditorTab)
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
index 75a1115..f4e21ce 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
@@ -2220,20 +2220,7 @@
 	 * (non-Javadoc) Method declared on IWorkbench.
 	 */
 	public boolean restart() {
-		try {
-			for (IWorkbenchWindow window : getWorkbenchWindows()) {
-				((WorkbenchWindow) window).setRestarting(true);
-			}
-			IPresentationEngine engine = (IPresentationEngine) application.getContext().get(
-					IPresentationEngine.SERVICE_NAME);
-			engine.stop();
-			returnCode = PlatformUI.RETURN_RESTART;
-		} finally {
-			for (IWorkbenchWindow window : getWorkbenchWindows()) {
-				((WorkbenchWindow) window).setRestarting(false);
-			}
-		}
-		return true;
+		return close(PlatformUI.RETURN_RESTART, false);
 	}
 
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
index d693f66..755279b 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
@@ -242,12 +242,6 @@
 	private WorkbenchWindowConfigurer windowConfigurer = null;
 
 	/**
-	 * A flag used for indicating whether the workbench is in the process of
-	 * shutting down for a restart or not. See bug 312821.
-	 */
-	private boolean restarting = false;
-
-	/**
 	 * List of generic property listeners.
 	 * 
 	 * @since 3.3
@@ -419,9 +413,6 @@
 
 		windowContext.set(IWindowCloseHandler.class.getName(), new IWindowCloseHandler() {
 			public boolean close(MWindow window) {
-				if (restarting) {
-					return WorkbenchWindow.this.close(false);
-				}
 				return getWindowAdvisor().preWindowShellClose() && WorkbenchWindow.this.close();
 			}
 		});
@@ -1110,10 +1101,6 @@
 		return ret[0];
 	}
 
-	void setRestarting(boolean restarting) {
-		this.restarting = restarting;
-	}
-
 	/**
 	 * @see IWorkbenchWindow
 	 */