| 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 24 matching lines...) Expand all Loading... |
| 35 reinterpret_cast<GdiInitializeLanguagePack>(GetProcAddress( | 35 reinterpret_cast<GdiInitializeLanguagePack>(GetProcAddress( |
| 36 GetModuleHandle(L"GDI32.DLL"), | 36 GetModuleHandle(L"GDI32.DLL"), |
| 37 "GdiInitializeLanguagePack")); | 37 "GdiInitializeLanguagePack")); |
| 38 DCHECK(gdi_init_lpk); | 38 DCHECK(gdi_init_lpk); |
| 39 if (gdi_init_lpk) { | 39 if (gdi_init_lpk) { |
| 40 gdi_init_lpk(0); | 40 gdi_init_lpk(0); |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 std::string scavenge_reclaim_unmodified_flag( | |
| 46 "--scavenge_reclaim_unmodified_objects"); | |
| 47 v8::V8::SetFlagsFromString( | |
| 48 scavenge_reclaim_unmodified_flag.c_str(), | |
| 49 static_cast<int>(scavenge_reclaim_unmodified_flag.size())); | |
| 50 | |
| 51 if (base::SysInfo::IsLowEndDevice()) { | 45 if (base::SysInfo::IsLowEndDevice()) { |
| 52 std::string optimize_flag("--optimize-for-size"); | 46 std::string optimize_flag("--optimize-for-size"); |
| 53 v8::V8::SetFlagsFromString(optimize_flag.c_str(), | 47 v8::V8::SetFlagsFromString(optimize_flag.c_str(), |
| 54 static_cast<int>(optimize_flag.size())); | 48 static_cast<int>(optimize_flag.size())); |
| 55 } | 49 } |
| 56 | 50 |
| 57 const base::CommandLine& command_line = | 51 const base::CommandLine& command_line = |
| 58 *base::CommandLine::ForCurrentProcess(); | 52 *base::CommandLine::ForCurrentProcess(); |
| 59 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { | 53 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { |
| 60 std::string flags( | 54 std::string flags( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 78 | 72 |
| 79 void RenderProcessImpl::AddBindings(int bindings) { | 73 void RenderProcessImpl::AddBindings(int bindings) { |
| 80 enabled_bindings_ |= bindings; | 74 enabled_bindings_ |= bindings; |
| 81 } | 75 } |
| 82 | 76 |
| 83 int RenderProcessImpl::GetEnabledBindings() const { | 77 int RenderProcessImpl::GetEnabledBindings() const { |
| 84 return enabled_bindings_; | 78 return enabled_bindings_; |
| 85 } | 79 } |
| 86 | 80 |
| 87 } // namespace content | 81 } // namespace content |
| OLD | NEW |