Incorrect salt used in SHtml.memoize
From this discussion: https://groups.google.com/d/topic/liftweb/K14YPMlWNyY/discussion
I see what the issue is. SHtml.memoize is using the second stack frame as it's salt assuming that is the caller. Since SHtml is a singleton object though, there seems to be an extra frame involved. The stack trace looks like this.
java.lang.Exception
at net.liftweb.http.SHtml$class.memoize(SHtml.scala:267)
at net.liftweb.http.SHtml$.memoize(SHtml.scala:38)
at h2.common.ui.Layout$.menu(Layout.scala:54)
I'll update it to use the following frame and submit on review board.
I see what the issue is. SHtml.memoize is using the second stack frame as it's salt assuming that is the caller. Since SHtml is a singleton object though, there seems to be an extra frame involved. The stack trace looks like this.
java.lang.Exception
at net.liftweb.http.SHtml$class.memoize(SHtml.scala:267)
at net.liftweb.http.SHtml$.memoize(SHtml.scala:38)
at h2.common.ui.Layout$.menu(Layout.scala:54)
I'll update it to use the following frame and submit on review board.
Leave a comment
(In revision:be68944d3374a9a5c9b180125a48499eb9ca781f) Changed the stack frame used as a RequestVar salt in SHtml.memoize so that it properly references the calling class
Fixed #990
Branch: master
Fixed #990
Branch: master