[webkit-changes] [176626] trunk/Source

2014-12-01 Thread jpfau
Title: [176626] trunk/Source








Revision 176626
Author jp...@apple.com
Date 2014-12-01 20:28:25 -0800 (Mon, 01 Dec 2014)


Log Message
Add cancelable version of willSendRequest
https://bugs.webkit.org/show_bug.cgi?id=138987

Reviewed by Anders Carlsson.

Source/WebCore:

Covered by existing tests.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest):
* loader/ResourceLoader.h:

Source/WebKit2:

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::willSendRequest):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/ResourceLoader.cpp
trunk/Source/WebCore/loader/ResourceLoader.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (176625 => 176626)

--- trunk/Source/WebCore/ChangeLog	2014-12-02 04:09:24 UTC (rev 176625)
+++ trunk/Source/WebCore/ChangeLog	2014-12-02 04:28:25 UTC (rev 176626)
@@ -1,3 +1,16 @@
+2014-11-20  Jeffrey Pfau  
+
+Add cancelable version of willSendRequest
+https://bugs.webkit.org/show_bug.cgi?id=138987
+
+Reviewed by Anders Carlsson.
+
+Covered by existing tests.
+
+* loader/ResourceLoader.cpp:
+(WebCore::ResourceLoader::willSendRequest):
+* loader/ResourceLoader.h:
+
 2014-12-01  Benjamin Poulain  
 
 Add the dynamic specificity of the selector list argument when matching :nth-child() and :nth-last-child()


Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (176625 => 176626)

--- trunk/Source/WebCore/loader/ResourceLoader.cpp	2014-12-02 04:09:24 UTC (rev 176625)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp	2014-12-02 04:28:25 UTC (rev 176626)
@@ -286,6 +286,12 @@
 frameLoader()->client().dispatchDidReceiveServerRedirectForProvisionalLoad();
 }
 
+void ResourceLoader::willSendRequest(ResourceRequest&& request, const ResourceResponse& redirectResponse, std::function callback)
+{
+willSendRequest(request, redirectResponse);
+callback(request);
+}
+
 void ResourceLoader::didSendData(unsigned long long, unsigned long long)
 {
 }


Modified: trunk/Source/WebCore/loader/ResourceLoader.h (176625 => 176626)

--- trunk/Source/WebCore/loader/ResourceLoader.h	2014-12-02 04:09:24 UTC (rev 176625)
+++ trunk/Source/WebCore/loader/ResourceLoader.h	2014-12-02 04:28:25 UTC (rev 176626)
@@ -91,8 +91,9 @@
 void clearResourceData();
 
 virtual bool isSubresourceLoader();
-
+
 virtual void willSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse);
+virtual void willSendRequest(ResourceRequest&&, const ResourceResponse& redirectResponse, std::function callback);
 virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
 virtual void didReceiveResponse(const ResourceResponse&);
 virtual void didReceiveData(const char*, unsigned, long long encodedDataLength, DataPayloadType);


Modified: trunk/Source/WebKit2/ChangeLog (176625 => 176626)

--- trunk/Source/WebKit2/ChangeLog	2014-12-02 04:09:24 UTC (rev 176625)
+++ trunk/Source/WebKit2/ChangeLog	2014-12-02 04:28:25 UTC (rev 176626)
@@ -1,3 +1,13 @@
+2014-11-20  Jeffrey Pfau  
+
+Add cancelable version of willSendRequest
+https://bugs.webkit.org/show_bug.cgi?id=138987
+
+Reviewed by Anders Carlsson.
+
+* WebProcess/Network/WebResourceLoader.cpp:
+(WebKit::WebResourceLoader::willSendRequest):
+
 2014-12-01  Conrad Shultz  
 
 Clients need a way to explicitly set the title of a page preview


Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (176625 => 176626)

--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp	2014-12-02 04:09:24 UTC (rev 176625)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp	2014-12-02 04:28:25 UTC (rev 176626)
@@ -83,18 +83,21 @@
 {
 LOG(Network, "(WebProcess) WebResourceLoader::willSendRequest to '%s'", proposedRequest.url().string().utf8().data());
 
-Ref protect(*this);
+RefPtr protect(this);
 
 ResourceRequest newRequest = proposedRequest;
 if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForRedirect(m_coreLoader.get(), newRequest, redirectResponse))
 return;
 // FIXME: Do we need to update NetworkResourceLoader clientCredentialPolicy in case loader policy is DoNotAskClientForCrossOriginCredentials?
