[Webkit-unassigned] [Bug 25970] The implicit setter for DOM Storage does not handle null correctly.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 29 19:07:59 PDT 2009


------- Comment #6 from jorlow at google.com  2009-05-29 19:07 PDT -------
(In reply to comment #4)
> Do other non-string values types (in particular undefined) have similar
> issues...
> var undefinedVar;
> var array = [1,2,3];
> var number = 1.01;
> localStorage.a = T;
> localStorage.setItem('b', T);
> ... where the behavior is different depending on the style of setter used?
> Also, I gotta wonder about the utility of translating null to 'null'.

I added in testing to do an int and a function in an attempt to catch such
things, but I suppose I could add a new Array() to it, but it's pretty clear if
you look at the code that null is a special case because strings can be null or
an actual string.  (In reply to comment #3)
> (From update of attachment 30782 [review])
> I supposed it's OK to put the fix down here at the lowest level, but the use of
> the string "null" seems specific to JavaScript and so it seems to me this
> should be handled in the JavaScript bindings.

I agree; I don't like having this outside of the JavaScript code either.  That
said, the setter function is a pretty generic one that looks to be shared with
many other things that where it being null is not desirable.  Maybe it's worth
creating another one and creating a flag in the .idl bindings that'd tell it to
use it?  (Not sure exactly how that'd work, but I could research it.)

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