[foozzie] Mock out Realm.eval

A new realm doesn't contain the mocks and suppressions on the global
object for correctness fuzzing. We replace Realm.eval with eval to
keep exercising the code.

Bug: chromium:1071133
Change-Id: Iffe82d37bf08829fc5937c17c2089277403e71dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153206
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67187}
This commit is contained in:
Michael Achenbach 2020-04-16 19:39:15 +02:00 committed by Commit Bot
parent b48b82e779
commit afc72ec498
2 changed files with 6 additions and 0 deletions

View File

@ -77,3 +77,6 @@ if (isBigEndian){
else {
testArrayType(Float64Array, [0, 1072693248]);
}
// Realm.eval is just eval.
assertEquals(1477662728716, Realm.eval(Realm.create(), `Date.now()`));

View File

@ -159,3 +159,6 @@ Object.defineProperty(
}
};
})();
// Mock Realm.
Realm.eval = function(realm, code) { return eval(code) };