[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-develop
Subject:    [HtmlUnit] SVN: [13946] trunk/htmlunit/src/main/java/netscape/javascript/ JSObject.java
From:       rbri () users ! sourceforge ! net
Date:       2017-03-29 20:16:54
Message-ID: 1490818615.37262.9040 () sfp-scm-1 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 13946
          http://sourceforge.net/p/htmlunit/code/13946
Author:   rbri
Date:     2017-03-29 20:16:54 +0000 (Wed, 29 Mar 2017)
Log Message:
-----------
fix string return value

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/netscape/javascript/JSObject.java

Modified: trunk/htmlunit/src/main/java/netscape/javascript/JSObject.java
===================================================================
--- trunk/htmlunit/src/main/java/netscape/javascript/JSObject.java	2017-03-29 17:20:54 UTC (rev 13945)
+++ trunk/htmlunit/src/main/java/netscape/javascript/JSObject.java	2017-03-29 20:16:54 UTC (rev 13946)
@@ -22,6 +22,7 @@
 import com.gargoylesoftware.htmlunit.javascript.host.Element;
 import com.gargoylesoftware.htmlunit.javascript.host.Window;
 
+import net.sourceforge.htmlunit.corejs.javascript.ConsString;
 import net.sourceforge.htmlunit.corejs.javascript.ScriptableObject;
 
 /**
@@ -73,6 +74,9 @@
             if (result.getJavaScriptResult() instanceof ScriptableObject) {
                 return new JSObject((ScriptableObject) result.getJavaScriptResult());
             }
+            if (result.getJavaScriptResult() instanceof ConsString) {
+                return ((ConsString) result.getJavaScriptResult()).toString();
+            }
             return result.getJavaScriptResult();
         }
         return null;


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
HtmlUnit-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic