From f91a81fe77aa59a75792c8f7bd3b7510acfcd017 Mon Sep 17 00:00:00 2001 From: kirkouimet Date: Tue, 9 Jun 2015 15:56:54 -0700 Subject: [PATCH 1/3] Convert std::string path to a FilePath to get compiling working on Windows --- atom/common/crash_reporter/crash_reporter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/common/crash_reporter/crash_reporter.cc b/atom/common/crash_reporter/crash_reporter.cc index 365860b256c7..144542086a1f 100644 --- a/atom/common/crash_reporter/crash_reporter.cc +++ b/atom/common/crash_reporter/crash_reporter.cc @@ -46,7 +46,7 @@ std::vector CrashReporter::GetUploadedReports(const std::string& path) { std::string file_content; std::vector result; - if (base::ReadFileToString(base::FilePath(path), &file_content)) { + if (base::ReadFileToString(base::FilePath::FromUTF8Unsafe(path), &file_content)) { std::vector reports; base::SplitString(file_content, '\n', &reports); for (const std::string& report : reports) { From 0fef09281b27fcb6de9f90d521e549026e79b4c5 Mon Sep 17 00:00:00 2001 From: Kirk Ouimet Date: Tue, 9 Jun 2015 16:17:00 -0700 Subject: [PATCH 2/3] 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. From 09c5da7147d3934efee209a7cfeedd6651b2c7c1 Mon Sep 17 00:00:00 2001 From: Kirk Ouimet Date: Tue, 9 Jun 2015 21:06:40 -0700 Subject: [PATCH 3/3] Fixing cpplint line width --- atom/common/crash_reporter/crash_reporter.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atom/common/crash_reporter/crash_reporter.cc b/atom/common/crash_reporter/crash_reporter.cc index 144542086a1f..59b7fd51e45e 100644 --- a/atom/common/crash_reporter/crash_reporter.cc +++ b/atom/common/crash_reporter/crash_reporter.cc @@ -46,7 +46,8 @@ std::vector CrashReporter::GetUploadedReports(const std::string& path) { std::string file_content; std::vector result; - if (base::ReadFileToString(base::FilePath::FromUTF8Unsafe(path), &file_content)) { + if (base::ReadFileToString(base::FilePath::FromUTF8Unsafe(path), + &file_content)) { std::vector reports; base::SplitString(file_content, '\n', &reports); for (const std::string& report : reports) {