Title: [201337] trunk/Websites/perf.webkit.org
- Revision
- 201337
- Author
- [email protected]
- Date
- 2016-05-24 11:04:03 -0700 (Tue, 24 May 2016)
Log Message
Another build fix after r201307.
* public/v3/pages/page-router.js:
(PageRouter.prototype._deserializeHashQueryValue):
(PageRouter.prototype._countOccurrences): Moved from _deserializeHashQueryValue.
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (201336 => 201337)
--- trunk/Websites/perf.webkit.org/ChangeLog 2016-05-24 17:36:05 UTC (rev 201336)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2016-05-24 18:04:03 UTC (rev 201337)
@@ -1,3 +1,11 @@
+2016-05-24 Ryosuke Niwa <[email protected]>
+
+ Another build fix after r201307.
+
+ * public/v3/pages/page-router.js:
+ (PageRouter.prototype._deserializeHashQueryValue):
+ (PageRouter.prototype._countOccurrences): Moved from _deserializeHashQueryValue.
+
2016-05-23 Ryosuke Niwa <[email protected]>
Build fix after r201307.
Modified: trunk/Websites/perf.webkit.org/public/v3/pages/page-router.js (201336 => 201337)
--- trunk/Websites/perf.webkit.org/public/v3/pages/page-router.js 2016-05-24 17:36:05 UTC (rev 201336)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/page-router.js 2016-05-24 18:04:03 UTC (rev 201337)
@@ -147,12 +147,7 @@
// Some applications don't linkify two consecutive closing parentheses: )).
// Try fixing adding one extra parenthesis to see if that works.
- function count(regex)
- {
- var match = json.match(regex);
- return match ? match.length : 0;
- }
- var missingClosingBrackets = count(/\[/g) - count(/\]/g);
+ var missingClosingBrackets = this._countOccurrences(json, /\[/g) - this._countOccurrences(json, /\]/g);
var fix = new Array(missingClosingBrackets).fill(']').join('');
try {
return JSON.parse(json + fix);
@@ -161,4 +156,10 @@
return value;
}
}
+
+ _countOccurrences(string, regex)
+ {
+ var match = string.match(regex);
+ return match ? match.length : 0;
+ }
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes