[Webkit-unassigned] [Bug 25970] New: The implicit setter for DOM Storage does not handle null correctly.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 22 16:01:24 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=25970
Summary: The implicit setter for DOM Storage does not handle null
correctly.
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: New Bugs
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: jorlow at chromium.org
DOM Storage is supposed to only store data in string key/value pairs. setItem
seems to work as expected, but the implicit setter for LocalStorage and
SessionStorage appears to not handle this case correctly. The following
reduction demonstrates this:
<html><head><title>Safari Reductions</title>
<script>
function test() {
window.localStorage.a = null;
document.getElementById("a").innerHTML = typeof window.localStorage.a;
window.localStorage.setItem('b', null);
document.getElementById("b").innerHTML = typeof window.localStorage.b;
}
</script>
</head><body onload="test();">
<p>window.localStorage.a = null; <i>typeof window.localStorage.a</i> = <span
id="a"></span>
<br />(It should be 'string')</p>
<p>window.localStorage.setItem('b', null); <i>typeof window.localStorage.b</i>
= <span id="b"></span>
<br />(It should be 'string')</p>
</body>
</html>
Note that this code triggers an ASSERT(!value.isNull()) check in the setItem
implementation.
I'll attempt to fix this (and create a layout test to catch it) in the next
couple weeks.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list