Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/ext/background.js

Issue 6668950364487680: Issue 1593 - Extend workaround for Chrome bug breaking Flash videos to Chrome >=38 (Closed)
Patch Set: Created Nov. 24, 2014, 10:12 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ext/background.js
===================================================================
--- a/chrome/ext/background.js
+++ b/chrome/ext/background.js
@@ -319,10 +319,10 @@
if (frame)
{
- // Chrome 38 and 39 mistakenly reports requests of type 'object'
- // (e.g. requests initiated by Flash) with the type 'other'.
+ // Since Chrome 38 requests of type 'object' (e.g. requests
+ // initiated by Flash) are mistakenly reported with the type 'other'.
// https://code.google.com/p/chromium/issues/detail?id=410382
- if (requestType == "other" && / Chrome\/3[8-9]\b/.test(navigator.userAgent))
+ if (requestType == "other" && parseInt(navigator.userAgent.match(/\bChrome\/(\d+)/)[1], 10) >= 38)
Wladimir Palant 2014/11/25 16:45:51 This will error out if navigator.userAgent.match()
Sebastian Noack 2014/11/25 17:04:04 Well, in that case parseInt() will return NaN, and
requestType = "object";
if (!ext.webRequest.onBeforeRequest._dispatch(details.url, requestType, new Page({id: details.tabId}), frame))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld