Title: [275450] trunk/Source/WebCore
- Revision
- 275450
- Author
- [email protected]
- Date
- 2021-04-02 16:27:29 -0700 (Fri, 02 Apr 2021)
Log Message
PendingImageBitmap gets created on a stopped script execution context.
https://bugs.webkit.org/show_bug.cgi?id=223971
Reviewed by Youenn Fablet.
Don't create a PendingImageBitmap in PendingImageBitmap::fetch
if the associated script execution context had already been stoppped.
The new behavior matches of Chrome although it's technically incorrect.
Correcting it to match the spec & Firefox will refactor a larger fix around
how script execution context is used by the threaded loader.
* html/ImageBitmap.cpp:
(WebCore::PendingImageBitmap::fetch):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (275449 => 275450)
--- trunk/Source/WebCore/ChangeLog 2021-04-02 22:57:56 UTC (rev 275449)
+++ trunk/Source/WebCore/ChangeLog 2021-04-02 23:27:29 UTC (rev 275450)
@@ -1,3 +1,21 @@
+2021-04-02 Ryosuke Niwa <[email protected]>
+
+ PendingImageBitmap gets created on a stopped script execution context.
+ https://bugs.webkit.org/show_bug.cgi?id=223971
+
+ Reviewed by Youenn Fablet.
+
+ Don't create a PendingImageBitmap in PendingImageBitmap::fetch
+ if the associated script execution context had already been stoppped.
+
+ The new behavior matches of Chrome although it's technically incorrect.
+
+ Correcting it to match the spec & Firefox will refactor a larger fix around
+ how script execution context is used by the threaded loader.
+
+ * html/ImageBitmap.cpp:
+ (WebCore::PendingImageBitmap::fetch):
+
2021-04-02 Alexey Shvayka <[email protected]>
Remove [Replaceable] extended attribute from `document.all`
Modified: trunk/Source/WebCore/html/ImageBitmap.cpp (275449 => 275450)
--- trunk/Source/WebCore/html/ImageBitmap.cpp 2021-04-02 22:57:56 UTC (rev 275449)
+++ trunk/Source/WebCore/html/ImageBitmap.cpp 2021-04-02 23:27:29 UTC (rev 275450)
@@ -640,6 +640,8 @@
public:
static void fetch(ScriptExecutionContext& scriptExecutionContext, RefPtr<Blob>&& blob, ImageBitmapOptions&& options, Optional<IntRect> rect, ImageBitmap::Promise&& promise)
{
+ if (scriptExecutionContext.activeDOMObjectsAreStopped())
+ return;
auto pendingImageBitmap = new PendingImageBitmap(scriptExecutionContext, WTFMove(blob), WTFMove(options), WTFMove(rect), WTFMove(promise));
pendingImageBitmap->start(scriptExecutionContext);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes