| 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 f95d791768c0da5a4396b726d80fd4679931f21e..f76d3cb9522c83294f35ad55a1c139db70b9785f 100644
|
| --- a/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp
|
| +++ b/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp
|
| @@ -80,6 +80,15 @@ ScriptPromise NavigatorInstalledApp::getInstalledRelatedApps(
|
| return promise;
|
| }
|
|
|
| + if (!appController->supplementable()->isMainFrame()) {
|
| + DOMException* exception =
|
| + DOMException::create(InvalidStateError,
|
| + "getInstalledRelatedApps() is only supported in "
|
| + "top-level browsing contexts.");
|
| + resolver->reject(exception);
|
| + return promise;
|
| + }
|
| +
|
| appController->getInstalledRelatedApps(
|
| WTF::wrapUnique(
|
| new CallbackPromiseAdapter<RelatedAppArray, void>(resolver)));
|
|
|