OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_process_impl.h" | 5 #include "content/renderer/render_process_impl.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 const base::CommandLine& command_line = | 52 const base::CommandLine& command_line = |
53 *base::CommandLine::ForCurrentProcess(); | 53 *base::CommandLine::ForCurrentProcess(); |
54 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { | 54 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { |
55 std::string flags( | 55 std::string flags( |
56 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); | 56 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); |
57 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); | 57 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); |
58 } | 58 } |
59 | 59 |
60 // Turn on cross-site document blocking for renderer processes. | 60 SiteIsolationStatsGatherer::SetEnabled( |
61 SiteIsolationPolicy::SetPolicyEnabled( | 61 GetContentClient()->renderer()->ShouldGatherSiteIsolationStats()); |
62 GetContentClient()->renderer()->ShouldEnableSiteIsolationPolicy()); | |
63 } | 62 } |
64 | 63 |
65 RenderProcessImpl::~RenderProcessImpl() { | 64 RenderProcessImpl::~RenderProcessImpl() { |
66 #ifndef NDEBUG | 65 #ifndef NDEBUG |
67 int count = blink::WebFrame::instanceCount(); | 66 int count = blink::WebFrame::instanceCount(); |
68 if (count) | 67 if (count) |
69 DLOG(ERROR) << "WebFrame LEAKED " << count << " TIMES"; | 68 DLOG(ERROR) << "WebFrame LEAKED " << count << " TIMES"; |
70 #endif | 69 #endif |
71 | 70 |
72 GetShutDownEvent()->Signal(); | 71 GetShutDownEvent()->Signal(); |
73 } | 72 } |
74 | 73 |
75 void RenderProcessImpl::AddBindings(int bindings) { | 74 void RenderProcessImpl::AddBindings(int bindings) { |
76 enabled_bindings_ |= bindings; | 75 enabled_bindings_ |= bindings; |
77 } | 76 } |
78 | 77 |
79 int RenderProcessImpl::GetEnabledBindings() const { | 78 int RenderProcessImpl::GetEnabledBindings() const { |
80 return enabled_bindings_; | 79 return enabled_bindings_; |
81 } | 80 } |
82 | 81 |
83 } // namespace content | 82 } // namespace content |
OLD | NEW |