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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 56 } |
57 | 57 |
58 const base::CommandLine& command_line = | 58 const base::CommandLine& command_line = |
59 *base::CommandLine::ForCurrentProcess(); | 59 *base::CommandLine::ForCurrentProcess(); |
60 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { | 60 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { |
61 std::string flags( | 61 std::string flags( |
62 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); | 62 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); |
63 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); | 63 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); |
64 } | 64 } |
65 | 65 |
66 if (command_line.HasSwitch( | |
67 switches::kEnableExperimentalWebPlatformFeatures)) { | |
68 std::string extras_flag("--experimental_extras"); | |
69 v8::V8::SetFlagsFromString(extras_flag.c_str(), | |
70 static_cast<int>(extras_flag.size())); | |
71 } | |
72 | |
73 SiteIsolationStatsGatherer::SetEnabled( | 66 SiteIsolationStatsGatherer::SetEnabled( |
74 GetContentClient()->renderer()->ShouldGatherSiteIsolationStats()); | 67 GetContentClient()->renderer()->ShouldGatherSiteIsolationStats()); |
75 } | 68 } |
76 | 69 |
77 RenderProcessImpl::~RenderProcessImpl() { | 70 RenderProcessImpl::~RenderProcessImpl() { |
78 #ifndef NDEBUG | 71 #ifndef NDEBUG |
79 int count = blink::WebFrame::instanceCount(); | 72 int count = blink::WebFrame::instanceCount(); |
80 if (count) | 73 if (count) |
81 DLOG(ERROR) << "WebFrame LEAKED " << count << " TIMES"; | 74 DLOG(ERROR) << "WebFrame LEAKED " << count << " TIMES"; |
82 #endif | 75 #endif |
83 | 76 |
84 GetShutDownEvent()->Signal(); | 77 GetShutDownEvent()->Signal(); |
85 } | 78 } |
86 | 79 |
87 void RenderProcessImpl::AddBindings(int bindings) { | 80 void RenderProcessImpl::AddBindings(int bindings) { |
88 enabled_bindings_ |= bindings; | 81 enabled_bindings_ |= bindings; |
89 } | 82 } |
90 | 83 |
91 int RenderProcessImpl::GetEnabledBindings() const { | 84 int RenderProcessImpl::GetEnabledBindings() const { |
92 return enabled_bindings_; | 85 return enabled_bindings_; |
93 } | 86 } |
94 | 87 |
95 } // namespace content | 88 } // namespace content |
OLD | NEW |