From: Kirk Ouimet Date: Tue, 9 Jun 2015 23:17:00 +0000 (-0700) Subject: Guarding webview attributes against polluted Object.prototypes X-Git-Tag: v0.28.0~10^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=0fef09281b27fcb6de9f90d521e549026e79b4c5;p=electron.git 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. --- diff --git a/atom/renderer/lib/web-view/web-view.coffee b/atom/renderer/lib/web-view/web-view.coffee index da6f55c8..a815dc64 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.