Modified: trunk/Source/WebCore/ChangeLog (113673 => 113674)
--- trunk/Source/WebCore/ChangeLog 2012-04-10 04:05:34 UTC (rev 113673)
+++ trunk/Source/WebCore/ChangeLog 2012-04-10 04:27:56 UTC (rev 113674)
@@ -1,3 +1,25 @@
+2012-04-09 Jason Liu <[email protected]>
+
+ [BlackBerry] Parsed Cookie's m_isMaxAgeSet is not needed.
+ https://bugs.webkit.org/show_bug.cgi?id=83457
+
+ Reviewed by Rob Buis.
+
+ When m_expiry is not -1, it must be set by setExpiry or setMaxAge. setExpiry will return when m_expiry
+ has been set. This ensures Max-Age's precedence.
+ And m_isMaxAgeSet is always false when the cookie is from database. This is not right.
+
+ So we use m_expiry instead of m_isMaxAgeSet.
+
+ No new tests. Refactor.
+
+ * platform/blackberry/ParsedCookie.cpp:
+ (WebCore::ParsedCookie::ParsedCookie):
+ (WebCore::ParsedCookie::setExpiry):
+ (WebCore::ParsedCookie::setMaxAge):
+ * platform/blackberry/ParsedCookie.h:
+ (ParsedCookie):
+
2012-04-09 Min Qin <[email protected]>
Fixed ordering of deleting CCInputHandler and CCLayerTreeHostImpl in layerTreeHostClosedOnImplThread
Modified: trunk/Source/WebCore/platform/blackberry/ParsedCookie.cpp (113673 => 113674)
--- trunk/Source/WebCore/platform/blackberry/ParsedCookie.cpp 2012-04-10 04:05:34 UTC (rev 113673)
+++ trunk/Source/WebCore/platform/blackberry/ParsedCookie.cpp 2012-04-10 04:27:56 UTC (rev 113674)
@@ -38,10 +38,9 @@
namespace WebCore {
ParsedCookie::ParsedCookie(double currentTime)
- : m_expiry(0)
+ : m_expiry(-1)
, m_creationTime(currentTime)
, m_lastAccessed(currentTime)
- , m_isMaxAgeSet(false)
, m_hasDefaultDomain(false)
, m_isSecure(false)
, m_isHttpOnly(false)
@@ -59,7 +58,6 @@
, m_expiry(expiry)
, m_creationTime(creationTime)
, m_lastAccessed(lastAccessed)
- , m_isMaxAgeSet(false)
, m_hasDefaultDomain(false)
, m_isSecure(isSecure)
, m_isHttpOnly(isHttpOnly)
@@ -77,7 +75,6 @@
, m_expiry(cookie->m_expiry)
, m_creationTime(cookie->m_creationTime)
, m_lastAccessed(cookie->m_lastAccessed)
- , m_isMaxAgeSet(cookie->m_isMaxAgeSet)
, m_hasDefaultDomain(cookie->m_hasDefaultDomain)
, m_isSecure(cookie->m_isSecure)
, m_isHttpOnly(cookie->m_isHttpOnly)
@@ -94,7 +91,7 @@
{
// If a cookie has both the Max-Age and the Expires attribute,
// the Max-Age attribute has precedence and controls the expiration date of the cookie.
- if (m_isMaxAgeSet || expiry.isEmpty())
+ if (m_expiry != -1 || expiry.isEmpty())
return;
m_isSession = false;
@@ -126,7 +123,6 @@
return;
}
m_expiry = value;
- m_isMaxAgeSet = true;
m_isSession = false;
// If maxAge value is not positive, let expiry-time be the earliest representable time.
Modified: trunk/Source/WebCore/platform/blackberry/ParsedCookie.h (113673 => 113674)
--- trunk/Source/WebCore/platform/blackberry/ParsedCookie.h 2012-04-10 04:05:34 UTC (rev 113673)
+++ trunk/Source/WebCore/platform/blackberry/ParsedCookie.h 2012-04-10 04:27:56 UTC (rev 113674)
@@ -110,7 +110,6 @@
// This is used for the LRU replacement policy.
double m_lastAccessed;
- bool m_isMaxAgeSet;
bool m_hasDefaultDomain;
bool m_isSecure;
bool m_isHttpOnly;