[webkit-changes] [226309] trunk

2017-12-28 Thread zalan
Title: [226309] trunk








Revision 226309
Author za...@apple.com
Date 2017-12-28 22:18:48 -0800 (Thu, 28 Dec 2017)


Log Message
RenderTreeUpdater::GeneratedContent should hold a weak reference to RenderQuote.
https://bugs.webkit.org/show_bug.cgi?id=181185


Reviewed by David Kilzer.

Source/WebCore:

Test: fast/css/content/content-quotes-crash-with-details.html

* rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updateQuotesUpTo):
* rendering/updating/RenderTreeUpdaterGeneratedContent.h:
(): Deleted.

LayoutTests:

* fast/css/content/content-quotes-crash-with-details-expected.txt: Added.
* fast/css/content/content-quotes-crash-with-details.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.h


Added Paths

trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details-expected.txt
trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details.html




Diff

Modified: trunk/LayoutTests/ChangeLog (226308 => 226309)

--- trunk/LayoutTests/ChangeLog	2017-12-29 05:56:29 UTC (rev 226308)
+++ trunk/LayoutTests/ChangeLog	2017-12-29 06:18:48 UTC (rev 226309)
@@ -1,3 +1,14 @@
+2017-12-28  Zalan Bujtas  
+
+RenderTreeUpdater::GeneratedContent should hold a weak reference to RenderQuote.
+https://bugs.webkit.org/show_bug.cgi?id=181185
+
+
+Reviewed by David Kilzer.
+
+* fast/css/content/content-quotes-crash-with-details-expected.txt: Added.
+* fast/css/content/content-quotes-crash-with-details.html: Added.
+
 2017-12-26  Matt Lewis  
 
 Marked imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/update.https.html as failing on macOS and iOS WK2.


Added: trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details-expected.txt (0 => 226309)

--- trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details-expected.txt	2017-12-29 06:18:48 UTC (rev 226309)
@@ -0,0 +1,2 @@
+PASS if no crash.
+ 


Added: trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details.html (0 => 226309)

--- trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details.html	(rev 0)
+++ trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details.html	2017-12-29 06:18:48 UTC (rev 226309)
@@ -0,0 +1,12 @@
+PASS if no crash.
+
+
+  
+
+
+if (window.testRunner)
+testRunner.dumpAsText();
+document.body.offsetHeight;
+summary.appendChild(span);
+details.style.setProperty("-webkit-appearance", "relevancy-level-indicator");
+


Modified: trunk/Source/WebCore/ChangeLog (226308 => 226309)

--- trunk/Source/WebCore/ChangeLog	2017-12-29 05:56:29 UTC (rev 226308)
+++ trunk/Source/WebCore/ChangeLog	2017-12-29 06:18:48 UTC (rev 226309)
@@ -1,3 +1,18 @@
+2017-12-28  Zalan Bujtas  
+
+RenderTreeUpdater::GeneratedContent should hold a weak reference to RenderQuote.
+https://bugs.webkit.org/show_bug.cgi?id=181185
+
+
+Reviewed by David Kilzer.
+
+Test: fast/css/content/content-quotes-crash-with-details.html
+
+* rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
+(WebCore::RenderTreeUpdater::GeneratedContent::updateQuotesUpTo):
+* rendering/updating/RenderTreeUpdaterGeneratedContent.h:
+(): Deleted.
+
 2017-12-28  Brady Eidson  
 
 Add a ProcessIdentifier, vended from the UI process, to each child process


Modified: trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp (226308 => 226309)

--- trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp	2017-12-29 05:56:29 UTC (rev 226308)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp	2017-12-29 06:18:48 UTC (rev 226309)
@@ -60,8 +60,8 @@
 for (; it != end; ++it) {
 auto& quote = *it;
 // Quote character depends on quote depth so we chain the updates.
-quote.updateRenderer(m_updater.m_builder, m_previousUpdatedQuote);
-m_previousUpdatedQuote = "e;
+quote.updateRenderer(m_updater.m_builder, m_previousUpdatedQuote.get());
+m_previousUpdatedQuote = makeWeakPtr(quote);
 if ("e == lastQuote)
 return;
 }


Modified: trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.h (226308 => 226309)

--- trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.h	2017-12-29 05:56:29 UTC (rev 226308)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.h	2017-12-29 06:18:48 UTC (rev 226309)
@@ -49,7 +49,7 @@
 bool needsPseudoElement(const std::optional&);
 
 RenderTreeUpdater& m_updater;
-Ren

[webkit-changes] [226306] trunk

2017-12-28 Thread commit-queue
Title: [226306] trunk








Revision 226306
Author commit-qu...@webkit.org
Date 2017-12-28 14:06:35 -0800 (Thu, 28 Dec 2017)


Log Message
[Win][CMake] Use add_custom_command to copy each forwarding header files
https://bugs.webkit.org/show_bug.cgi?id=180921

Patch by Fujii Hironori  on 2017-12-28
Reviewed by Brent Fulgham.

.:

Modifying WTF header files didn't trigger the recompilation of
TestWTF because Ninja doesn't know which command generates the
forwarding header.

Use add_custom_command to copy each forwarding header files.

* Source/cmake/WebKitMacros.cmake: Added a new function WEBKIT_MAKE_FORWARDING_HEADERS.

Source/_javascript_Core:

* PlatformWin.cmake: Use WEBKIT_MAKE_FORWARDING_HEADERS.

Source/WebCore:

No new tests because there is no behavior change.

* PlatformWin.cmake: Use WEBKIT_MAKE_FORWARDING_HEADERS.

Source/WebKitLegacy:

* PlatformWin.cmake: Use WEBKIT_MAKE_FORWARDING_HEADERS.

Source/WTF:

* wtf/PlatformWin.cmake: Use WEBKIT_MAKE_FORWARDING_HEADERS.

Tools:

TestWTFLib needs forwarding headers of WebCore. Use
add_dependencies instead of invoking the DerivedSources/WebCore/preBuild.cmd.

* TestWebKitAPI/PlatformWin.cmake:

Modified Paths

trunk/ChangeLog
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/PlatformWin.cmake
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/PlatformWin.cmake
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PlatformWin.cmake
trunk/Source/WebKitLegacy/ChangeLog
trunk/Source/WebKitLegacy/PlatformWin.cmake
trunk/Source/cmake/WebKitMacros.cmake
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/PlatformWin.cmake




Diff

Modified: trunk/ChangeLog (226305 => 226306)

--- trunk/ChangeLog	2017-12-28 18:13:15 UTC (rev 226305)
+++ trunk/ChangeLog	2017-12-28 22:06:35 UTC (rev 226306)
@@ -1,3 +1,18 @@
+2017-12-28  Fujii Hironori  
+
+[Win][CMake] Use add_custom_command to copy each forwarding header files
+https://bugs.webkit.org/show_bug.cgi?id=180921
+
+Reviewed by Brent Fulgham.
+
+Modifying WTF header files didn't trigger the recompilation of
+TestWTF because Ninja doesn't know which command generates the
+forwarding header.
+
+Use add_custom_command to copy each forwarding header files.
+
+* Source/cmake/WebKitMacros.cmake: Added a new function WEBKIT_MAKE_FORWARDING_HEADERS.
+
 2017-12-22  Michael Catanzaro  
 
 [GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds


Modified: trunk/Source/_javascript_Core/ChangeLog (226305 => 226306)

--- trunk/Source/_javascript_Core/ChangeLog	2017-12-28 18:13:15 UTC (rev 226305)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-12-28 22:06:35 UTC (rev 226306)
@@ -1,3 +1,12 @@
+2017-12-28  Fujii Hironori  
+
+[Win][CMake] Use add_custom_command to copy each forwarding header files
+https://bugs.webkit.org/show_bug.cgi?id=180921
+
+Reviewed by Brent Fulgham.
+
+* PlatformWin.cmake: Use WEBKIT_MAKE_FORWARDING_HEADERS.
+
 2017-12-28  Saam Barati  
 
 Assertion used to determine if something is an async generator is wrong


Modified: trunk/Source/_javascript_Core/PlatformWin.cmake (226305 => 226306)

--- trunk/Source/_javascript_Core/PlatformWin.cmake	2017-12-28 18:13:15 UTC (rev 226305)
+++ trunk/Source/_javascript_Core/PlatformWin.cmake	2017-12-28 22:06:35 UTC (rev 226306)
@@ -33,16 +33,10 @@
 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
 )
 
-file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/_javascript_Core)
+WEBKIT_MAKE_FORWARDING_HEADERS(_javascript_Core
+DIRECTORIES ${_javascript_Core_FORWARDING_HEADERS_DIRECTORIES}
+DERIVED_SOURCE_DIRECTORIES ${DERIVED_SOURCES_DIR}/_javascript_Core ${DERIVED_SOURCES_DIR}/_javascript_Core/inspector
+FLATTENED
+)
 
