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

Issue 232053005: Implement navigator.sendBeacon() (Closed)

Created:
6 years, 8 months ago by sof
Modified:
6 years, 7 months ago
CC:
blink-reviews, jamesr, dglazkov+blink, Nate Chapin, gavinp+loader_chromium.org, igrigorik, darin (slow to review)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Implement navigator.sendBeacon() This provides support for the Beacon API, https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html allowing async transmission of data using navigator.sendBeacon(). R=abarth@chromium.org,mkwst@chromium.org BUG=360603 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173837

Patch Set 1 #

Patch Set 2 : Non-Oilpan compile fix #

Patch Set 3 : Sync expected output #

Patch Set 4 : Adjust unrelated test expectation #

Total comments: 3

Patch Set 5 : Restructured ping loader code + added size restriction #

Total comments: 11

Patch Set 6 : Rebased + address review issues #

Total comments: 2

Patch Set 7 : Support CSP redirect checking #

Patch Set 8 : Revert CSP checking on redirects #

Unified diffs Side-by-side diffs Delta from patch set Stats (+908 lines, -20 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/fast/beacon/beacon-basic.html View 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/fast/beacon/beacon-basic-expected.txt View 1 chunk +14 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/navigation/beacon-allowance.html View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/navigation/beacon-allowance-expected.txt View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
A LayoutTests/http/tests/navigation/beacon-cookie.html View 1 chunk +50 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/navigation/beacon-cookie-expected.txt View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/navigation/beacon-cross-origin.html View 1 chunk +36 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/navigation/beacon-cross-origin-expected.txt View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/navigation/beacon-detached-no-crash.html View 1 2 3 4 1 chunk +28 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/navigation/beacon-detached-no-crash-expected.txt View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/navigation/beacon-same-origin.html View 1 2 3 4 5 6 1 chunk +61 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/navigation/beacon-same-origin-expected.txt View 1 2 3 4 5 1 chunk +52 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/navigation/resources/beacon-detached-no-crash-new-window.html View 1 2 3 4 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/http/tests/navigation/resources/check-beacon.php View 1 2 3 4 5 6 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/navigation/resources/save-beacon.php View 1 chunk +35 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-allowed.html View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
A + LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-allowed-expected.txt View 1 2 3 4 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked.html View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked-expected.txt View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-redirect-to-blocked.html View 1 2 3 4 5 6 1 chunk +32 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-redirect-to-blocked-expected.txt View 1 2 3 4 5 6 1 chunk +12 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/security/contentSecurityPolicy/resources/redir.php View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/fetch/FetchInitiatorTypeNames.in View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/Settings.in View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/html/HTMLAnchorElement.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A Source/core/loader/BeaconLoader.h View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download
A Source/core/loader/BeaconLoader.cpp View 1 2 3 4 5 6 7 1 chunk +129 lines, -0 lines 0 comments Download
M Source/core/loader/PingLoader.h View 1 2 3 4 7 2 chunks +18 lines, -12 lines 0 comments Download
M Source/core/loader/PingLoader.cpp View 1 2 3 4 5 7 3 chunks +2 lines, -3 lines 0 comments Download
A Source/modules/beacon/NavigatorBeacon.h View 1 2 3 4 5 1 chunk +54 lines, -0 lines 0 comments Download
A Source/modules/beacon/NavigatorBeacon.cpp View 1 2 3 4 5 6 7 1 chunk +161 lines, -0 lines 0 comments Download
A Source/modules/beacon/NavigatorBeacon.idl View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/network/FormData.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M Source/platform/network/FormData.cpp View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
abarth-chromium
https://codereview.chromium.org/232053005/diff/60001/Source/modules/beacon/NavigatorBeacon.h File Source/modules/beacon/NavigatorBeacon.h (right): https://codereview.chromium.org/232053005/diff/60001/Source/modules/beacon/NavigatorBeacon.h#newcode24 Source/modules/beacon/NavigatorBeacon.h:24: class NavigatorBeacon FINAL : public NoBaseWillBeGarbageCollectedFinalized<NavigatorBeacon>, public WillBeHeapSupplement<Navigator> { ...
6 years, 8 months ago (2014-04-10 18:25:14 UTC) #1
sof
I think this is now ready for consideration, please take a look (or suggest someone ...
6 years, 7 months ago (2014-05-05 16:07:49 UTC) #2
sof
ping?
6 years, 7 months ago (2014-05-08 05:34:31 UTC) #3
abarth-chromium
https://codereview.chromium.org/232053005/diff/70001/Source/core/loader/BeaconLoader.cpp File Source/core/loader/BeaconLoader.cpp (right): https://codereview.chromium.org/232053005/diff/70001/Source/core/loader/BeaconLoader.cpp#newcode35 Source/core/loader/BeaconLoader.cpp:35: request.clearHTTPOrigin(); Why? I'd just remove this logic. We include ...
6 years, 7 months ago (2014-05-08 13:15:25 UTC) #4
abarth-chromium
lgtm
6 years, 7 months ago (2014-05-08 13:15:40 UTC) #5
sof
Many thanks for the review, abarth. https://codereview.chromium.org/232053005/diff/70001/Source/core/loader/BeaconLoader.cpp File Source/core/loader/BeaconLoader.cpp (right): https://codereview.chromium.org/232053005/diff/70001/Source/core/loader/BeaconLoader.cpp#newcode35 Source/core/loader/BeaconLoader.cpp:35: request.clearHTTPOrigin(); On 2014/05/08 ...
6 years, 7 months ago (2014-05-08 20:47:07 UTC) #6
abarth-chromium
On 2014/05/08 20:47:07, sof wrote: > (If you recall why POSTs are Origin-decorated, I'd be ...
6 years, 7 months ago (2014-05-09 03:16:09 UTC) #7
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 7 months ago (2014-05-09 06:48:59 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/232053005/90001
6 years, 7 months ago (2014-05-09 06:50:54 UTC) #9
Mike West
Nice work, Sigbjorn! One note about the CSP integration: my understanding is that Beacon requests ...
6 years, 7 months ago (2014-05-09 06:59:26 UTC) #10
Mike West
https://codereview.chromium.org/232053005/diff/90001/Source/core/loader/BeaconLoader.cpp File Source/core/loader/BeaconLoader.cpp (right): https://codereview.chromium.org/232053005/diff/90001/Source/core/loader/BeaconLoader.cpp#newcode70 Source/core/loader/BeaconLoader.cpp:70: // Q: not in the spec; should there be ...
6 years, 7 months ago (2014-05-09 07:02:09 UTC) #11
sof
The CQ bit was unchecked by sigbjornf@opera.com
6 years, 7 months ago (2014-05-09 07:03:26 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-09 07:04:07 UTC) #13
sof
On 2014/05/09 06:59:26, Mike West wrote: > Nice work, Sigbjorn! > > One note about ...
6 years, 7 months ago (2014-05-09 07:50:08 UTC) #14
sof
On 2014/05/09 07:50:08, sof wrote: > On 2014/05/09 06:59:26, Mike West wrote: > > Nice ...
6 years, 7 months ago (2014-05-09 15:40:43 UTC) #15
sof
@davidben: if you've got suggestions on how to proceed with what #15 (tries to) detail, ...
6 years, 7 months ago (2014-05-09 15:43:02 UTC) #16
davidben
On 2014/05/09 15:43:02, sof wrote: > @davidben: if you've got suggestions on how to proceed ...
6 years, 7 months ago (2014-05-09 16:29:40 UTC) #17
sof
On 2014/05/09 16:29:40, David Benjamin wrote: > On 2014/05/09 15:43:02, sof wrote: > > @davidben: ...
6 years, 7 months ago (2014-05-09 19:12:04 UTC) #18
sof
How about not supporting CSP redirects here, initially? CSP checking in the browser process is ...
6 years, 7 months ago (2014-05-10 07:32:47 UTC) #19
abarth-chromium
On 2014/05/10 07:32:47, sof wrote: > How about not supporting CSP redirects here, initially? CSP ...
6 years, 7 months ago (2014-05-10 13:49:54 UTC) #20
sof
On 2014/05/10 13:49:54, abarth wrote: > On 2014/05/10 07:32:47, sof wrote: > > How about ...
6 years, 7 months ago (2014-05-10 14:20:44 UTC) #21
Mike West
On 2014/05/10 14:20:44, sof wrote: > On 2014/05/10 13:49:54, abarth wrote: > > On 2014/05/10 ...
6 years, 7 months ago (2014-05-10 17:35:18 UTC) #22
Mike West
On 2014/05/10 17:35:18, Mike West wrote: > On 2014/05/10 14:20:44, sof wrote: > > On ...
6 years, 7 months ago (2014-05-10 17:36:13 UTC) #23
sof
On 2014/05/10 17:36:13, Mike West wrote: > On 2014/05/10 17:35:18, Mike West wrote: > > ...
6 years, 7 months ago (2014-05-11 14:35:14 UTC) #24
sof
https://codereview.chromium.org/232053005/diff/90001/Source/core/loader/BeaconLoader.cpp File Source/core/loader/BeaconLoader.cpp (right): https://codereview.chromium.org/232053005/diff/90001/Source/core/loader/BeaconLoader.cpp#newcode70 Source/core/loader/BeaconLoader.cpp:70: // Q: not in the spec; should there be ...
6 years, 7 months ago (2014-05-11 14:35:24 UTC) #25
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 7 months ago (2014-05-11 14:35:39 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/232053005/130001
6 years, 7 months ago (2014-05-11 14:35:42 UTC) #27
commit-bot: I haz the power
6 years, 7 months ago (2014-05-11 14:51:51 UTC) #28
Message was sent while issue was closed.
Change committed as 173837

Powered by Google App Engine
This is Rietveld 408576698