OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 static bool UseCrankshaft() { return use_crankshaft_; } | 84 static bool UseCrankshaft() { return use_crankshaft_; } |
85 // To be dead you have to have lived | 85 // To be dead you have to have lived |
86 // TODO(isolates): move IsDead to Isolate. | 86 // TODO(isolates): move IsDead to Isolate. |
87 static bool IsDead() { return has_fatal_error_ || has_been_disposed_; } | 87 static bool IsDead() { return has_fatal_error_ || has_been_disposed_; } |
88 static void SetFatalError(); | 88 static void SetFatalError(); |
89 | 89 |
90 // Report process out of memory. Implementation found in api.cc. | 90 // Report process out of memory. Implementation found in api.cc. |
91 static void FatalProcessOutOfMemory(const char* location, | 91 static void FatalProcessOutOfMemory(const char* location, |
92 bool take_snapshot = false); | 92 bool take_snapshot = false); |
93 | 93 |
94 // Allows a cryptographically safe entropy source to be provided | |
Mads Ager (chromium)
2011/07/17 08:59:12
Let's remove the cryptographically safe part.
| |
95 // for use in random number generation. | |
96 static void SetEntropySource(EntropySource source); | |
94 // Random number generation support. Not cryptographically safe. | 97 // Random number generation support. Not cryptographically safe. |
95 static uint32_t Random(Isolate* isolate); | 98 static uint32_t Random(Isolate* isolate); |
96 // We use random numbers internally in memory allocation and in the | 99 // We use random numbers internally in memory allocation and in the |
97 // compilers for security. In order to prevent information leaks we | 100 // compilers for security. In order to prevent information leaks we |
98 // use a separate random state for internal random number | 101 // use a separate random state for internal random number |
99 // generation. | 102 // generation. |
100 static uint32_t RandomPrivate(Isolate* isolate); | 103 static uint32_t RandomPrivate(Isolate* isolate); |
101 static Object* FillHeapNumberWithRandom(Object* heap_number, | 104 static Object* FillHeapNumberWithRandom(Object* heap_number, |
102 Isolate* isolate); | 105 Isolate* isolate); |
103 | 106 |
(...skipping 15 matching lines...) Expand all Loading... | |
119 static bool has_been_disposed_; | 122 static bool has_been_disposed_; |
120 // True if we are using the crankshaft optimizing compiler. | 123 // True if we are using the crankshaft optimizing compiler. |
121 static bool use_crankshaft_; | 124 static bool use_crankshaft_; |
122 }; | 125 }; |
123 | 126 |
124 } } // namespace v8::internal | 127 } } // namespace v8::internal |
125 | 128 |
126 namespace i = v8::internal; | 129 namespace i = v8::internal; |
127 | 130 |
128 #endif // V8_V8_H_ | 131 #endif // V8_V8_H_ |
OLD | NEW |