[Webkit-unassigned] [Bug 32115] document.cookie accessors should raise INVALID_STATE_ERR if there is no browsing context

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 7 04:34:06 PST 2009


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





--- Comment #8 from Patrik Persson <patrik.j.persson at ericsson.com>  2009-12-07 04:34:05 PST ---
Created an attachment (id=44401)
 --> (https://bugs.webkit.org/attachment.cgi?id=44401)
Code to check browser behavior wrt. cookie access

Absolutely agree that other browsers' behavior is a key issue here. Thanks for
the hints on creating documents without browsing contexts.

I accessed the cookie of such a document (by loading an iframe, picking its
document, and removing the frame) in Firefox 3.5 and IE8. The test code is
attached. I got the following results:

FF3.5
-----
cookie assigned, no exception
cookie read, no exception
cookiecopy=ASSIGNED

IE8
---
cookie assignment exception: Error (Permission denied)
cookie read exception: Error (Permission denied)
cookiecopy=not assigned

To validate the test, I removed the assignment line
document.getElementById("frame_holder")... This restores the document's
browsing context. I then got the expected results:

FF3.5 & IE8
-----------
cookie assigned, no exception
cookie read, no exception
cookiecopy=ASSIGNED

-- 
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