Skip to content

Commit

Permalink
Revert "Explain double Box in LiftServlet.handleVersionedAjax."
Browse files Browse the repository at this point in the history
This reverts commit 2d0709a.
  • Loading branch information
fmpwizard committed Aug 31, 2012
1 parent 2d76220 commit 430da4a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions web/webkit/src/main/scala/net/liftweb/http/LiftServlet.scala
Expand Up @@ -614,12 +614,6 @@ class LiftServlet extends Loggable {
case Full(handlerVersion) =>
val renderVersion = RenderVersion.get

// An Empty in toReturn indicates there is no precomputed response for
// this AJAX request/version. Note that runAjax returns a
// Box[LiftResponse]. So we can have a Full(Empty) that indicates
// runAjax has computed a response, and that response was an Empty.
// That's why we have a double Box here. If we get an Empty back,
// we compute the actual response by calling runAjax below.
val toReturn: Box[Box[LiftResponse]] =
liftSession.withAjaxRequests { currentAjaxRequests =>
currentAjaxRequests.get(renderVersion).collect {
Expand All @@ -632,7 +626,7 @@ class LiftServlet extends Loggable {
(renderVersion ->
AjaxRequestInfo(handlerVersion, Empty, cont :: Nil, millis))

Empty
Empty // no response available, triggers the actual AJAX computation below

case AjaxRequestInfo(storedVersion, existingResponseBox @ Full(_), _, _) =>
existingResponseBox // return the Full response Box
Expand All @@ -650,7 +644,7 @@ class LiftServlet extends Loggable {
(renderVersion ->
AjaxRequestInfo(handlerVersion, Empty, cont :: Nil, millis))

Empty
Empty // no response available, triggers the actual AJAX computation below
}
}

Expand Down

0 comments on commit 430da4a

Please sign in to comment.