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

Unified Diff: inject.preload.js

Issue 29458601: Issue 5315 - Add support for Microsoft Edge (Closed)
Patch Set: Make checks for 'chrome' object existence consistent Created June 22, 2017, 2:38 p.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 | « icons/abp-50.png ('k') | lib/csp.js » ('j') | lib/requestBlocker.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: inject.preload.js
===================================================================
--- a/inject.preload.js
+++ b/inject.preload.js
@@ -174,8 +174,11 @@
{
for (let name of properties)
{
- Object.defineProperty(dest, name,
- Object.getOwnPropertyDescriptor(src, name));
+ if (src.hasOwnProperty(name))
+ {
+ Object.defineProperty(dest, name,
+ Object.getOwnPropertyDescriptor(src, name));
+ }
}
}
@@ -375,6 +378,7 @@
WrappedRTCPeerConnection.prototype = RealRTCPeerConnection.prototype;
let boundWrappedRTCPeerConnection = WrappedRTCPeerConnection.bind();
+ // NOTE: Edge does not support generateCertificate
copyProperties(RealRTCPeerConnection, boundWrappedRTCPeerConnection,
["generateCertificate", "name", "prototype"]);
RealRTCPeerConnection.prototype.constructor = boundWrappedRTCPeerConnection;
« no previous file with comments | « icons/abp-50.png ('k') | lib/csp.js » ('j') | lib/requestBlocker.js » ('J')

Powered by Google App Engine
This is Rietveld