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

Side by Side Diff: src/d8.cc

Issue 267163002: Revert "Removed default Isolate." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months 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
« no previous file with comments | « src/api.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project 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 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 SetStandaloneFlagsViaCommandLine(); 1652 SetStandaloneFlagsViaCommandLine();
1653 #endif 1653 #endif
1654 ShellArrayBufferAllocator array_buffer_allocator; 1654 ShellArrayBufferAllocator array_buffer_allocator;
1655 MockArrayBufferAllocator mock_arraybuffer_allocator; 1655 MockArrayBufferAllocator mock_arraybuffer_allocator;
1656 if (options.mock_arraybuffer_allocator) { 1656 if (options.mock_arraybuffer_allocator) {
1657 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator); 1657 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator);
1658 } else { 1658 } else {
1659 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); 1659 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
1660 } 1660 }
1661 int result = 0; 1661 int result = 0;
1662 Isolate* isolate = Isolate::New(); 1662 Isolate* isolate = Isolate::GetCurrent();
1663 #ifndef V8_SHARED 1663 #ifndef V8_SHARED
1664 v8::ResourceConstraints constraints; 1664 v8::ResourceConstraints constraints;
1665 constraints.ConfigureDefaults(i::OS::TotalPhysicalMemory(), 1665 constraints.ConfigureDefaults(i::OS::TotalPhysicalMemory(),
1666 i::OS::MaxVirtualMemory(), 1666 i::OS::MaxVirtualMemory(),
1667 i::CPU::NumberOfProcessorsOnline()); 1667 i::CPU::NumberOfProcessorsOnline());
1668 v8::SetResourceConstraints(isolate, &constraints); 1668 v8::SetResourceConstraints(isolate, &constraints);
1669 #endif 1669 #endif
1670 DumbLineEditor dumb_line_editor(isolate); 1670 DumbLineEditor dumb_line_editor(isolate);
1671 { 1671 {
1672 Isolate::Scope scope(isolate);
1673 Initialize(isolate); 1672 Initialize(isolate);
1674 #ifdef ENABLE_VTUNE_JIT_INTERFACE 1673 #ifdef ENABLE_VTUNE_JIT_INTERFACE
1675 vTune::InitializeVtuneForV8(); 1674 vTune::InitializeVtuneForV8();
1676 #endif 1675 #endif
1677 PerIsolateData data(isolate); 1676 PerIsolateData data(isolate);
1678 InitializeDebugger(isolate); 1677 InitializeDebugger(isolate);
1679 1678
1680 #ifndef V8_SHARED 1679 #ifndef V8_SHARED
1681 if (options.dump_heap_constants) { 1680 if (options.dump_heap_constants) {
1682 DumpHeapConstants(reinterpret_cast<i::Isolate*>(isolate)); 1681 DumpHeapConstants(reinterpret_cast<i::Isolate*>(isolate));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 } 1740 }
1742 1741
1743 } // namespace v8 1742 } // namespace v8
1744 1743
1745 1744
1746 #ifndef GOOGLE3 1745 #ifndef GOOGLE3
1747 int main(int argc, char* argv[]) { 1746 int main(int argc, char* argv[]) {
1748 return v8::Shell::Main(argc, argv); 1747 return v8::Shell::Main(argc, argv);
1749 } 1748 }
1750 #endif 1749 #endif
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698