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

Side by Side Diff: src/v8.cc

Issue 23493019: remove most Isolate::Current asserts (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« src/compiler.h ('K') | « src/stub-cache.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 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 ASSERT(context->IsNativeContext()); 161 ASSERT(context->IsNativeContext());
162 ByteArray* seed = context->random_seed(); 162 ByteArray* seed = context->random_seed();
163 return random_base(reinterpret_cast<uint32_t*>(seed->GetDataStartAddress())); 163 return random_base(reinterpret_cast<uint32_t*>(seed->GetDataStartAddress()));
164 } 164 }
165 165
166 166
167 // Used internally by the JIT and memory allocator for security 167 // Used internally by the JIT and memory allocator for security
168 // purposes. So, we keep a different state to prevent informations 168 // purposes. So, we keep a different state to prevent informations
169 // leaks that could be used in an exploit. 169 // leaks that could be used in an exploit.
170 uint32_t V8::RandomPrivate(Isolate* isolate) { 170 uint32_t V8::RandomPrivate(Isolate* isolate) {
171 ASSERT(isolate == Isolate::Current());
172 return random_base(isolate->private_random_seed()); 171 return random_base(isolate->private_random_seed());
173 } 172 }
174 173
175 174
176 void V8::AddCallCompletedCallback(CallCompletedCallback callback) { 175 void V8::AddCallCompletedCallback(CallCompletedCallback callback) {
177 if (call_completed_callbacks_ == NULL) { // Lazy init. 176 if (call_completed_callbacks_ == NULL) { // Lazy init.
178 call_completed_callbacks_ = new List<CallCompletedCallback>(); 177 call_completed_callbacks_ = new List<CallCompletedCallback>();
179 } 178 }
180 for (int i = 0; i < call_completed_callbacks_->length(); i++) { 179 for (int i = 0; i < call_completed_callbacks_->length(); i++) {
181 if (callback == call_completed_callbacks_->at(i)) return; 180 if (callback == call_completed_callbacks_->at(i)) return;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 ExternalReference::SetUp(); 300 ExternalReference::SetUp();
302 Bootstrapper::InitializeOncePerProcess(); 301 Bootstrapper::InitializeOncePerProcess();
303 } 302 }
304 303
305 304
306 void V8::InitializeOncePerProcess() { 305 void V8::InitializeOncePerProcess() {
307 CallOnce(&init_once, &InitializeOncePerProcessImpl); 306 CallOnce(&init_once, &InitializeOncePerProcessImpl);
308 } 307 }
309 308
310 } } // namespace v8::internal 309 } } // namespace v8::internal
OLDNEW
« src/compiler.h ('K') | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698