Commit 644f18fe authored by csillag's avatar csillag

Update dom-text-matcher to 8cfa033d (master branch)

The new version has an patch on the diff-match-patch library,
which can detect a problem hidden deep within Chrome's v8 engine,
and warns the user to upgrade Chrome when the problem occurs.
parent 64af86df
......@@ -1502,7 +1502,14 @@ diff_match_patch.prototype.match_bitap_ = function(text, pattern, loc) {
var start = Math.max(1, loc - bin_mid + 1);
var finish = Math.min(loc + bin_mid, text.length) + pattern.length;
var rd = Array(finish + 2);
try {
var rd = Array(finish + 2);
} catch (ex) {
// This is probably caused by a Chrome bug, fixed in v30
// See https://code.google.com/p/v8/issues/detail?id=2790
window.alert("Please update to Chrome 30 or better.");
throw new Error("Failed to create array for " + (finish + 2) + " elements!");
}
rd[finish + 1] = (1 << d) - 1;
for (var j = finish; j >= start; j--) {
// The alphabet (s) is a sparse hash, so the following line generates
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment