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

Unified Diff: ios/chrome/browser/passwords/resources/password_controller.js

Issue 2661503003: Catches and ignores errors when accessing win.document in Password Autofill JS (Closed)
Patch Set: cleanup Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698