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

Issue 1373773003: Implement 'window.isSecureContext'. (Closed)

Created:
5 years, 2 months ago by Mike West
Modified:
5 years, 2 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-worker-reviews_chromium.org, Inactive, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, eae+blinkwatch, eric.carlson_apple.com, falken, feature-media-reviews_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+worker_chromium.org, kinuko+serviceworker, kinuko+fileapi, michaeln, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-blink_chromium.org, mvanouwerkerk+watch_chromium.org, nhiroki, peter+watch_chromium.org, rwlbuis, scheib+watch_chromium.org, serviceworker-reviews, sof, timvolodine, tommyw+watchlist_chromium.org, tzik, vivekg_samsung, vivekg
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement 'window.isSecureContext'. The "Secure Contexts" spec defines a feature-detection mechanism for secure contexts on the Window and WorkerGlobalScope objects[1]. This patch implements the former. The latter will be in a subsequent patch, as the logic to deal with Shared Workers is a bit more complicated. It also renames the internal check from 'isPrivilegedContext' to 'isSecureContext', in line with the specification. That is a purely mechanical change, using the following commands: > git grep -n -l -e "isPrivilegedContext" | xargs -L1 sed -i '' -e 's/isPrivilegedContext/isSecureContext/g' > git grep -n -l -e "PrivilegeContextCheck" | xargs -L1 sed -i '' -e 's/PrivilegeContextCheck/SecureContextCheck/g' > git grep -n -l -e "StandardPrivilegeCheck" | xargs -L1 sed -i '' -e 's/StandardPrivilegeCheck/StandardSecureContextCheck/g' > git grep -n -l -e "WebCryptoPrivilegeCheck" | xargs -L1 sed -i '' -e 's/WebCryptoPrivilegeCheck/WebCryptoSecureContextCheck/g' [1]: https://w3c.github.io/webappsec/specs/powerfulfeatures/#monkey-patching-global-object BUG=534788 Committed: https://crrev.com/fd67eed6357b2a5487c13cc159b4e843a9c91aee Cr-Commit-Position: refs/heads/master@{#351290}

Patch Set 1 #

Patch Set 2 : Rebaseline. #

Total comments: 5

Patch Set 3 : Feedback. #

Total comments: 3

