r9650 - helma-ng/trunk/modules/helma/webapp
[email protected] Wed, 22 Apr 2009 01:41:57 +0200 (CEST)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20090421234157.CDB503D0D6@mia> |
Author: hannes
Date: 2009-04-22 01:41:57 +0200 (Wed, 22 Apr 2009)
New Revision: 9650
Modified:
helma-ng/trunk/modules/helma/webapp/continuation.js
Log:
Move continuation initialization from middleware to ContinuationMark()
Details at http://dev.helma.org/trac/helma/changeset/9650
Modified: helma-ng/trunk/modules/helma/webapp/continuation.js
===================================================================
--- helma-ng/trunk/modules/helma/webapp/continuation.js 2009-04-21 23:41:56 UTC (rev 9649)
+++ helma-ng/trunk/modules/helma/webapp/continuation.js 2009-04-21 23:41:57 UTC (rev 9650)
@@ -37,6 +37,14 @@
};
function ContinuationMark(req, key) {
+ if (system.getOptimizationLevel() > -1) {
+ system.setOptimizationLevel(-1);
+ throw { retry: true };
+ }
+ if (!req.params.helma_continuation) {
+ // set query param so helma knows to switch rhino optimization level to -1
+ throw { redirect: ContinuationUrl() };
+ }
var id = req.params.helma_continuation;
ids[key] = id;
var cont = new Continuation();
@@ -51,15 +59,6 @@
* @return the continuation result
*/
function handleRequest(req) {
- if (system.getOptimizationLevel() > -1) {
- system.setOptimizationLevel(-1);
- throw { retry: true };
- }
- if (!req.params.helma_continuation) {
- // set query param so helma knows to switch rhino optimization level to -1
- throw { redirect: ContinuationUrl() };
- }
-
var id = req.params.helma_continuation;
var continuation = getCallback(req, id);
if (continuation) {