details:   https://code.openbravo.com/erp/devel/pi/rev/6f6aeb05d3bd
changeset: 16684:6f6aeb05d3bd
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Tue May 29 09:59:25 2012 +0200
summary:   Fixed issue 20455. Changed optimization level to avoid error.
This change will effectively disable optimization in the js engine. However, it 
doesn't really matter in our usage because the javascript which the engine 
needs to process is very simple, and this part represents a tiny amount of the 
total execution time of the callout processes, and at the same time, it's the 
only way to avoid the reported issue.

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
 |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 0e2211ada03d -r 6f6aeb05d3bd 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Tue May 29 09:26:41 2012 +0200
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Tue May 29 09:59:25 2012 +0200
@@ -259,7 +259,7 @@
           calloutMessages, attachments, jsExcuteCode, hiddenInputs, noteCount);
       analyzeResponse(tab, columnValues);
       long t10 = System.currentTimeMillis();
-      log.debug("Elapsed time: " + (System.currentTimeMillis() - iniTime) + 
"(" + (t2 - t1) + ","
+      log.info("Elapsed time: " + (System.currentTimeMillis() - iniTime) + "(" 
+ (t2 - t1) + ","
           + (t3 - t2) + "," + (t4 - t3) + "," + (t5 - t4) + "," + (t6 - t5) + 
"," + (t7 - t6) + ","
           + (t8 - t7) + "," + (t9 - t8) + "," + (t10 - t9) + ")");
       log.debug("Attachment exists: " + 
finalObject.getBoolean("attachmentExists"));
@@ -1435,6 +1435,7 @@
     }
     try {
       Context cx = Context.enter();
+      cx.setOptimizationLevel(-1);
       Scriptable scope = cx.initStandardObjects();
       cx.evaluateString(scope, resp, "<cmd>", 1, null);
       NativeArray array = (NativeArray) scope.get("respuesta", scope);

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to