[Webkit-unassigned] [Bug 75880] New: [IndexedDB] Negative zero not round-tripped as a value

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 9 11:49:40 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=75880

           Summary: [IndexedDB] Negative zero not round-tripped as a value
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jsbell at chromium.org


Repro:

var negative_zero = -0;
function is_negative_zero() { return x === 0 && 1/x === -Infinity; }
var request = store.put(negative_zero, "neg_zero");
request.onsuccess = function () {
    request = store.get("neg_zero");
    request.onsuccess = function () {
        ASSERT(is_negative_zero(request.result));
    };
};

Reason:

In the V8 implementation of SerializedScriptValue, Int32s are serialized in a more efficient way than other numbers (which are serialized as doubles). The test calls v8::Value::IsInt32() which returns true for -0. When serialized/deserialized, this turns into plain old 0.

Either v8::Value::IsInt32() (and Uint32) should be changed or a special case should be added to SerializedScriptValue.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list