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

Unified Diff: runtime/lib/math.cc

Issue 1393373003: Remove isolate argument from handle allocation: Part I (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanups Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/math.cc
diff --git a/runtime/lib/math.cc b/runtime/lib/math.cc
index 94662e6b9ed8dda5ad9a06b7fe1e0d76e4b3fcf7..f4b4626b436091286088a5f2693ee957a3e8ebc8 100644
--- a/runtime/lib/math.cc
+++ b/runtime/lib/math.cc
@@ -110,9 +110,9 @@ DEFINE_NATIVE_ENTRY(Random_nextState, 1) {
}
-RawTypedData* CreateRandomState(Isolate* isolate, uint64_t seed) {
+RawTypedData* CreateRandomState(Zone* zone, uint64_t seed) {
const TypedData& result = TypedData::Handle(
- isolate, TypedData::New(kTypedDataUint32ArrayCid, 2));
+ zone, TypedData::New(kTypedDataUint32ArrayCid, 2));
result.SetUint32(0, static_cast<uint32_t>(seed));
result.SetUint32(result.ElementSizeInBytes(),
static_cast<uint32_t>(seed >> 32));
@@ -187,7 +187,7 @@ DEFINE_NATIVE_ENTRY(Random_setupSeed, 1) {
if (seed == 0) {
seed = 0x5a17;
}
- return CreateRandomState(isolate, seed);
+ return CreateRandomState(zone, seed);
}
@@ -195,7 +195,7 @@ DEFINE_NATIVE_ENTRY(Random_initialSeed, 0) {
Random* rnd = isolate->random();
uint64_t seed = rnd->NextUInt32();
seed |= (static_cast<uint64_t>(rnd->NextUInt32()) << 32);
- return CreateRandomState(isolate, seed);
+ return CreateRandomState(zone, seed);
}
} // namespace dart
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698