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

Side by Side Diff: extensions/renderer/resources/guest_view/guest_view.js

Issue 2745173002: Set prototype for GuestView*.prototype to null. (Closed)
Patch Set: More nulls. 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 unified diff | Download patch
« no previous file with comments | « no previous file | extensions/renderer/resources/guest_view/guest_view_attributes.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This module implements a wrapper for a guestview that manages its 5 // This module implements a wrapper for a guestview that manages its
6 // creation, attaching, and destruction. 6 // creation, attaching, and destruction.
7 7
8 var CreateEvent = require('guestViewEvents').CreateEvent; 8 var CreateEvent = require('guestViewEvents').CreateEvent;
9 var EventBindings = require('event_bindings'); 9 var EventBindings = require('event_bindings');
10 var GuestViewInternal = getInternalApi ? 10 var GuestViewInternal = getInternalApi ?
(...skipping 30 matching lines...) Expand all
41 this.guestView = guestView; 41 this.guestView = guestView;
42 this.pendingAction = null; 42 this.pendingAction = null;
43 this.viewType = viewType; 43 this.viewType = viewType;
44 this.internalInstanceId = 0; 44 this.internalInstanceId = 0;
45 45
46 this.setupOnResize(); 46 this.setupOnResize();
47 } 47 }
48 48
49 // Prevent GuestViewImpl inadvertently inheriting code from the global Object, 49 // Prevent GuestViewImpl inadvertently inheriting code from the global Object,
50 // allowing a pathway for executing unintended user code execution. 50 // allowing a pathway for executing unintended user code execution.
51 // TODO(wjmaclean): Use utils.expose() here instead? Track down other issues
52 // of Object inheritance. https://crbug.com/701034
51 GuestViewImpl.prototype.__proto__ = null; 53 GuestViewImpl.prototype.__proto__ = null;
52 54
53 // Possible states. 55 // Possible states.
54 GuestViewImpl.GuestState = { 56 GuestViewImpl.GuestState = {
55 GUEST_STATE_START: 0, 57 GUEST_STATE_START: 0,
56 GUEST_STATE_CREATED: 1, 58 GUEST_STATE_CREATED: 1,
57 GUEST_STATE_ATTACHED: 2 59 GUEST_STATE_ATTACHED: 2
58 }; 60 };
59 61
60 // Sets up the onResize property on the GuestView. 62 // Sets up the onResize property on the GuestView.
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 var internal = privates(this).internal; 355 var internal = privates(this).internal;
354 return internal.id; 356 return internal.id;
355 }; 357 };
356 358
357 // Exports 359 // Exports
358 if (!apiBridge) { 360 if (!apiBridge) {
359 exports.$set('GuestView', GuestView); 361 exports.$set('GuestView', GuestView);
360 exports.$set('GuestViewImpl', GuestViewImpl); 362 exports.$set('GuestViewImpl', GuestViewImpl);
361 exports.$set('ResizeEvent', ResizeEvent); 363 exports.$set('ResizeEvent', ResizeEvent);
362 } 364 }
OLDNEW
« no previous file with comments | « no previous file | extensions/renderer/resources/guest_view/guest_view_attributes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698