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

Side by Side Diff: src/v8.h

Issue 1873443002: Improved diagnostic message for JS heap out of memory (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code review fix, use ternary operator Created 4 years, 8 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
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #ifndef V8_V8_H_ 5 #ifndef V8_V8_H_
6 #define V8_V8_H_ 6 #define V8_V8_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 class V8 : public AllStatic { 14 class V8 : public AllStatic {
15 public: 15 public:
16 // Global actions. 16 // Global actions.
17 17
18 static bool Initialize(); 18 static bool Initialize();
19 static void TearDown(); 19 static void TearDown();
20 20
21 // Report process out of memory. Implementation found in api.cc. 21 // Report process out of memory. Implementation found in api.cc.
22 // This function will not return, but will terminate the execution. 22 // This function will not return, but will terminate the execution.
23 static void FatalProcessOutOfMemory(const char* location, 23 static void FatalProcessOutOfMemory(const char* location,
24 bool take_snapshot = false); 24 bool is_heap_oom = false);
25 25
26 static void InitializePlatform(v8::Platform* platform); 26 static void InitializePlatform(v8::Platform* platform);
27 static void ShutdownPlatform(); 27 static void ShutdownPlatform();
28 static v8::Platform* GetCurrentPlatform(); 28 static v8::Platform* GetCurrentPlatform();
29 // Replaces the current platform with the given platform. 29 // Replaces the current platform with the given platform.
30 // Should be used only for testing. 30 // Should be used only for testing.
31 static void SetPlatformForTesting(v8::Platform* platform); 31 static void SetPlatformForTesting(v8::Platform* platform);
32 32
33 static void SetNativesBlob(StartupData* natives_blob); 33 static void SetNativesBlob(StartupData* natives_blob);
34 static void SetSnapshotBlob(StartupData* snapshot_blob); 34 static void SetSnapshotBlob(StartupData* snapshot_blob);
35 35
36 private: 36 private:
37 static void InitializeOncePerProcessImpl(); 37 static void InitializeOncePerProcessImpl();
38 static void InitializeOncePerProcess(); 38 static void InitializeOncePerProcess();
39 39
40 // v8::Platform to use. 40 // v8::Platform to use.
41 static v8::Platform* platform_; 41 static v8::Platform* platform_;
42 }; 42 };
43 43
44 } // namespace internal 44 } // namespace internal
45 } // namespace v8 45 } // namespace v8
46 46
47 #endif // V8_V8_H_ 47 #endif // V8_V8_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698