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

Side by Side Diff: src/api.cc

Issue 23548024: Introduce a RandonNumberGenerator class. Refactor the random/private_random uses in Isolate/Context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years, 3 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 | « no previous file | src/assembler.cc » ('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 // 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "platform.h" 55 #include "platform.h"
56 #include "platform/time.h" 56 #include "platform/time.h"
57 #include "profile-generator-inl.h" 57 #include "profile-generator-inl.h"
58 #include "property-details.h" 58 #include "property-details.h"
59 #include "property.h" 59 #include "property.h"
60 #include "runtime.h" 60 #include "runtime.h"
61 #include "runtime-profiler.h" 61 #include "runtime-profiler.h"
62 #include "scanner-character-streams.h" 62 #include "scanner-character-streams.h"
63 #include "snapshot.h" 63 #include "snapshot.h"
64 #include "unicode-inl.h" 64 #include "unicode-inl.h"
65 #include "utils/random-number-generator.h"
65 #include "v8threads.h" 66 #include "v8threads.h"
66 #include "version.h" 67 #include "version.h"
67 #include "vm-state-inl.h" 68 #include "vm-state-inl.h"
68 69
69 70
70 #define LOG_API(isolate, expr) LOG(isolate, ApiEntryCall(expr)) 71 #define LOG_API(isolate, expr) LOG(isolate, ApiEntryCall(expr))
71 72
72 #define ENTER_V8(isolate) \ 73 #define ENTER_V8(isolate) \
73 ASSERT((isolate)->IsInitialized()); \ 74 ASSERT((isolate)->IsInitialized()); \
74 i::VMState<i::OTHER> __state__((isolate)) 75 i::VMState<i::OTHER> __state__((isolate))
(...skipping 5126 matching lines...) Expand 10 before | Expand all | Expand 10 after
5201 5202
5202 bool v8::V8::Initialize() { 5203 bool v8::V8::Initialize() {
5203 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); 5204 i::Isolate* isolate = i::Isolate::UncheckedCurrent();
5204 if (isolate != NULL && isolate->IsInitialized()) { 5205 if (isolate != NULL && isolate->IsInitialized()) {
5205 return true; 5206 return true;
5206 } 5207 }
5207 return InitializeHelper(isolate); 5208 return InitializeHelper(isolate);
5208 } 5209 }
5209 5210
5210 5211
5211 void v8::V8::SetEntropySource(EntropySource source) { 5212 void v8::V8::SetEntropySource(EntropySource entropy_source) {
5212 i::V8::SetEntropySource(source); 5213 i::RandomNumberGenerator::SetEntropySource(entropy_source);
5213 } 5214 }
5214 5215
5215 5216
5216 void v8::V8::SetReturnAddressLocationResolver( 5217 void v8::V8::SetReturnAddressLocationResolver(
5217 ReturnAddressLocationResolver return_address_resolver) { 5218 ReturnAddressLocationResolver return_address_resolver) {
5218 i::V8::SetReturnAddressLocationResolver(return_address_resolver); 5219 i::V8::SetReturnAddressLocationResolver(return_address_resolver);
5219 } 5220 }
5220 5221
5221 5222
5222 bool v8::V8::SetFunctionEntryHook(FunctionEntryHook entry_hook) { 5223 bool v8::V8::SetFunctionEntryHook(FunctionEntryHook entry_hook) {
(...skipping 2669 matching lines...) Expand 10 before | Expand all | Expand 10 after
7892 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7893 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7893 Address callback_address = 7894 Address callback_address =
7894 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7895 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7895 VMState<EXTERNAL> state(isolate); 7896 VMState<EXTERNAL> state(isolate);
7896 ExternalCallbackScope call_scope(isolate, callback_address); 7897 ExternalCallbackScope call_scope(isolate, callback_address);
7897 callback(info); 7898 callback(info);
7898 } 7899 }
7899 7900
7900 7901
7901 } } // namespace v8::internal 7902 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698