Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Issue 446323002: ServiceWorker: Prevent worker script with incorrect MIME type to be registered. (Closed)

Created:
6 years, 4 months ago by xiang
Modified:
6 years, 4 months ago
Reviewers:
falken, michaeln, Lei Zhang
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, alecflett+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: Prevent worker script with incorrect MIME type to be registered. Fix for spec update: https://github.com/slightlyoff/ServiceWorker/issues/380. A valid worker script MIME type should be one of below: application/x-javascript text/javascript application/javascript BUG=400604 TEST=https://codereview.chromium.org/448063002/ Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288922

Patch Set 1 #

Total comments: 1

Patch Set 2 : change to mime type #

Patch Set 3 : fix browser tests #

Messages

Total messages: 16 (0 generated)
xiang
PTAL, thanks! The layout test is added in: https://codereview.chromium.org/448063002/.
6 years, 4 months ago (2014-08-07 05:16:15 UTC) #1
falken
LGTM People sometimes like to see how the change can be tested in the CL ...
6 years, 4 months ago (2014-08-07 07:15:13 UTC) #2
michaeln
https://codereview.chromium.org/446323002/diff/1/content/browser/service_worker/service_worker_write_to_cache_job.cc File content/browser/service_worker/service_worker_write_to_cache_job.cc (right): https://codereview.chromium.org/446323002/diff/1/content/browser/service_worker/service_worker_write_to_cache_job.cc#newcode307 content/browser/service_worker/service_worker_write_to_cache_job.cc:307: request->GetResponseHeaderByName("content-type", &content_type); lgtm except please use GetMimeType() here so ...
6 years, 4 months ago (2014-08-07 20:00:03 UTC) #3
xiang
On 2014/08/07 20:00:03, michaeln wrote: > https://codereview.chromium.org/446323002/diff/1/content/browser/service_worker/service_worker_write_to_cache_job.cc > File content/browser/service_worker/service_worker_write_to_cache_job.cc > (right): > > https://codereview.chromium.org/446323002/diff/1/content/browser/service_worker/service_worker_write_to_cache_job.cc#newcode307 ...
6 years, 4 months ago (2014-08-11 01:43:02 UTC) #4
xiang
The CQ bit was checked by xiang.long@intel.com
6 years, 4 months ago (2014-08-11 01:43:14 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xiang.long@intel.com/446323002/20001
6 years, 4 months ago (2014-08-11 01:46:09 UTC) #6
xiang
The CQ bit was unchecked by xiang.long@intel.com
6 years, 4 months ago (2014-08-11 04:52:11 UTC) #7
xiang
Updated the CL to fix browsertests failures. PTAL, thanks!
6 years, 4 months ago (2014-08-11 07:06:13 UTC) #8
Lei Zhang
chrome/browser/chrome_service_worker_browsertest.cc lgtm stamp
6 years, 4 months ago (2014-08-11 18:29:32 UTC) #9
xiang
The CQ bit was checked by xiang.long@intel.com
6 years, 4 months ago (2014-08-12 01:22:28 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xiang.long@intel.com/446323002/40001
6 years, 4 months ago (2014-08-12 01:33:33 UTC) #11
commit-bot: I haz the power
Change committed as 288922
6 years, 4 months ago (2014-08-12 05:49:24 UTC) #12
falken
On 2014/08/12 05:49:24, I haz the power (commit-bot) wrote: > Change committed as 288922 Unfortunately, ...
6 years, 4 months ago (2014-08-12 07:36:42 UTC) #13
tapted
A revert of this CL has been created in https://codereview.chromium.org/459383002/ by tapted@chromium.org. The reason for ...
6 years, 4 months ago (2014-08-12 07:38:27 UTC) #14
xiang
On 2014/08/12 07:36:42, falken wrote: > On 2014/08/12 05:49:24, I haz the power (commit-bot) wrote: ...
6 years, 4 months ago (2014-08-12 08:17:39 UTC) #15
falken
6 years, 4 months ago (2014-08-12 08:23:55 UTC) #16
Message was sent while issue was closed.
On 2014/08/12 08:17:39, xiang wrote:
> On 2014/08/12 07:36:42, falken wrote:
> > On 2014/08/12 05:49:24, I haz the power (commit-bot) wrote:
> > > Change committed as 288922
> > 
> > Unfortunately, this CL seems to have collided with
> > https://codereview.chromium.org/434453005
> > 
> > Now the test that was added in the other CL is failing:
> >
http://build.chromium.org/p/chromium.linux/builders/Linux%20Tests/builds/12883
> > 
> > I don't see an obvious fix, so will revert this change.
> 
> It's caused by the new browsertest from
> https://codereview.chromium.org/434453005.
> The interceptors need return header with MIME type specified.
> 
> Do I need to create a new CL as this's closed?

I see. Yep, please make a new CL for relanding.

I'll lg.tm it. If the fix is trivial enough you can also just TBR.

Powered by Google App Engine
This is Rietveld 408576698