Title: [251482] trunk
- Revision
- 251482
- Author
- [email protected]
- Date
- 2019-10-23 11:29:29 -0700 (Wed, 23 Oct 2019)
Log Message
[ Mac WK1 ] REGRESSION (r251261): Layout Test inspector/console/webcore-logging.html is consistently Failing
https://bugs.webkit.org/show_bug.cgi?id=203173
<rdar://problem/56424721>
Source/_javascript_Core:
Hold a strong reference to JSGlobalOjbect in ConsoleMessage so that object is not garbage collected before
WebConsoleAgent::frameWindowDiscarded.
Covered by existing test: inspector/console/webcore-logging.html.
Reviewed by Geoffrey Garen.
* inspector/ConsoleMessage.cpp:
(Inspector::ConsoleMessage::ConsoleMessage):
(Inspector::ConsoleMessage::clear):
* inspector/ConsoleMessage.h:
LayoutTests:
Reviewed by Geoffrey Garen.
play() returns a promise and the promise can be rejected by a later pause(). We didn't handle
that case so we could receive a type _javascript_ message for the unhandled rejected promise.
* inspector/console/webcore-logging.html:
* platform/mac-wk1/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (251481 => 251482)
--- trunk/LayoutTests/ChangeLog 2019-10-23 18:23:28 UTC (rev 251481)
+++ trunk/LayoutTests/ChangeLog 2019-10-23 18:29:29 UTC (rev 251482)
@@ -1,3 +1,17 @@
+2019-10-23 Sihui Liu <[email protected]>
+
+ [ Mac WK1 ] REGRESSION (r251261): Layout Test inspector/console/webcore-logging.html is consistently Failing
+ https://bugs.webkit.org/show_bug.cgi?id=203173
+ <rdar://problem/56424721>
+
+ Reviewed by Geoffrey Garen.
+
+ play() returns a promise and the promise can be rejected by a later pause(). We didn't handle
+ that case so we could receive a type _javascript_ message for the unhandled rejected promise.
+
+ * inspector/console/webcore-logging.html:
+ * platform/mac-wk1/TestExpectations:
+
2019-10-22 Simon Fraser <[email protected]>
wpt/css/css-images/gradient/color-stops-parsing.html fails
Modified: trunk/LayoutTests/inspector/console/webcore-logging.html (251481 => 251482)
--- trunk/LayoutTests/inspector/console/webcore-logging.html 2019-10-23 18:23:28 UTC (rev 251481)
+++ trunk/LayoutTests/inspector/console/webcore-logging.html 2019-10-23 18:29:29 UTC (rev 251482)
@@ -17,7 +17,7 @@
function play()
{
video.currentTime = 0;
- video.play();
+ video.play().catch((err) => { });
TestPage.dispatchEventToFrontend('PlayEvent', {count: 1});
}
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (251481 => 251482)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2019-10-23 18:23:28 UTC (rev 251481)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2019-10-23 18:29:29 UTC (rev 251482)
@@ -801,7 +801,5 @@
# Skip IsLoggedIn
http/tests/is-logged-in/ [ Skip ]
-webkit.org/b/203173 inspector/console/webcore-logging.html [ Pass Failure ]
-
webkit.org/b/203176 [ Debug ] fast/scrolling/latching/scroll-select-bottom-test.html [ Pass Failure ]
Modified: trunk/Source/_javascript_Core/ChangeLog (251481 => 251482)
--- trunk/Source/_javascript_Core/ChangeLog 2019-10-23 18:23:28 UTC (rev 251481)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-10-23 18:29:29 UTC (rev 251482)
@@ -1,3 +1,21 @@
+2019-10-23 Sihui Liu <[email protected]>
+
+ [ Mac WK1 ] REGRESSION (r251261): Layout Test inspector/console/webcore-logging.html is consistently Failing
+ https://bugs.webkit.org/show_bug.cgi?id=203173
+ <rdar://problem/56424721>
+
+ Hold a strong reference to JSGlobalOjbect in ConsoleMessage so that object is not garbage collected before
+ WebConsoleAgent::frameWindowDiscarded.
+
+ Covered by existing test: inspector/console/webcore-logging.html.
+
+ Reviewed by Geoffrey Garen.
+
+ * inspector/ConsoleMessage.cpp:
+ (Inspector::ConsoleMessage::ConsoleMessage):
+ (Inspector::ConsoleMessage::clear):
+ * inspector/ConsoleMessage.h:
+
2019-10-22 Yusuke Suzuki <[email protected]>
Make `JSGlobalObject*` threading change more stabilized by adding tests and assertions
Modified: trunk/Source/_javascript_Core/inspector/ConsoleMessage.cpp (251481 => 251482)
--- trunk/Source/_javascript_Core/inspector/ConsoleMessage.cpp 2019-10-23 18:23:28 UTC (rev 251481)
+++ trunk/Source/_javascript_Core/inspector/ConsoleMessage.cpp 2019-10-23 18:29:29 UTC (rev 251482)
@@ -117,9 +117,11 @@
, m_type(type)
, m_level(level)
, m_url()
- , m_globalObject(globalObject)
, m_requestId(IdentifiersFactory::requestId(requestIdentifier))
{
+ if (globalObject)
+ m_globalObject = { globalObject->vm(), globalObject };
+
if (!messages.size())
return;
@@ -340,6 +342,9 @@
if (m_arguments)
m_arguments = nullptr;
+
+ if (m_globalObject)
+ m_globalObject.clear();
}
JSC::JSGlobalObject* ConsoleMessage::globalObject() const
@@ -348,7 +353,7 @@
return m_arguments->globalObject();
if (m_globalObject)
- return m_globalObject;
+ return m_globalObject.get();
return nullptr;
}
Modified: trunk/Source/_javascript_Core/inspector/ConsoleMessage.h (251481 => 251482)
--- trunk/Source/_javascript_Core/inspector/ConsoleMessage.h 2019-10-23 18:23:28 UTC (rev 251481)
+++ trunk/Source/_javascript_Core/inspector/ConsoleMessage.h 2019-10-23 18:29:29 UTC (rev 251482)
@@ -31,6 +31,7 @@
#pragma once
#include "ConsoleTypes.h"
+#include "Strong.h"
#include <wtf/FastMalloc.h>
#include <wtf/Forward.h>
#include <wtf/Logger.h>
@@ -94,7 +95,7 @@
RefPtr<ScriptCallStack> m_callStack;
Vector<JSONLogValue> m_jsonLogValues;
String m_url;
- JSC::JSGlobalObject* m_globalObject { nullptr };
+ JSC::Strong<JSC::JSGlobalObject> m_globalObject;
unsigned m_line { 0 };
unsigned m_column { 0 };
unsigned m_repeatCount { 1 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes