Title: [219232] trunk/Websites/perf.webkit.org
- Revision
- 219232
- Author
- rn...@webkit.org
- Date
- 2017-07-06 19:59:11 -0700 (Thu, 06 Jul 2017)
Log Message
Safari 10.1 fails to upload a patch on perf try bots page
https://bugs.webkit.org/show_bug.cgi?id=174214
Reviewed by Chris Dumez.
Added the workaround to make the analysis task page work on Safari 10.1
* public/v3/components/instant-file-uploader.js:
(InstantFileUploader.prototype._uploadFiles): Convert files to an array since for-of doesn't work otherwise on Safari 10.1.
* public/v3/models/uploaded-file.js:
(UploadedFile._computeSHA256Hash): Fallback to crypto.webkitSubtle since crypto.subtle isn't available on Safari 10.1 or 11.
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (219231 => 219232)
--- trunk/Websites/perf.webkit.org/ChangeLog 2017-07-07 02:44:15 UTC (rev 219231)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2017-07-07 02:59:11 UTC (rev 219232)
@@ -1,3 +1,17 @@
+2017-07-06 Ryosuke Niwa <rn...@webkit.org>
+
+ Safari 10.1 fails to upload a patch on perf try bots page
+ https://bugs.webkit.org/show_bug.cgi?id=174214
+
+ Reviewed by Chris Dumez.
+
+ Added the workaround to make the analysis task page work on Safari 10.1
+
+ * public/v3/components/instant-file-uploader.js:
+ (InstantFileUploader.prototype._uploadFiles): Convert files to an array since for-of doesn't work otherwise on Safari 10.1.
+ * public/v3/models/uploaded-file.js:
+ (UploadedFile._computeSHA256Hash): Fallback to crypto.webkitSubtle since crypto.subtle isn't available on Safari 10.1 or 11.
+
2017-07-03 Ryosuke Niwa <rn...@webkit.org>
Fix a typo pointed out by Andreas Kling.
Modified: trunk/Websites/perf.webkit.org/public/v3/components/instant-file-uploader.js (219231 => 219232)
--- trunk/Websites/perf.webkit.org/public/v3/components/instant-file-uploader.js 2017-07-07 02:44:15 UTC (rev 219231)
+++ trunk/Websites/perf.webkit.org/public/v3/components/instant-file-uploader.js 2017-07-07 02:59:11 UTC (rev 219232)
@@ -153,6 +153,7 @@
_uploadFiles(files)
{
const limit = UploadedFile.fileUploadSizeLimit;
+ files = Array.from(files);
for (let file of files) {
if (file.size > limit) {
alert(`The specified file "${file.name}" is too big (${this._fileSizeFormatter(file.size)}). It must be smaller than ${this._fileSizeFormatter(limit)}`);
Modified: trunk/Websites/perf.webkit.org/public/v3/models/uploaded-file.js (219231 => 219232)
--- trunk/Websites/perf.webkit.org/public/v3/models/uploaded-file.js 2017-07-07 02:44:15 UTC (rev 219231)
+++ trunk/Websites/perf.webkit.org/public/v3/models/uploaded-file.js 2017-07-07 02:59:11 UTC (rev 219232)
@@ -58,7 +58,7 @@
static _computeSHA256Hash(content)
{
- return crypto.subtle.digest('SHA-256', content).then((digest) => {
+ return (crypto.subtle || crypto.webkitSubtle).digest('SHA-256', content).then((digest) => {
return Array.from(new Uint8Array(digest)).map((byte) => {
if (byte < 0x10)
return '0' + byte.toString(16);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes