All Downloads are FREE. Search and download functionalities are using the official Maven repository.

adin-client-compiler-deps.1.0.0.source-code.rhinoDiff.txt Maven / Gradle / Ivy

Go to download

Vaadin is a web application framework for Rich Internet Applications (RIA). Vaadin enables easy development and maintenance of fast and secure rich web applications with a stunning look and feel and a wide browser support. It features a server-side architecture with the majority of the logic running on the server. Ajax technology is used at the browser-side to ensure a rich and interactive user experience.

There is a newer version: 1.2.0
Show newest version
Index: src/org/mozilla/javascript/Arguments.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/Arguments.java,v
retrieving revision 1.36
diff -u -r1.36 Arguments.java
--- src/org/mozilla/javascript/Arguments.java	6 Jan 2010 18:17:53 -0000	1.36
+++ src/org/mozilla/javascript/Arguments.java	5 May 2011 16:42:45 -0000
@@ -85,7 +85,7 @@
     @Override
     public String getClassName()
     {
-        return FTAG;
+        return "Object";
     }
 
     private Object arg(int index) {
Index: src/org/mozilla/javascript/Context.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/Context.java,v
retrieving revision 1.284
diff -u -r1.284 Context.java
--- src/org/mozilla/javascript/Context.java	6 Mar 2011 14:52:49 -0000	1.284
+++ src/org/mozilla/javascript/Context.java	5 May 2011 16:42:46 -0000
@@ -315,6 +315,22 @@
      */
     public static final int FEATURE_ENHANCED_JAVA_ACCESS = 13;
 
+    /**
+     * Special to HtmlUnit's Rhino fork.
+     * Enable assignment to properties with only a getter defined.
+     * This was Rhino's standard behaviour until 1.7R2.
+     * By default {@link #hasFeature(int)} returns false.
+     */
+    public static final int FEATURE_HTMLUNIT_WRITE_READONLY_PROPERTIES = 14;
+
+    /**
+     * Special to HtmlUnit's Rhino fork.
+     * Indicates if a JavaScript catch statement can catch Java exceptions
+     * (exceptions occurring in host objects).
+     * By default {@link #hasFeature(int)} returns true.
+     */
+    public static final int FEATURE_HTMLUNIT_JS_CATCH_JAVA_EXCEPTION = 15;
+
     public static final String languageVersionProperty = "language version";
     public static final String errorReporterProperty   = "error reporter";
 
@@ -1357,7 +1373,7 @@
                              securityDomain);
     }
 
-    final Script compileString(String source,
+    protected Script compileString(String source,
                                Evaluator compiler,
                                ErrorReporter compilationErrorReporter,
                                String sourceName, int lineno,
Index: src/org/mozilla/javascript/ContextFactory.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/ContextFactory.java,v
retrieving revision 1.37
diff -u -r1.37 ContextFactory.java
--- src/org/mozilla/javascript/ContextFactory.java	29 Mar 2011 15:17:49 -0000	1.37
+++ src/org/mozilla/javascript/ContextFactory.java	5 May 2011 16:42:46 -0000
@@ -310,7 +310,10 @@
             return false;
 
           case Context.FEATURE_ENHANCED_JAVA_ACCESS:
+          case Context.FEATURE_HTMLUNIT_WRITE_READONLY_PROPERTIES:
             return false;
+          case Context.FEATURE_HTMLUNIT_JS_CATCH_JAVA_EXCEPTION:
+              return true;
         }
         // It is a bug to call the method with unknown featureIndex
         throw new IllegalArgumentException(String.valueOf(featureIndex));
Index: src/org/mozilla/javascript/DToA.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/DToA.java,v
retrieving revision 1.18
diff -u -r1.18 DToA.java
--- src/org/mozilla/javascript/DToA.java	5 Apr 2007 14:59:49 -0000	1.18
+++ src/org/mozilla/javascript/DToA.java	5 May 2011 16:42:47 -0000
@@ -1187,6 +1187,15 @@
         decPt = JS_dtoa(d, dtoaModes[mode], mode >= DTOSTR_FIXED, precision, sign, buffer);
         nDigits = buffer.length();
 
+        // Hack to fix Rhino bug 538172: 2.274341322658976E-309 -> F.774341322658976E-309
+        if (mode == DToA.DTOSTR_STANDARD && buffer.charAt(0) > '9') {
+        	final char c0 = buffer.charAt(0);
+        	final char c1 = buffer.charAt(1);
+        	final int sum = (c0 - 'A' + 10) + (c1 - '0');
+        	buffer.replace(0, 1, Integer.toString(sum));
+        	decPt++;
+        }
+
         /* If Infinity, -Infinity, or NaN, return the string regardless of the mode. */
         if (decPt != 9999) {
             boolean exponentialNotation = false;
Index: src/org/mozilla/javascript/Delegator.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/Delegator.java,v
retrieving revision 1.15
diff -u -r1.15 Delegator.java
--- src/org/mozilla/javascript/Delegator.java	18 Mar 2008 15:10:16 -0000	1.15
+++ src/org/mozilla/javascript/Delegator.java	5 May 2011 16:42:47 -0000
@@ -116,85 +116,85 @@
      * @see org.mozilla.javascript.Scriptable#getClassName
      */
     public String getClassName() {
-        return obj.getClassName();
+        return getDelegee().getClassName();
     }
     /**
      * @see org.mozilla.javascript.Scriptable#get(String, Scriptable)
      */
     public Object get(String name, Scriptable start) {
-        return obj.get(name,start);
+        return getDelegee().get(name,start);
     }
     /**
      * @see org.mozilla.javascript.Scriptable#get(int, Scriptable)
      */
     public Object get(int index, Scriptable start) {
-        return obj.get(index,start);
+        return getDelegee().get(index,start);
         }
     /**
      * @see org.mozilla.javascript.Scriptable#has(String, Scriptable)
      */
     public boolean has(String name, Scriptable start) {
-        return obj.has(name,start);
+        return getDelegee().has(name,start);
         }
     /**
      * @see org.mozilla.javascript.Scriptable#has(int, Scriptable)
      */
     public boolean has(int index, Scriptable start) {
-        return obj.has(index,start);
+        return getDelegee().has(index,start);
         }
     /**
      * @see org.mozilla.javascript.Scriptable#put(String, Scriptable, Object)
      */
     public void put(String name, Scriptable start, Object value) {
-        obj.put(name,start,value);
+        getDelegee().put(name,start,value);
     }
     /**
      * @see org.mozilla.javascript.Scriptable#put(int, Scriptable, Object)
      */
     public void put(int index, Scriptable start, Object value) {
-        obj.put(index,start,value);
+        getDelegee().put(index,start,value);
     }
     /**
      * @see org.mozilla.javascript.Scriptable#delete(String)
      */
     public void delete(String name) {
-        obj.delete(name);
+        getDelegee().delete(name);
     }
     /**
      * @see org.mozilla.javascript.Scriptable#delete(int)
      */
     public void delete(int index) {
-        obj.delete(index);
+        getDelegee().delete(index);
     }
     /**
      * @see org.mozilla.javascript.Scriptable#getPrototype
      */
     public Scriptable getPrototype() {
-        return obj.getPrototype();
+        return getDelegee().getPrototype();
     }
     /**
      * @see org.mozilla.javascript.Scriptable#setPrototype
      */
     public void setPrototype(Scriptable prototype) {
-        obj.setPrototype(prototype);
+        getDelegee().setPrototype(prototype);
     }
     /**
      * @see org.mozilla.javascript.Scriptable#getParentScope
      */
     public Scriptable getParentScope() {
-        return obj.getParentScope();
+        return getDelegee().getParentScope();
     }
     /**
      * @see org.mozilla.javascript.Scriptable#setParentScope
      */
     public void setParentScope(Scriptable parent) {
-        obj.setParentScope(parent);
+        getDelegee().setParentScope(parent);
     }
     /**
      * @see org.mozilla.javascript.Scriptable#getIds
      */
     public Object[] getIds() {
-        return obj.getIds();
+        return getDelegee().getIds();
     }
     /**
      * Note that this method does not get forwarded to the delegee if
@@ -212,13 +212,13 @@
         return (hint == null ||
                 hint == ScriptRuntime.ScriptableClass ||
                 hint == ScriptRuntime.FunctionClass) ?
-            this : obj.getDefaultValue(hint);
+            this : getDelegee().getDefaultValue(hint);
     }
     /**
      * @see org.mozilla.javascript.Scriptable#hasInstance
      */
     public boolean hasInstance(Scriptable instance) {
-        return obj.hasInstance(instance);
+        return getDelegee().hasInstance(instance);
     }
     /**
      * @see org.mozilla.javascript.Function#call
@@ -226,7 +226,7 @@
     public Object call(Context cx, Scriptable scope, Scriptable thisObj,
                        Object[] args)
     {
-        return ((Function)obj).call(cx,scope,thisObj,args);
+        return ((Function)getDelegee()).call(cx,scope,thisObj,args);
     }
 
     /**
@@ -246,7 +246,7 @@
      */
     public Scriptable construct(Context cx, Scriptable scope, Object[] args)
     {
-        if (obj == null) {
+        if (getDelegee() == null) {
             //this little trick allows us to declare prototype objects for
             //Delegators
             Delegator n = newInstance();
@@ -260,7 +260,7 @@
             return n;
         }
         else {
-            return ((Function)obj).construct(cx,scope,args);
+            return ((Function)getDelegee()).construct(cx,scope,args);
         }
     }
 }
Index: src/org/mozilla/javascript/FunctionObject.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/FunctionObject.java,v
retrieving revision 1.85
diff -u -r1.85 FunctionObject.java
--- src/org/mozilla/javascript/FunctionObject.java	2 Jan 2009 01:42:14 -0000	1.85
+++ src/org/mozilla/javascript/FunctionObject.java	5 May 2011 16:42:47 -0000
@@ -424,6 +424,9 @@
         } else {
             if (!isStatic) {
                 Class clazz = member.getDeclaringClass();
+                if (thisObj instanceof Delegator) {
+                    thisObj = ((Delegator) thisObj).getDelegee();
+                }
                 if (!clazz.isInstance(thisObj)) {
                     boolean compatible = false;
                     if (thisObj == scope) {
Index: src/org/mozilla/javascript/InterpretedFunction.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/InterpretedFunction.java,v
retrieving revision 1.59
diff -u -r1.59 InterpretedFunction.java
--- src/org/mozilla/javascript/InterpretedFunction.java	26 Jun 2008 13:57:11 -0000	1.59
+++ src/org/mozilla/javascript/InterpretedFunction.java	5 May 2011 16:42:47 -0000
@@ -231,5 +231,14 @@
     {
         return idata.argIsConst[index];
     }
+
+    /**
+     * Provides the decompiled source of the function what is helpful
+     * while debugging.
+     */
+    @Override
+    public String toString() {
+    	return decompile(2, 0);
+    }
 }
 
Index: src/org/mozilla/javascript/Interpreter.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/Interpreter.java,v
retrieving revision 1.362
diff -u -r1.362 Interpreter.java
--- src/org/mozilla/javascript/Interpreter.java	9 Feb 2011 10:55:42 -0000	1.362
+++ src/org/mozilla/javascript/Interpreter.java	5 May 2011 16:42:48 -0000
@@ -2811,6 +2811,9 @@
     private static void enterFrame(Context cx, CallFrame frame, Object[] args,
                                    boolean continuationRestart)
     {
+    	if (frame.parentFrame != null && !frame.parentFrame.fnOrScript.isScript())
+    		frame.fnOrScript.defaultPut("caller", frame.parentFrame.fnOrScript);
+
         boolean usesActivation = frame.idata.itsNeedsActivation;
         boolean isDebugged = frame.debuggerFrame != null;
         if(usesActivation || isDebugged) {
@@ -2859,6 +2862,8 @@
     private static void exitFrame(Context cx, CallFrame frame,
                                   Object throwable)
     {
+		frame.fnOrScript.delete("caller");
+
         if (frame.idata.itsNeedsActivation) {
             ScriptRuntime.exitActivationFunction(cx);
         }
Index: src/org/mozilla/javascript/MemberBox.java
===================================================================
RCS file: /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/MemberBox.java,v
retrieving revision 1.19
diff -u -r1.19 MemberBox.java
--- src/org/mozilla/javascript/MemberBox.java	26 Jun 2008 13:57:11 -0000	1.19
+++ src/org/mozilla/javascript/MemberBox.java	5 May 2011 16:42:48 -0000
@@ -156,6 +156,17 @@
     Object invoke(Object target, Object[] args)
     {
         Method method = method();
+        
+        // handle delegators
+        if (target instanceof Delegator) {
+        	target = ((Delegator) target).getDelegee();
+        }
+        for (int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy