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

Unified Diff: test/cctest/test-serialize.cc

Issue 1798863003: Revert of Allow Math.random to be called when creating a custom startup snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@testserialize
Patch Set: Created 4 years, 9 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 | « src/runtime/runtime-maths.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index c90ddb9c5d16ea0324cb1a6f44f160ab3da0a711..8477c384f3c245e3a8f844b4a9f8550d97149c60 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -462,8 +462,7 @@
" e = function(s) { return eval (s); }"
"})();"
"var o = this;"
- "var r = Math.random();"
- "var c = Math.sin(0) + Math.cos(0);"
+ "var r = Math.sin(0) + Math.cos(0);"
"var f = (function(a, b) { return a + b; }).bind(1, 2, 3);"
"var s = parseInt('12345');");
@@ -559,18 +558,7 @@
->ToNumber(v8_isolate->GetCurrentContext())
.ToLocalChecked()
->Value();
- CHECK(0.0 <= r && r < 1.0);
- // Math.random still works.
- double random = CompileRun("Math.random()")
- ->ToNumber(v8_isolate->GetCurrentContext())
- .ToLocalChecked()
- ->Value();
- CHECK(0.0 <= random && random < 1.0);
- double c = CompileRun("c")
- ->ToNumber(v8_isolate->GetCurrentContext())
- .ToLocalChecked()
- ->Value();
- CHECK_EQ(1, c);
+ CHECK_EQ(1, r);
int f = CompileRun("f()")
->ToNumber(v8_isolate->GetCurrentContext())
.ToLocalChecked()
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698