Vadim Gritsenko wrote:
> sylvain@apache.org wrote:
>
>>
>> @@ -687,6 +703,7 @@
>> if (fun == Scriptable.NOT_FOUND) {
>> throw new
>> ResourceNotFoundException("Function \"javascript:" + funName + "()\"
>> not found");
>> }
>> + thrScope.setLock(true);
>> ScriptRuntime.call(context, fun, thrScope,
>> funArgs, thrScope);
>> } catch (JavaScriptException ex) {
>> EvaluatorException ee = Context.reportRuntimeError(
>> @@ -710,6 +727,7 @@
>> throw new
>> CascadingRuntimeException(ee.getMessage(), ee);
>> }
>> } finally {
>> + thrScope.setLock(false);
>> setSessionScope(thrScope);
>> if (cocoon != null) {
>> cocoon.popCallContext();
>
>
> Is there a reason why you need to "un-lock" it?
Yes: the scope must be unlocked whenever a script is loaded, in order
for the global variable declarations to be possible. Without unlock, no
global variables, which would be pretty much annoying :-)
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
|