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

Unified Diff: extensions/renderer/resources/guest_view/guest_view_events.js

Issue 2745173002: Set prototype for GuestView*.prototype to null. (Closed)
Patch Set: 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
« 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: extensions/renderer/resources/guest_view/guest_view_events.js
diff --git a/extensions/renderer/resources/guest_view/guest_view_events.js b/extensions/renderer/resources/guest_view/guest_view_events.js
index e3ccde1a6c65c80541c333093677457cbbfcb5ab..f8334bfe36214e0fd4a7185a595ac43316f0b6d5 100644
--- a/extensions/renderer/resources/guest_view/guest_view_events.js
+++ b/extensions/renderer/resources/guest_view/guest_view_events.js
@@ -27,6 +27,10 @@ function GuestViewEvents(view) {
this.setupEvents();
}
+// Prevent GuestViewEvents inadvertently inheritng code from the global Object,
lazyboy 2017/03/13 18:15:14 OK. How about adding WebViewActionRequest and gues
wjmaclean 2017/03/13 19:34:48 Done. Will update. Yes, we are looking for more,
lazyboy 2017/03/13 19:46:06 Acknowledged.
+// allowing a pathway for unintended execution of user code.
+GuestViewEvents.prototype.__proto__ = null;
+
// |GuestViewEvents.EVENTS| is a dictionary of extension events to be listened
// for, which specifies how each event should be handled. The events are
// organized by name, and by default will be dispatched as DOM events with
« 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