Patch Set 4 : document. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -45 lines) Patch
M content/renderer/pepper/host_dispatcher_wrapper.cc View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/resources/get-host-info.js View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/secureContexts/127.0.0.1.html View 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/secureContexts/authenticated.html View 1 2 1 chunk +49 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/secureContexts/localhost.html View 1 chunk +23 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/post-securecontext-status.html View 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/secureContexts/unauthenticated.html View 1 chunk +41 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ExecutionContext.h View 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Fullscreen.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.cpp View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Window.idl View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/forms/FileInputType.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/testing/NullExecutionContext.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/testing/NullExecutionContext.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/credentialmanager/PasswordCredential.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/geolocation/Geolocation.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/mediastream/MediaDevices.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/Notification.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/quota/StorageManager.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebDocument.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/public/web/WebDocument.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 33 (11 generated)
Mike West
Philip, would you mind taking a look at the layout tests? Jochen, would you mind ...
5 years, 2 months ago (2015-09-28 10:22:59 UTC) #2
jochen (gone - plz use gerrit)
content/ lgtm
5 years, 2 months ago (2015-09-28 11:37:22 UTC) #3
philipj_slow
Tests lgtm % title nit. https://codereview.chromium.org/1373773003/diff/20001/third_party/WebKit/LayoutTests/http/tests/resources/get-host-info.js File third_party/WebKit/LayoutTests/http/tests/resources/get-host-info.js (right): https://codereview.chromium.org/1373773003/diff/20001/third_party/WebKit/LayoutTests/http/tests/resources/get-host-info.js#newcode23 third_party/WebKit/LayoutTests/http/tests/resources/get-host-info.js:23: AUTHENTICATED_ORIGIN: 'https://' + UNAUTHENTICATED_HOST ...
5 years, 2 months ago (2015-09-28 12:17:56 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1373773003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1373773003/40001
5 years, 2 months ago (2015-09-28 13:27:38 UTC) #7
Mike West
https://codereview.chromium.org/1373773003/diff/20001/third_party/WebKit/LayoutTests/http/tests/resources/get-host-info.js File third_party/WebKit/LayoutTests/http/tests/resources/get-host-info.js (right): https://codereview.chromium.org/1373773003/diff/20001/third_party/WebKit/LayoutTests/http/tests/resources/get-host-info.js#newcode23 third_party/WebKit/LayoutTests/http/tests/resources/get-host-info.js:23: AUTHENTICATED_ORIGIN: 'https://' + UNAUTHENTICATED_HOST + ':' + HTTPS_PORT On ...
5 years, 2 months ago (2015-09-28 13:28:02 UTC) #8
philipj_slow
I didn't review anything except the tests, has someone looked at the actual implementation yet?
5 years, 2 months ago (2015-09-28 13:33:44 UTC) #9
Mike West
On 2015/09/28 at 13:33:44, philipj wrote: > I didn't review anything except the tests, has ...
5 years, 2 months ago (2015-09-28 13:35:18 UTC) #11
Mike West
On 2015/09/28 at 13:35:18, Mike West (slow) wrote: > On 2015/09/28 at 13:33:44, philipj wrote: ...
5 years, 2 months ago (2015-09-28 13:36:17 UTC) #12
Srirama
https://codereview.chromium.org/1373773003/diff/40001/third_party/WebKit/Source/core/frame/DOMWindow.cpp File third_party/WebKit/Source/core/frame/DOMWindow.cpp (right): https://codereview.chromium.org/1373773003/diff/40001/third_party/WebKit/Source/core/frame/DOMWindow.cpp#newcode161 third_party/WebKit/Source/core/frame/DOMWindow.cpp:161: if (!frame() || !document()) do we need the document ...
5 years, 2 months ago (2015-09-28 14:42:07 UTC) #14
philipj_slow
On 2015/09/28 13:35:18, Mike West (slow) wrote: > On 2015/09/28 at 13:33:44, philipj wrote: > ...
5 years, 2 months ago (2015-09-28 15:03:46 UTC) #15
philipj_slow
Everything LGTM, but I agree with Srirama that the document() check is a bit odd, ...
5 years, 2 months ago (2015-09-28 15:20:26 UTC) #16
Mike West
On 2015/09/28 at 15:20:26, philipj wrote: > https://codereview.chromium.org/1373773003/diff/40001/third_party/WebKit/Source/core/frame/DOMWindow.cpp#newcode161 > third_party/WebKit/Source/core/frame/DOMWindow.cpp:161: if (!frame() || !document()) > ...
5 years, 2 months ago (2015-09-28 16:52:53 UTC) #17
philipj_slow
On 2015/09/28 16:52:53, Mike West (slow) wrote: > On 2015/09/28 at 15:20:26, philipj wrote: > ...
5 years, 2 months ago (2015-09-29 09:22:15 UTC) #18
Mike West
On 2015/09/29 at 09:22:15, philipj wrote: > I actually don't have much of an opinion ...
5 years, 2 months ago (2015-09-29 09:30:01 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1373773003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1373773003/60001
5 years, 2 months ago (2015-09-29 09:30:38 UTC) #22
philipj_slow
On 2015/09/29 09:30:01, Mike West (slow) wrote: > On 2015/09/29 at 09:22:15, philipj wrote: > ...
5 years, 2 months ago (2015-09-29 09:45:26 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/126861)
5 years, 2 months ago (2015-09-29 10:02:18 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1373773003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1373773003/60001
5 years, 2 months ago (2015-09-29 10:27:37 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/126888)
5 years, 2 months ago (2015-09-29 10:48:36 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1373773003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1373773003/60001
5 years, 2 months ago (2015-09-29 11:20:17 UTC) #31
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 2 months ago (2015-09-29 12:05:46 UTC) #32
commit-bot: I haz the power
5 years, 2 months ago (2015-09-29 12:06:36 UTC) #33
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/fd67eed6357b2a5487c13cc159b4e843a9c91aee
Cr-Commit-Position: refs/heads/master@{#351290}

Powered by Google App Engine
This is Rietveld 408576698