From: <asa...@us...> - 2013-11-15 10:31:58
|
Revision: 8783 http://sourceforge.net/p/htmlunit/code/8783 Author: asashour Date: 2013-11-15 10:31:56 +0000 (Fri, 15 Nov 2013) Log Message: ----------- Small performance enhancement, thanks to Ronald Modified Paths: -------------- trunk/htmlunit/src/changes/changes.xml trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java Modified: trunk/htmlunit/src/changes/changes.xml =================================================================== --- trunk/htmlunit/src/changes/changes.xml 2013-11-15 10:28:45 UTC (rev 8782) +++ trunk/htmlunit/src/changes/changes.xml 2013-11-15 10:31:56 UTC (rev 8783) @@ -18,7 +18,7 @@ JavaScript: XMLHttpRequest CORS handling fixed, some new tests added and implementation fixed. </action> <action type="fix" dev="rbri"> - JavaScript: Siplified/fixed implementation of the onReadyStateChange handler call. + JavaScript: Simplified/fixed implementation of the onReadyStateChange handler call. </action> <action type="fix" dev="rbri"> JavaScript: XMLHttpRequest status and statusText throws an exception in IE8 depending Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2013-11-15 10:28:45 UTC (rev 8782) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2013-11-15 10:31:56 UTC (rev 8783) @@ -2060,8 +2060,8 @@ new Exception("SyntaxError: An invalid or illegal string was specified.")); } - if (getPort(targetURL) != getPort(currentURL) - && !getBrowserVersion().hasFeature(JS_WINDOW_POST_MESSAGE_ALLOW_INVALID_PORT)) { + if (!getBrowserVersion().hasFeature(JS_WINDOW_POST_MESSAGE_ALLOW_INVALID_PORT) + && getPort(targetURL) != getPort(currentURL)) { return; } if (!targetURL.getHost().equals(currentURL.getHost())) { |