Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/ext/background.js

Issue 5721433737003008: Issue 1985 - Replaced __proto__ with Object.create() and Object.getPrototypeOf() (Closed)
Patch Set: Created Feb. 11, 2015, 11:51 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/ext/popup.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ext/background.js
===================================================================
--- a/chrome/ext/background.js
+++ b/chrome/ext/background.js
@@ -319,7 +319,7 @@
/* Web requests */
- var framesOfTabs = {__proto__: null};
+ var framesOfTabs = Object.create(null);
ext.getFrame = function(tabId, frameId)
{
@@ -339,7 +339,7 @@
{
if (details && details.length > 0)
{
- var frames = framesOfTabs[tab.id] = {__proto__: null};
+ var frames = framesOfTabs[tab.id] = Object.create.(null);
for (var i = 0; i < details.length; i++)
frames[details[i].frameId] = {url: details[i].url, parent: null};
@@ -379,7 +379,7 @@
if (!isMainFrame)
frames = framesOfTabs[details.tabId];
if (!frames)
- frames = framesOfTabs[details.tabId] = {__proto__: null};
+ frames = framesOfTabs[details.tabId] = Object.create(null);
var frame = null;
if (!isMainFrame)
« no previous file with comments | « no previous file | chrome/ext/popup.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld