From 0fef09281b27fcb6de9f90d521e549026e79b4c5 Mon Sep 17 00:00:00 2001 From: Kirk Ouimet Date: Tue, 9 Jun 2015 16:17:00 -0700 Subject: [PATCH] Guarding webview attributes against polluted Object.prototypes Ran into an error with the buildParams function breaking when using a JavaScript library that modified the Object.prototype, this small fix resolves the issue. --- atom/renderer/lib/web-view/web-view.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/renderer/lib/web-view/web-view.coffee b/atom/renderer/lib/web-view/web-view.coffee index da6f55c8fe35..a815dc6499dc 100644 --- a/atom/renderer/lib/web-view/web-view.coffee +++ b/atom/renderer/lib/web-view/web-view.coffee @@ -173,7 +173,7 @@ class WebViewImpl params = instanceId: @viewInstanceId userAgentOverride: @userAgentOverride - for attributeName, attribute of @attributes + for own attributeName, attribute of @attributes params[attributeName] = attribute.getValue() # When the WebView is not participating in layout (display:none) # then getBoundingClientRect() would report a width and height of 0.