http://helma.org/bugs/show_bug.cgi?id=619hannes@... changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
------- Comment #2 from
hannes@... 2008-04-22 15:41 -------
Here's the explanation for this behaviour, as well as a workaround, copied from
<
http://grazia.helma.at/pipermail/helma-dev/2008-April/004142.html>:
What's happening is that __stripTags__ and stripTags are indeed the
same (scripted) functions. The reason is that Rhino, when evaluating a
script file on a scope, actually tries to define the function
properties __before__ evaluating the script, so scriptTags already
contains the scripted function when you check/set __scriptTags__.
I first wondered what code change might have triggered this behaviour,
because I didn't make that many changed between 1.6.1 and 1.6.2 in the
scripting layer. Turns out that it was that global native functions
aren't defined as READONLY anymore in 1.6.2. That used to help fend
off that first round of defining the functions before evaluation.
http://dev.helma.org/trac/helma/changeset/8795There's an easy workaround. Just do not define your scripted function
using the name it's going to use. For example, you might just want to
define it inline:
if (!this["__stripTags__"]) {
this['__stripTags__'] = this['stripTags'];
this['stripTags'] = function(obj) {
...
};
}
Marking as wontfix, hope this is ok with you.
--
Configure bugmail:
http://helma.org/bugs/userprefs.cgi?tab=email------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev