[Pkg-javascript-commits] [sockjs-client] 279/350: [dist] 1.0.0-beta.9
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Fri Aug 5 01:04:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.
commit 761e66f19da7c188d24c363d4837d624e30b70d8
Author: Bryce Kahle <bkahle at gmail.com>
Date: Tue Dec 16 18:04:18 2014 -0500
[dist] 1.0.0-beta.9
---
Changelog.md | 5 +++
...ckjs-1.0.0-beta.8.js => sockjs-1.0.0-beta.9.js} | 49 +++++++++++++++-------
....0-beta.8.min.js => sockjs-1.0.0-beta.9.min.js} | 4 +-
lib/version.js | 2 +-
package.json | 2 +-
5 files changed, 44 insertions(+), 18 deletions(-)
diff --git a/Changelog.md b/Changelog.md
index adfda97..d5c73b5 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,8 @@
+1.0.0-beta.9
+====
+
+ * Upgrade `url-parse` to 0.2.1 to fix 'too much recursion' errors
+
1.0.0-beta.8
====
diff --git a/dist/sockjs-1.0.0-beta.8.js b/dist/sockjs-1.0.0-beta.9.js
similarity index 98%
rename from dist/sockjs-1.0.0-beta.8.js
rename to dist/sockjs-1.0.0-beta.9.js
index d0fa358..3294e59 100755
--- a/dist/sockjs-1.0.0-beta.8.js
+++ b/dist/sockjs-1.0.0-beta.9.js
@@ -1,4 +1,4 @@
-/* sockjs-client v1.0.0-beta.8 | http://sockjs.org | MIT license */
+/* sockjs-client v1.0.0-beta.9 | http://sockjs.org | MIT license */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.SockJS=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot fin [...]
(function (global){
'use strict';
@@ -3632,7 +3632,7 @@ module.exports = {
}).call(this,{ env: {} })
},{"debug":53,"url-parse":58}],52:[function(require,module,exports){
-module.exports = '1.0.0-beta.8';
+module.exports = '1.0.0-beta.9';
},{}],53:[function(require,module,exports){
/**
@@ -5036,6 +5036,37 @@ var keys = ',,protocol,username,password,host,hostname,port,pathname,query,hash'
, inherit = { protocol: 1, host: 1, hostname: 1 }
, parts = keys.length;
+//
+// Story time children:
+//
+// FireFox 34 has some problems with their Regular Expression engine and
+// executing a RegExp can cause a `too much recursion` error. We initially fixed
+// this by moving the Regular Expression in the URL constructor so it's created
+// every single time. This fixed it for some URL's but the more complex the
+// URL's get the easier it is to trigger. Complexer URL like:
+//
+// https://www.mozilla.org/en-US/firefox/34.0/whatsnew/?oldversion=33.1
+//
+// Still triggered the recursion error. After talking with Chrome and FireFox
+// engineers it seemed to be caused by:
+//
+// https://code.google.com/p/v8/issues/detail?id=430
+//
+// As FireFox started using Chrome's RegExp engine. After testing various of
+// workarounds I finally stumbled upon this gem, use new RegExp as it sometimes
+// behaves different then a RegExp literal.
+//
+// Steps for compiling the new RegExp:
+//
+// 1. Take the regular RegExp as seen below.
+// 2. Escape the RegExp using XRegExp.escape from http://xregexp.com/tests/
+// 3. ??
+// 4. Profit.
+//
+// RegExp source: /^(?:(?:(([^:\/#\?]+:)?(?:(?:\/\/)(?:(?:(?:([^:@\/#\?]+)(?:\:([^:@\/#\?]*))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/
+//
+var regexp = new RegExp('\^\(\?:\(\?:\(\(\[\^:\\/\#\\\?\]\+:\)\?\(\?:\(\?:\\/\\/\)\(\?:\(\?:\(\?:\(\[\^:@\\/\#\\\?\]\+\)\(\?:\\:\(\[\^:@\\/\#\\\?\]\*\)\)\?\)@\)\?\(\(\[\^:\\/\#\\\?\\\]\\\[\]\+\|\\\[\[\^\\/\\\]@\#\?\]\+\\\]\)\(\?:\\:\(\[0\-9\]\+\)\)\?\)\)\?\)\?\)\?\(\(\?:\\/\?\(\?:\[\^\\/\\\?\#\]\+\\/\+\)\*\)\(\?:\[\^\\\?\#\]\*\)\)\)\?\(\\\?\[\^\#\]\+\)\?\)\(\#\.\*\)\?');
+
/**
* The actual URL instance. Instead of returning an object we've opted-in to
* create an actual constructor as it's much more memory efficient and
@@ -5052,21 +5083,11 @@ function URL(address, location, parser) {
return new URL(address, location, parser);
}
- //
- // Inline the massive regular expression because it causes issues in FireFox
- // because our `exec` usage in this function. Normally there should be no side
- // affects because we're not doing global matching so the lastIndex of regular
- // expression should stay the same but it's causing `too much recursion`
- // errors in FireFox when calling the parse method for a second time. Now,
- // with great pleasure I introduce to you:
- //
- // MOARE: Mother Of All Regular Expressions.
- //
- var regexp = /^(?:(?:(([^:\/#\?]+:)?(?:(?:\/\/)(?:(?:(?:([^:@\/#\?]+)(?:\:([^:@\/#\?]*))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/
- , bits = regexp.exec(address)
+ var bits = regexp.exec(address)
, type = typeof location
, url = this
, i = 0
+ , bits
, key;
//
diff --git a/dist/sockjs-1.0.0-beta.8.min.js b/dist/sockjs-1.0.0-beta.9.min.js
similarity index 95%
rename from dist/sockjs-1.0.0-beta.8.min.js
rename to dist/sockjs-1.0.0-beta.9.min.js
index 730f945..00e66cd 100755
--- a/dist/sockjs-1.0.0-beta.8.min.js
+++ b/dist/sockjs-1.0.0-beta.9.min.js
@@ -1,3 +1,3 @@
-/* sockjs-client v1.0.0-beta.8 | http://sockjs.org | MIT license */
+/* sockjs-client v1.0.0-beta.9 | http://sockjs.org | MIT license */
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.SockJS=t()}}(function(){var t;return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");th [...]
-},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":49,"../../utils/url":51,debug:void 0,events:3,inherits:53}],32:[function(t,e){"use strict";function n(t,e){i.call(this);var n=this;this.bufferPosition=0,this.xo=new e("POST",t,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(t,e){n._chunkHandler(t,e),n.xo=null;var r=200===t?"network":"permanent";n.emit("close",null,r),n._cleanup()})}var r=t("inherits"),i=t("events").EventEmitter [...]
\ No newline at end of file
+},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":49,"../../utils/url":51,debug:void 0,events:3,inherits:53}],32:[function(t,e){"use strict";function n(t,e){i.call(this);var n=this;this.bufferPosition=0,this.xo=new e("POST",t,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(t,e){n._chunkHandler(t,e),n.xo=null;var r=200===t?"network":"permanent";n.emit("close",null,r),n._cleanup()})}var r=t("inherits"),i=t("events").EventEmitter [...]
\ No newline at end of file
diff --git a/lib/version.js b/lib/version.js
index e09b31f..246fe5b 100644
--- a/lib/version.js
+++ b/lib/version.js
@@ -1 +1 @@
-module.exports = '1.0.0-beta.8';
\ No newline at end of file
+module.exports = '1.0.0-beta.9';
\ No newline at end of file
diff --git a/package.json b/package.json
index 7c4877c..4096916 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "sockjs-client",
"description": "SockJS-client is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.",
- "version": "1.0.0-beta.8",
+ "version": "1.0.0-beta.9",
"author": "Bryce Kahle",
"browser": {
"./lib/transport/driver/websocket.js": "./lib/transport/browser/websocket.js",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list