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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/fetch-request-with-gc.js

Issue 2025143003: [Fetch API] Request's JS wrapper should be kept alive in FetchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 function wait(delay) {
2 return new Promise(res => {
3 setTimeout(res, delay);
4 });
falken 2016/06/02 08:36:32 indent an additional two (or make the whole thing
yhirano 2016/06/02 10:10:11 Done.
5 }
6
7 self.addEventListener('fetch', e => {
8 self.gc();
9 e.respondWith(wait(10).then(() => {
10 self.gc();
11 return fetch(e.request);
12 }));
13 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698