-m_coreLoader->willSendRequest(newRequest, redirectResponse);
-
-if (!m_coreLoader)
-return;
-
-send(Messages::NetworkResourceLoader::ContinueWillSendRequest(newRequest));
+m_coreLoader->willSendRequest(WTF::move(newRequest), redirectResponse, [protect](ResourceRequest& request) {
+if (!protect->m_coreLoader)
+return;
+
+if (!request.isNull())
+protect->send(Messages::NetworkResourceLoader::ContinueWillSendRequest(request));
+else
+protect->m_coreLoader-

[webkit-changes] [175424] trunk/Source/WTF

2014-10-31 Thread jpfau
Title: [175424] trunk/Source/WTF








Revision 175424
Author jp...@apple.com
Date 2014-10-31 14:21:15 -0700 (Fri, 31 Oct 2014)


Log Message
Unreviewed, fix ASan build after r175382

* wtf/SizeLimits.cpp:

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/SizeLimits.cpp




Diff

Modified: trunk/Source/WTF/ChangeLog (175423 => 175424)

--- trunk/Source/WTF/ChangeLog	2014-10-31 21:14:05 UTC (rev 175423)
+++ trunk/Source/WTF/ChangeLog	2014-10-31 21:21:15 UTC (rev 175424)
@@ -1,3 +1,9 @@
+2014-10-31  Jeffrey Pfau  
+
+Unreviewed, fix ASan build after r175382
+
+* wtf/SizeLimits.cpp:
+
 2014-10-31  Geoffrey Garen  
 
 Rolled in r175389.


Modified: trunk/Source/WTF/wtf/SizeLimits.cpp (175423 => 175424)

--- trunk/Source/WTF/wtf/SizeLimits.cpp	2014-10-31 21:14:05 UTC (rev 175423)
+++ trunk/Source/WTF/wtf/SizeLimits.cpp	2014-10-31 21:21:15 UTC (rev 175424)
@@ -41,7 +41,7 @@
 
 namespace WTF {
 
-#ifndef NDEBUG
+#if !defined(NDEBUG) || defined(ADDRESS_SANITIZER)
 struct SameSizeAsRefCounted {
 int a;
 bool b;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [175382] trunk/Source/WTF

2014-10-30 Thread jpfau
Title: [175382] trunk/Source/WTF








Revision 175382
Author jp...@apple.com
Date 2014-10-30 14:35:03 -0700 (Thu, 30 Oct 2014)


Log Message
ASSERT(!m_deletionHasBegun) in RefCounted.h should be ASSERT_WITH_SECURITY_IMPLICATION
https://bugs.webkit.org/show_bug.cgi?id=138141

Reviewed by Alexey Proskuryakov.

* wtf/RefCounted.h:
(WTF::RefCountedBase::ref):
(WTF::RefCountedBase::relaxAdoptionRequirement):
(WTF::RefCountedBase::derefBase):
(WTF::adopted):

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/RefCounted.h




Diff

Modified: trunk/Source/WTF/ChangeLog (175381 => 175382)

--- trunk/Source/WTF/ChangeLog	2014-10-30 21:30:19 UTC (rev 175381)
+++ trunk/Source/WTF/ChangeLog	2014-10-30 21:35:03 UTC (rev 175382)
@@ -1,3 +1,16 @@
+2014-10-30  Jeffrey Pfau  
+
+ASSERT(!m_deletionHasBegun) in RefCounted.h should be ASSERT_WITH_SECURITY_IMPLICATION
+https://bugs.webkit.org/show_bug.cgi?id=138141
+
+Reviewed by Alexey Proskuryakov.
+
+* wtf/RefCounted.h:
+(WTF::RefCountedBase::ref):
+(WTF::RefCountedBase::relaxAdoptionRequirement):
+(WTF::RefCountedBase::derefBase):
+(WTF::adopted):
+
 2014-10-28  Milan Crha  
 
 Use constants from wtf/MathExtras.h


Modified: trunk/Source/WTF/wtf/RefCounted.h (175381 => 175382)

--- trunk/Source/WTF/wtf/RefCounted.h	2014-10-30 21:30:19 UTC (rev 175381)
+++ trunk/Source/WTF/wtf/RefCounted.h	2014-10-30 21:35:03 UTC (rev 175382)
@@ -27,7 +27,7 @@
 
 namespace WTF {
 
-#ifdef NDEBUG
+#if defined(NDEBUG) && !defined(ADDRESS_SANITIZER)
 #define CHECK_REF_COUNTED_LIFECYCLE 0
 #else
 #define CHECK_REF_COUNTED_LIFECYCLE 1
@@ -41,7 +41,7 @@
 void ref()
 {
 #if CHECK_REF_COUNTED_LIFECYCLE
-ASSERT(!m_deletionHasBegun);
+ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun);
 ASSERT(!m_adoptionIsRequired);
 #endif
 ++m_refCount;
@@ -63,7 +63,7 @@
 void relaxAdoptionRequirement()
 {
 #if CHECK_REF_COUNTED_LIFECYCLE
-ASSERT(!m_deletionHasBegun);
+ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun);
 ASSERT(m_adoptionIsRequired);
 m_adoptionIsRequired = false;
 #endif
@@ -91,7 +91,7 @@
 bool derefBase()
 {
 #if CHECK_REF_COUNTED_LIFECYCLE
-ASSERT(!m_deletionHasBegun);
+ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun);
 ASSERT(!m_adoptionIsRequired);
 #endif
 
@@ -132,7 +132,7 @@
 {
 if (!object)
 return;
-ASSERT(!object->m_deletionHasBegun);
+ASSERT_WITH_SECURITY_IMPLICATION(!object->m_deletionHasBegun);
 object->m_adoptionIsRequired = false;
 }
 #endif






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [175277] trunk/Source/WebCore

2014-10-28 Thread jpfau
Title: [175277] trunk/Source/WebCore








Revision 175277
Author jp...@apple.com
Date 2014-10-28 15:38:44 -0700 (Tue, 28 Oct 2014)


Log Message
FrameProgressTracker expects Page to not have detached
https://bugs.webkit.org/show_bug.cgi?id=138061

Reviewed by Alexey Proskuryakov.

In some cases, a Page may be detached from a Frame before its
FrameLoader is torn down, causing FrameProgressTracker's destructor
to hit a null pointer.

No new tests; it is impossible to reliably simulate the null pointer
case without intrusive code changes.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/FrameLoader.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (175276 => 175277)

--- trunk/Source/WebCore/ChangeLog	2014-10-28 22:36:36 UTC (rev 175276)
+++ trunk/Source/WebCore/ChangeLog	2014-10-28 22:38:44 UTC (rev 175277)
@@ -1,3 +1,20 @@
+2014-10-24  Jeffrey Pfau  
+
+FrameProgressTracker expects Page to not have detached
+https://bugs.webkit.org/show_bug.cgi?id=138061
+
+Reviewed by Alexey Proskuryakov.
+
+In some cases, a Page may be detached from a Frame before its
+FrameLoader is torn down, causing FrameProgressTracker's destructor
+to hit a null pointer.
+
+No new tests; it is impossible to reliably simulate the null pointer
+case without intrusive code changes.
+
+* loader/FrameLoader.cpp:
+(WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
+
 2014-10-27  Ada Chan  
 
 Introduce a new abstract class called AudioProducer and keep a set of AudioProducers


Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (175276 => 175277)

--- trunk/Source/WebCore/loader/FrameLoader.cpp	2014-10-28 22:36:36 UTC (rev 175276)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2014-10-28 22:38:44 UTC (rev 175277)
@@ -189,8 +189,7 @@
 
 ~FrameProgressTracker()
 {
-ASSERT(!m_inProgress || m_frame.page());
-if (m_inProgress)
+if (m_inProgress && m_frame.page())
 m_frame.page()->progress().progressCompleted(m_frame);
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [174922] trunk

2014-10-20 Thread jpfau
Title: [174922] trunk








Revision 174922
Author jp...@apple.com
Date 2014-10-20 20:15:04 -0700 (Mon, 20 Oct 2014)


Log Message
Ensure attached frame count doesn't exceed the maximum allowed frames
https://bugs.webkit.org/show_bug.cgi?id=136457

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: fast/frames/exponential-frames.html

* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::isURLAllowed):

LayoutTests:

* fast/frames/exponential-frames-expected.txt: Added.
* fast/frames/exponential-frames.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLFrameElementBase.cpp


Added Paths

trunk/LayoutTests/fast/frames/exponential-frames-expected.txt
trunk/LayoutTests/fast/frames/exponential-frames.html




Diff

Modified: trunk/LayoutTests/ChangeLog (174921 => 174922)

--- trunk/LayoutTests/ChangeLog	2014-10-21 02:10:47 UTC (rev 174921)
+++ trunk/LayoutTests/ChangeLog	2014-10-21 03:15:04 UTC (rev 174922)
@@ -1,3 +1,13 @@
+2014-10-17  Jeffrey Pfau  
+
+Ensure attached frame count doesn't exceed the maximum allowed frames
+https://bugs.webkit.org/show_bug.cgi?id=136457
+
+Reviewed by Alexey Proskuryakov.
+
+* fast/frames/exponential-frames-expected.txt: Added.
+* fast/frames/exponential-frames.html: Added.
+
 2014-10-20  Youenn Fablet  
 
 Tighten XMLHttpRequest setRequestHeader value check


Added: trunk/LayoutTests/fast/frames/exponential-frames-expected.txt (0 => 174922)

--- trunk/LayoutTests/fast/frames/exponential-frames-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/frames/exponential-frames-expected.txt	2014-10-21 03:15:04 UTC (rev 174922)
@@ -0,0 +1 @@
+This test passes if it does not crash.


Added: trunk/LayoutTests/fast/frames/exponential-frames.html (0 => 174922)

--- trunk/LayoutTests/fast/frames/exponential-frames.html	(rev 0)
+++ trunk/LayoutTests/fast/frames/exponential-frames.html	2014-10-21 03:15:04 UTC (rev 174922)
@@ -0,0 +1,25 @@
+
+
+
+if (window.testRunner)
+testRunner.dumpAsText();
+
+
+This test passes if it does not crash.
+
+var elem = document.body;
+var frame = document.createElement("iframe");
+frame.setAttribute("id", "frame");
+document.body.appendChild(frame);
+var div = document.createElement("div");
+div.setAttribute("id", "div");
+frame.appendChild(div);
+for (var i = 0; i < 10; i++) {
+var div = document.getElementById("div");
+var clone = elem.parentElement.cloneNode(true);
+div.appendChild(clone);
+}
+frame.parentElement.removeChild(frame);
+
+
+


Modified: trunk/Source/WebCore/ChangeLog (174921 => 174922)

--- trunk/Source/WebCore/ChangeLog	2014-10-21 02:10:47 UTC (rev 174921)
+++ trunk/Source/WebCore/ChangeLog	2014-10-21 03:15:04 UTC (rev 174922)
@@ -1,3 +1,15 @@
+2014-10-17  Jeffrey Pfau  
+
+Ensure attached frame count doesn't exceed the maximum allowed frames
+https://bugs.webkit.org/show_bug.cgi?id=136457
+
+Reviewed by Alexey Proskuryakov.
+
+Test: fast/frames/exponential-frames.html
+
+* html/HTMLFrameElementBase.cpp:
+(WebCore::HTMLFrameElementBase::isURLAllowed):
+
 2014-10-20  Chris Dumez  
 
 ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition


Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.cpp (174921 => 174922)

--- trunk/Source/WebCore/html/HTMLFrameElementBase.cpp	2014-10-21 02:10:47 UTC (rev 174921)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.cpp	2014-10-21 03:15:04 UTC (rev 174922)
@@ -55,6 +55,9 @@
 
 bool HTMLFrameElementBase::isURLAllowed() const
 {
+if (document().page() && document().page()->subframeCount() >= Page::maxNumberOfFrames)
+return false;
+
 if (m_URL.isEmpty())
 return true;
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [173343] trunk/LayoutTests

2014-09-05 Thread jpfau
Title: [173343] trunk/LayoutTests








Revision 173343
Author jp...@apple.com
Date 2014-09-05 17:06:52 -0700 (Fri, 05 Sep 2014)


Log Message
Unreviewed, skip tests for a feature that isn't supported

* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (173342 => 173343)

--- trunk/LayoutTests/ChangeLog	2014-09-05 23:54:34 UTC (rev 173342)
+++ trunk/LayoutTests/ChangeLog	2014-09-06 00:06:52 UTC (rev 173343)
@@ -1,5 +1,11 @@
 2014-09-05  Jeffrey Pfau  
 
+Unreviewed, skip tests for a feature that isn't supported
+
+* platform/mac/TestExpectations:
+
+2014-09-05  Jeffrey Pfau  
+
 Add test after r173324
 
 Rubber-stamped by Simon Fraser.


Modified: trunk/LayoutTests/platform/mac/TestExpectations (173342 => 173343)

--- trunk/LayoutTests/platform/mac/TestExpectations	2014-09-05 23:54:34 UTC (rev 173342)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2014-09-06 00:06:52 UTC (rev 173343)
@@ -1401,3 +1401,7 @@
 
 webkit.org/b/136532 [ MountainLion ] media/audio-data-url.html [ Failure ]
 webkit.org/b/136532 [ MountainLion ] media/sources-fallback-codecs.html [ Failure ]
+
+# Mac doesn't support YUV 420/422 colorspace
+media/video-colorspace-yuv420.html [ Skip ]
+media/video-colorspace-yuv422.html [ Skip ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [173339] trunk/LayoutTests

2014-09-05 Thread jpfau
Title: [173339] trunk/LayoutTests








Revision 173339
Author jp...@apple.com
Date 2014-09-05 16:01:16 -0700 (Fri, 05 Sep 2014)


Log Message
Add test after r173324

Rubber-stamped by Simon Fraser.

* storage/indexeddb/version-change-event-expected.txt: Added.
* storage/indexeddb/version-change-event.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog


Added Paths

trunk/LayoutTests/storage/indexeddb/version-change-event-expected.txt
trunk/LayoutTests/storage/indexeddb/version-change-event.html




Diff

Modified: trunk/LayoutTests/ChangeLog (173338 => 173339)

--- trunk/LayoutTests/ChangeLog	2014-09-05 23:00:38 UTC (rev 173338)
+++ trunk/LayoutTests/ChangeLog	2014-09-05 23:01:16 UTC (rev 173339)
@@ -1,3 +1,12 @@
+2014-09-05  Jeffrey Pfau  
+
+Add test after r173324
+
+Rubber-stamped by Simon Fraser.
+
+* storage/indexeddb/version-change-event-expected.txt: Added.
+* storage/indexeddb/version-change-event.html: Added.
+
 2014-09-05  Brady Eidson  
 
 Allow pages with unload handlers in the page cache


Added: trunk/LayoutTests/storage/indexeddb/version-change-event-expected.txt (0 => 173339)

--- trunk/LayoutTests/storage/indexeddb/version-change-event-expected.txt	(rev 0)
+++ trunk/LayoutTests/storage/indexeddb/version-change-event-expected.txt	2014-09-05 23:01:16 UTC (rev 173339)
@@ -0,0 +1,22 @@
+Regression test for WK136583 - ensure the versionchange event has the proper name
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "version-change-event.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db._onversionchange_ = onVersionChange
+store = db.createObjectStore('store1')
+PASS db.version is 1
+request = indexedDB.open(dbname, 2)
+db._onversionchange_ = onVersionChange
+
+onVersionChange():
+PASS event.type is "versionchange"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/storage/indexeddb/version-change-event.html (0 => 173339)

--- trunk/LayoutTests/storage/indexeddb/version-change-event.html	(rev 0)
+++ trunk/LayoutTests/storage/indexeddb/version-change-event.html	2014-09-05 23:01:16 UTC (rev 173339)
@@ -0,0 +1,43 @@
+
+
+
+
+