OLD | NEW |
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 | 163 |
164 void V8::SetReturnAddressLocationResolver( | 164 void V8::SetReturnAddressLocationResolver( |
165 ReturnAddressLocationResolver resolver) { | 165 ReturnAddressLocationResolver resolver) { |
166 StackFrame::SetReturnAddressLocationResolver(resolver); | 166 StackFrame::SetReturnAddressLocationResolver(resolver); |
167 } | 167 } |
168 | 168 |
169 | 169 |
170 // Used by JavaScript APIs | 170 // Used by JavaScript APIs |
171 uint32_t V8::Random(Context* context) { | 171 uint32_t V8::Random(Context* context) { |
172 ASSERT(context->IsGlobalContext()); | 172 ASSERT(context->IsNativeContext()); |
173 ByteArray* seed = context->random_seed(); | 173 ByteArray* seed = context->random_seed(); |
174 return random_base(reinterpret_cast<uint32_t*>(seed->GetDataStartAddress())); | 174 return random_base(reinterpret_cast<uint32_t*>(seed->GetDataStartAddress())); |
175 } | 175 } |
176 | 176 |
177 | 177 |
178 // Used internally by the JIT and memory allocator for security | 178 // Used internally by the JIT and memory allocator for security |
179 // purposes. So, we keep a different state to prevent informations | 179 // purposes. So, we keep a different state to prevent informations |
180 // leaks that could be used in an exploit. | 180 // leaks that could be used in an exploit. |
181 uint32_t V8::RandomPrivate(Isolate* isolate) { | 181 uint32_t V8::RandomPrivate(Isolate* isolate) { |
182 ASSERT(isolate == Isolate::Current()); | 182 ASSERT(isolate == Isolate::Current()); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 SetUpJSCallerSavedCodeData(); | 282 SetUpJSCallerSavedCodeData(); |
283 SamplerRegistry::SetUp(); | 283 SamplerRegistry::SetUp(); |
284 ExternalReference::SetUp(); | 284 ExternalReference::SetUp(); |
285 } | 285 } |
286 | 286 |
287 void V8::InitializeOncePerProcess() { | 287 void V8::InitializeOncePerProcess() { |
288 CallOnce(&init_once, &InitializeOncePerProcessImpl); | 288 CallOnce(&init_once, &InitializeOncePerProcessImpl); |
289 } | 289 } |
290 | 290 |
291 } } // namespace v8::internal | 291 } } // namespace v8::internal |
OLD | NEW |