Title: [135729] trunk/Source/WebCore
Revision
135729
Author
stai...@webkit.org
Date
2012-11-26 08:32:31 -0800 (Mon, 26 Nov 2012)

Log Message

[BlackBerry] Remove a lot of unnecessary and incorrect code causing crashes
https://bugs.webkit.org/show_bug.cgi?id=103199

Reviewed by Yong Li.

This is the first big step to unforking this code.  It's very close to
where it needs to be now, but the first step is to get rid of the
crashes by deleting code that isn't needed and makes bad assumptions
about object lifetime.  Crashes were found by automation without
test case or reproduction steps.

* loader/blackberry/CookieJarBlackBerry.cpp:
(WebCore::cookies): delete most code
(WebCore::setCookies): delete most code

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (135728 => 135729)


--- trunk/Source/WebCore/ChangeLog	2012-11-26 16:22:31 UTC (rev 135728)
+++ trunk/Source/WebCore/ChangeLog	2012-11-26 16:32:31 UTC (rev 135729)
@@ -1,3 +1,20 @@
+2012-11-26  George Staikos  <stai...@webkit.org>
+
+        [BlackBerry] Remove a lot of unnecessary and incorrect code causing crashes
+        https://bugs.webkit.org/show_bug.cgi?id=103199
+
+        Reviewed by Yong Li.
+
+        This is the first big step to unforking this code.  It's very close to
+        where it needs to be now, but the first step is to get rid of the
+        crashes by deleting code that isn't needed and makes bad assumptions
+        about object lifetime.  Crashes were found by automation without
+        test case or reproduction steps.
+
+        * loader/blackberry/CookieJarBlackBerry.cpp:
+        (WebCore::cookies): delete most code
+        (WebCore::setCookies): delete most code
+
 2012-11-26  Thiago Marcos P. Santos  <thiago.san...@intel.com>
 
         Viewport CSS rules should not clamp values like Viewport META

Modified: trunk/Source/WebCore/loader/blackberry/CookieJarBlackBerry.cpp (135728 => 135729)


--- trunk/Source/WebCore/loader/blackberry/CookieJarBlackBerry.cpp	2012-11-26 16:22:31 UTC (rev 135728)
+++ trunk/Source/WebCore/loader/blackberry/CookieJarBlackBerry.cpp	2012-11-26 16:32:31 UTC (rev 135729)
@@ -39,38 +39,15 @@
 
 String cookies(Document const* document, KURL const& url)
 {
-    Frame* frame = document->frame();
-    Page* page = frame ? frame->page() : 0;
-
-    if (!page)
-        return String();
-
-    if (!(frame && frame->loader() && frame->loader()->client()))
-        return String();
-
-    if (!static_cast<FrameLoaderClientBlackBerry*>(frame->loader()->client())->cookiesEnabled())
-        return String();
-
-    ASSERT(document && url == document->cookieURL());
     // 'HttpOnly' cookies should no be accessible from scripts, so we filter them out here
     return cookieManager().getCookie(url, NoHttpOnlyCookie);
 }
 
 void setCookies(Document* document, KURL const& url, String const& value)
 {
-    Frame* frame = document->frame();
-    Page* page = frame ? frame->page() : 0;
-
-    if (!page)
+    if (!document->settings()->cookieEnabled())
         return;
 
-    if (!(frame && frame->loader() && frame->loader()->client()))
-        return;
-
-    if (!static_cast<FrameLoaderClientBlackBerry*>(frame->loader()->client())->cookiesEnabled())
-        return;
-
-    ASSERT(document && url == document->cookieURL());
     cookieManager().setCookies(url, value, NoHttpOnlyCookie);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to