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

Unified Diff: third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp

Issue 2765783002: Restrict Navigator.getInstalledRelatedApps() to secure contexts. (Closed)
Patch Set: fix copypaste Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp
diff --git a/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp b/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp
index 88b692443fd2b63097fad0bd609f4c477cb840a0..f95d791768c0da5a4396b726d80fd4679931f21e 100644
--- a/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp
+++ b/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp
@@ -44,6 +44,8 @@ NavigatorInstalledApp& NavigatorInstalledApp::from(Navigator& navigator) {
ScriptPromise NavigatorInstalledApp::getInstalledRelatedApps(
ScriptState* scriptState,
Navigator& navigator) {
+ // [SecureContext] from the IDL ensures this.
+ DCHECK(scriptState->getExecutionContext()->isSecureContext());
return NavigatorInstalledApp::from(navigator).getInstalledRelatedApps(
scriptState);
}

Powered by Google App Engine
This is Rietveld 408576698