Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: src/d8.cc

Issue 40233002: Avoid calling OS::TotalPhysicalMemory in defaults.cc, since this fails in the chrome renderer sandb… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 1653
1654 1654
1655 int Shell::Main(int argc, char* argv[]) { 1655 int Shell::Main(int argc, char* argv[]) {
1656 if (!SetOptions(argc, argv)) return 1; 1656 if (!SetOptions(argc, argv)) return 1;
1657 v8::V8::InitializeICU(); 1657 v8::V8::InitializeICU();
1658 #ifndef V8_SHARED 1658 #ifndef V8_SHARED
1659 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; 1659 i::FLAG_trace_hydrogen_file = "hydrogen.cfg";
1660 #else 1660 #else
1661 SetStandaloneFlagsViaCommandLine(); 1661 SetStandaloneFlagsViaCommandLine();
1662 #endif 1662 #endif
1663 v8::SetDefaultResourceConstraintsForCurrentPlatform(); 1663 v8::InitializeDefaultsForCurrentPlatform(i::OS::TotalPhysicalMemory());
1664 ASSERT(v8::SetDefaultResourceConstraintsForCurrentPlatform());
Sven Panne 2013/10/25 06:27:16 Huh? A side effect in an assert? This is definitel
1664 ShellArrayBufferAllocator array_buffer_allocator; 1665 ShellArrayBufferAllocator array_buffer_allocator;
1665 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); 1666 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
1666 int result = 0; 1667 int result = 0;
1667 Isolate* isolate = Isolate::GetCurrent(); 1668 Isolate* isolate = Isolate::GetCurrent();
1668 DumbLineEditor dumb_line_editor(isolate); 1669 DumbLineEditor dumb_line_editor(isolate);
1669 { 1670 {
1670 Initialize(isolate); 1671 Initialize(isolate);
1671 #ifdef ENABLE_VTUNE_JIT_INTERFACE 1672 #ifdef ENABLE_VTUNE_JIT_INTERFACE
1672 vTune::InitializeVtuneForV8(); 1673 vTune::InitializeVtuneForV8();
1673 #endif 1674 #endif
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1738 } 1739 }
1739 1740
1740 } // namespace v8 1741 } // namespace v8
1741 1742
1742 1743
1743 #ifndef GOOGLE3 1744 #ifndef GOOGLE3
1744 int main(int argc, char* argv[]) { 1745 int main(int argc, char* argv[]) {
1745 return v8::Shell::Main(argc, argv); 1746 return v8::Shell::Main(argc, argv);
1746 } 1747 }
1747 #endif 1748 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698