Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 214085 Details for
Bug 375356
[BrowserHistory] exception on session timeout with SimpleLifeCycle
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch
Bug-375356.patch (text/plain), 3.74 KB, created by
Ivan Furnadjiev
on 2012-04-17 04:15:05 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2012-04-17 04:15:05 EDT
Size:
3.74 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt >Index: src/org/eclipse/rwt/internal/lifecycle/SimpleLifeCycle.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/rwt/internal/lifecycle/SimpleLifeCycle.java,v >retrieving revision 1.17 >diff -u -r1.17 SimpleLifeCycle.java >--- src/org/eclipse/rwt/internal/lifecycle/SimpleLifeCycle.java 25 Jan 2012 13:47:22 -0000 1.17 >+++ src/org/eclipse/rwt/internal/lifecycle/SimpleLifeCycle.java 17 Apr 2012 08:12:38 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2011 EclipseSource and others. >+ * Copyright (c) 2011, 2012 EclipseSource and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -93,7 +93,7 @@ > } > } ); > } >- shutdownCallback.run(); >+ FakeContextUtil.runNonUIThreadWithFakeContext( display, shutdownCallback ); > } > > public void processShutdown() { >#P org.eclipse.rap.rwt.test >Index: src/org/eclipse/rwt/internal/lifecycle/SimpleLifeCycle_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.test/src/org/eclipse/rwt/internal/lifecycle/SimpleLifeCycle_Test.java,v >retrieving revision 1.12 >diff -u -r1.12 SimpleLifeCycle_Test.java >--- src/org/eclipse/rwt/internal/lifecycle/SimpleLifeCycle_Test.java 15 Feb 2012 22:11:20 -0000 1.12 >+++ src/org/eclipse/rwt/internal/lifecycle/SimpleLifeCycle_Test.java 17 Apr 2012 08:12:39 -0000 >@@ -19,12 +19,16 @@ > import org.eclipse.rap.rwt.testfixture.*; > import org.eclipse.rap.rwt.testfixture.internal.LoggingPhaseListener; > import org.eclipse.rap.rwt.testfixture.internal.LoggingPhaseListener.PhaseEventInfo; >+import org.eclipse.rwt.RWT; > import org.eclipse.rwt.internal.application.ApplicationContextUtil; > import org.eclipse.rwt.internal.application.RWTFactory; > import org.eclipse.rwt.internal.service.ContextProvider; > import org.eclipse.rwt.internal.service.RequestParams; >+import org.eclipse.rwt.internal.service.SessionStoreImpl; > import org.eclipse.rwt.lifecycle.*; > import org.eclipse.rwt.service.ISessionStore; >+import org.eclipse.rwt.service.SessionStoreEvent; >+import org.eclipse.rwt.service.SessionStoreListener; > import org.eclipse.swt.widgets.Display; > > >@@ -228,6 +232,35 @@ > } > } > >+ public void testContextOnShutdownFromBackgroundThread() throws Exception { >+ final boolean[] log = new boolean[ 1 ]; >+ // Activate SimpleLifeCycle >+ RWTFactory.getLifeCycleFactory().deactivate(); >+ RWTFactory.getLifeCycleFactory().activate(); >+ registerEntryPoint( TestEntryPoint.class ); >+ final SessionStoreImpl sessionStore = ( SessionStoreImpl )RWT.getSessionStore(); >+ sessionStore.addSessionStoreListener( new SessionStoreListener() { >+ public void beforeDestroy( SessionStoreEvent event ) { >+ log[ 0 ] = ContextProvider.hasContext(); >+ } >+ } ); >+ // Initialize shutdown adapter >+ ( ( LifeCycle )RWT.getLifeCycle() ).execute(); >+ >+ Thread thread = new Thread( new Runnable() { >+ public void run() { >+ sessionStore.getShutdownAdapter().interceptShutdown(); >+ // Prevents NPE in tearDown >+ sessionStore.setShutdownAdapter( null ); >+ } >+ } ); >+ thread.setDaemon( true ); >+ thread.start(); >+ thread.join(); >+ >+ assertTrue( log[ 0 ] ); >+ } >+ > private void assertBeforePhaseEvent( PhaseEventInfo beforePrepareUIRoot, PhaseId phaseId ) { > assertTrue( beforePrepareUIRoot.before ); > assertEquals( phaseId, beforePrepareUIRoot.phaseId );
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 375356
:
213507
| 214085