Changeset 217107 in webkit


Ignore:
Timestamp:
May 19, 2017 2:19:01 AM (7 years ago)
Author:
rniwa@webkit.org
Message:

Speedometer 2.0: Vanilla JS test doesn't mark all todo items as completed
https://bugs.webkit.org/show_bug.cgi?id=172348

Reviewed by Antti Koivisto.

The bug was caused by the in-memory store class using the milisecond precision timestamp as an ID.
Because we inserts 50 items all at once, this can result in multiple data items sharing a single ID.

Fixed the bug by using a mononotically increasing ID instead.

  • Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/store.js:

(Store.prototype.save):

Location:
trunk/PerformanceTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r217089 r217107  
     12017-05-19  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Speedometer 2.0: Vanilla JS test doesn't mark all todo items as completed
     4        https://bugs.webkit.org/show_bug.cgi?id=172348
     5
     6        Reviewed by Antti Koivisto.
     7
     8        The bug was caused by the in-memory store class using the milisecond precision timestamp as an ID.
     9        Because we inserts 50 items all at once, this can result in multiple data items sharing a single ID.
     10
     11        Fixed the bug by using a mononotically increasing ID instead.
     12
     13        * Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/store.js:
     14        (Store.prototype.save):
     15
    1162017-05-18  Ryosuke Niwa  <rniwa@webkit.org>
    217
  • trunk/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/store.js

    r216719 r217107  
    44
    55    var MemoryStorage = {};
     6    var id = 1;
     7
    68    /**
    79     * Creates a new client side storage object and will create an empty
     
    9799        } else {
    98100            // Generate an ID
    99             updateData.id = new Date().getTime();
     101            updateData.id = id++;
    100102
    101103            todos.push(updateData);
Note: See TracChangeset for help on using the changeset viewer.