| Index: ios/chrome/browser/passwords/resources/password_controller.js
|
| diff --git a/ios/chrome/browser/passwords/resources/password_controller.js b/ios/chrome/browser/passwords/resources/password_controller.js
|
| index 7c4b8b9c65b8ce48f47c57169444776e78348760..f3bb4213d9097e437d8dd52d3c0753e3b917288e 100644
|
| --- a/ios/chrome/browser/passwords/resources/password_controller.js
|
| +++ b/ios/chrome/browser/passwords/resources/password_controller.js
|
| @@ -343,10 +343,14 @@ if (__gCrWeb && !__gCrWeb['fillPasswordForm']) {
|
| * look for password forms.
|
| */
|
| __gCrWeb.getPasswordFormDataList = function(formDataList, win) {
|
| - var doc = win.document;
|
| + var doc = null;
|
| +
|
| + try {
|
| + // Security violations may generate an exception or null to be returned.
|
| + doc = win.document;
|
| + } catch(e) {
|
| + }
|
|
|
| - // We may not be allowed to read the 'document' property from a frame
|
| - // that is in a different domain.
|
| if (!doc) {
|
| return;
|
| }
|
|
|