-set(_javascript_Core_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/_javascript_Core/preBuild.cmd")
-file(REMOVE "${_javascript_Core_PRE_BUILD_COMMAND}")
-foreach (_directory ${_javascript_Core_FORWARDING_HEADERS_DIRECTORIES})
-file(APPEND "${_javascript_Core_PRE_BUILD_COMMAND}" "@xcopy /y /d /f \"${_javascript_CORE_DIR}/${_directory}/*.h\" \"${FORWARDING_HEADERS_DIR}/_javascript_Core\" >nul 2>nul\n")
-endforeach ()
-
-set(_javascript_Core_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/_javascript_Core/postBuild.cmd")
-file(WRITE "${_javascript_Core_POST_BUILD_COMMAND}" "@xcopy /y /d /f \"${DERIVED_SOURCES_DIR}/_javascript_Core/*.h\" \"${FORWARDING_HEADERS_DIR}/_javascript_Core\" >nul 2>nul\n")
-file(APPEND "${_javascript_Core_POST_BUILD_COMMAND}" "@xcopy /y /d /f \"${DERIVED_SOURCES_DIR}/_javascript_Core/inspector/*.h\" \"${FORWARDING_HEADERS_DIR}/_javascript_Core\" >nul 2>nul\n")
-
 set(_javascript_Core_OUTPUT_NAME _javascript_Core${DEBUG_SUFFIX})


Modified: trunk/Source/WTF/ChangeLog (226305 => 226306)

--- trunk/Source/WTF/ChangeLog	2017-12-28 18:13:15 UTC (rev 226305)
+++ trunk/Source/WTF/ChangeLog	2017-12-28 22:06:35 UTC (rev 226306)
@@ -1,3 +1,12 @@
+2017-12-28  Fuj

[webkit-changes] [226305] trunk

2017-12-28 Thread sbarati
Title: [226305] trunk








Revision 226305
Author sbar...@apple.com
Date 2017-12-28 10:13:15 -0800 (Thu, 28 Dec 2017)


Log Message
Assertion used to determine if something is an async generator is wrong
https://bugs.webkit.org/show_bug.cgi?id=181168


Reviewed by Yusuke Suzuki.

JSTests:

* stress/async-generator-assertion.js: Added.

Source/_javascript_Core:

Previous assertions were doing a get on the base value for @@asyncIterator.
This symbol is defined on AsyncGeneratorPrototype. The base value may change
its prototype, but it's still an async generator as far as our system is
concerned. This patch updates the assertion to check for a private property
on the base value.

* builtins/AsyncGeneratorPrototype.js:
(globalPrivate.asyncGeneratorReject):
(globalPrivate.asyncGeneratorResolve):
(globalPrivate.asyncGeneratorResumeNext):

Modified Paths

trunk/JSTests/ChangeLog
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/builtins/AsyncGeneratorPrototype.js


Added Paths

trunk/JSTests/stress/async-generator-assertion.js




Diff

Modified: trunk/JSTests/ChangeLog (226304 => 226305)

--- trunk/JSTests/ChangeLog	2017-12-28 14:17:06 UTC (rev 226304)
+++ trunk/JSTests/ChangeLog	2017-12-28 18:13:15 UTC (rev 226305)
@@ -1,3 +1,13 @@
+2017-12-28  Saam Barati  
+
+Assertion used to determine if something is an async generator is wrong
+https://bugs.webkit.org/show_bug.cgi?id=181168
+
+
+Reviewed by Yusuke Suzuki.
+
+* stress/async-generator-assertion.js: Added.
+
 2017-12-21  Guillaume Emont  
 
 Skip stress/splay-flash-access tests on memory limited platforms


Added: trunk/JSTests/stress/async-generator-assertion.js (0 => 226305)

--- trunk/JSTests/stress/async-generator-assertion.js	(rev 0)
+++ trunk/JSTests/stress/async-generator-assertion.js	2017-12-28 18:13:15 UTC (rev 226305)
@@ -0,0 +1,36 @@
+function assert(b) {
+if (!b)
+throw new Error("Bad");
+}
+
+async function* asyncIterator() {
+yield 42;
+}
+
+function test1() {
+let p = asyncIterator();
+p.next().then((x) => {
+assert(x.value === 42);
+assert(x.done === false);
+});
+p.__proto__ = {};
+assert(p.next === undefined);
+}
+test1();
+
+let error = null;
+async function test2() {
+let p2 = asyncIterator();
+p2.__proto__ = {};
+try {
+for await (let x of p2) {
+throw new Error("Bad!");
+}
+} 
+catch(e) {
+error = e;
+}
+}
+test2();
+assert(error instanceof TypeError);
+assert(error.message === "undefined is not a function (near '...x of p2...')");


Modified: trunk/Source/_javascript_Core/ChangeLog (226304 => 226305)

--- trunk/Source/_javascript_Core/ChangeLog	2017-12-28 14:17:06 UTC (rev 226304)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-12-28 18:13:15 UTC (rev 226305)
@@ -1,3 +1,22 @@
+2017-12-28  Saam Barati  
+
+Assertion used to determine if something is an async generator is wrong
+https://bugs.webkit.org/show_bug.cgi?id=181168
+
+
+Reviewed by Yusuke Suzuki.
+
+Previous assertions were doing a get on the base value for @@asyncIterator.
+This symbol is defined on AsyncGeneratorPrototype. The base value may change
+its prototype, but it's still an async generator as far as our system is
+concerned. This patch updates the assertion to check for a private property
+on the base value.
+
+* builtins/AsyncGeneratorPrototype.js:
+(globalPrivate.asyncGeneratorReject):
+(globalPrivate.asyncGeneratorResolve):
+(globalPrivate.asyncGeneratorResumeNext):
+
 2017-12-27  Carlos Alberto Lopez Perez  
 
 Build fix after r226299 (3)


Modified: trunk/Source/_javascript_Core/builtins/AsyncGeneratorPrototype.js (226304 => 226305)

--- trunk/Source/_javascript_Core/builtins/AsyncGeneratorPrototype.js	2017-12-28 14:17:06 UTC (rev 226304)
+++ trunk/Source/_javascript_Core/builtins/AsyncGeneratorPrototype.js	2017-12-28 18:13:15 UTC (rev 226305)
@@ -103,7 +103,7 @@
 {
 "use strict";
 
-@assert(generator.@asyncIteratorSymbol !== @undefined, "Generator is not an AsyncGenerator instance.");
+@assert(typeof generator.@asyncGeneratorSuspendReason === "number", "Generator is not an AsyncGenerator instance.");
 
 const { promiseCapability } = @asyncGeneratorDequeue(generator);
 promiseCapability.@reject.@call(@undefined, exception);
@@ -116,7 +116,7 @@
 {
 "use strict";
 
-@assert(generator.@asyncIteratorSymbol !== @undefined, "Generator is not an AsyncGenerator instance.");
+@assert(typeof generator.@asyncGeneratorSuspendReason === "number", "Generator is not an AsyncGenerator instance.");
 
 const { promiseCapability } = @asyncGeneratorDequeue(generator);
 promiseCapability.@resolve.@call(@undefined, { done, value: value });
@@ -203,7 +203,7 @@
 {
 "use strict";
 
-@assert(generator.@asyncIteratorSymbol !== @u

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

2017-12-28 Thread utatane . tea
Title: [226304] trunk/Source/WTF








Revision 226304
Author utatane@gmail.com
Date 2017-12-28 06:17:06 -0800 (Thu, 28 Dec 2017)


Log Message
[WTF] Add clock_gettime based monotonicallyIncreasingTime implementation for Linux and BSDs
https://bugs.webkit.org/show_bug.cgi?id=181175

Reviewed by Michael Catanzaro.

Use platform-provided POSIX APIs to get monotonic time.

* wtf/CurrentTime.cpp:
(WTF::monotonicallyIncreasingTime):

Modified Paths

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




Diff

Modified: trunk/Source/WTF/ChangeLog (226303 => 226304)

--- trunk/Source/WTF/ChangeLog	2017-12-27 22:55:43 UTC (rev 226303)
+++ trunk/Source/WTF/ChangeLog	2017-12-28 14:17:06 UTC (rev 226304)
@@ -1,3 +1,15 @@
+2017-12-27  Yusuke Suzuki  
+
+[WTF] Add clock_gettime based monotonicallyIncreasingTime implementation for Linux and BSDs
+https://bugs.webkit.org/show_bug.cgi?id=181175
+
+Reviewed by Michael Catanzaro.
+
+Use platform-provided POSIX APIs to get monotonic time.
+
+* wtf/CurrentTime.cpp:
+(WTF::monotonicallyIncreasingTime):
+
 2017-12-26  Carlos Alberto Lopez Perez  
 
 REGRESSION(r225769): Build error with constexpr std::max // std::min in libdstdc++4


Modified: trunk/Source/WTF/wtf/CurrentTime.cpp (226303 => 226304)

--- trunk/Source/WTF/wtf/CurrentTime.cpp	2017-12-27 22:55:43 UTC (rev 226303)
+++ trunk/Source/WTF/wtf/CurrentTime.cpp	2017-12-28 14:17:06 UTC (rev 226304)
@@ -267,6 +267,15 @@
 return (mach_absolute_time() * timebaseInfo.numer) / (1.0e9 * timebaseInfo.denom);
 }
 
+#elif OS(LINUX) || OS(FREEBSD) || OS(OPENBSD) || OS(NETBSD)
+
+double monotonicallyIncreasingTime()
+{
+struct timespec ts { };
+clock_gettime(CLOCK_MONOTONIC, &ts);
+return static_cast(ts.tv_sec) + ts.tv_nsec / 1.0e9;
+}
+
 #else
 
 double monotonicallyIncreasingTime()






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