diff options
Diffstat (limited to 'webkit/extensions')
-rw-r--r-- | webkit/extensions/v8/playback_extension.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/webkit/extensions/v8/playback_extension.cc b/webkit/extensions/v8/playback_extension.cc index e850457..42d0525 100644 --- a/webkit/extensions/v8/playback_extension.cc +++ b/webkit/extensions/v8/playback_extension.cc @@ -14,11 +14,15 @@ v8::Extension* PlaybackExtension::Get() { kPlaybackExtensionName, "(function () {" " var orig_date = Date;" + " var x = 0;" + " var time_seed = 1204251968254;" " Math.random = function() {" - " return 0.5;" + " x += .1;" + " return (x % 1);" " };" " Date.__proto__.now = function() {" - " return new orig_date(1204251968254);" + " time_seed += 50;" + " return new orig_date(time_seed);" " };" " Date = function() {" " return Date.now();" |