Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Issue 2785303002: Post task when rejecting Animation promises inside ScriptForbiddenScope (Closed)

Created:
3 years, 8 months ago by adithyas
Modified:
3 years, 7 months ago
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, chromium-reviews, Eric Willigers, rjwright, shans
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Post task when rejecting Animation promises inside ScriptForbiddenScope It is possible for the ready promise to be rejected in a ScriptForbiddenScope. Rejecting a promise with a DOMException results in the constructor for DOMException being executed (due to a ToV8 call), which triggers a RELEASE_ASSERT that detects if script is being executed in a forbidden scope. This patch posts a task to reject promises when inside a forbidden scope to prevent the crash. BUG=701631 Review-Url: https://codereview.chromium.org/2785303002 Cr-Commit-Position: refs/heads/master@{#470391} Committed: https://chromium.googlesource.com/chromium/src/+/13c178302b8a4ce77dc493127b1a9eff97c4e7c2

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 4

Patch Set 3 : Post task to reject and reset promise #

Patch Set 4 : Add layout test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -5 lines) Patch
A third_party/WebKit/LayoutTests/web-animations-api/animation-ready-reject-script-forbidden.html View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/animation/Animation.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/animation/Animation.cpp View 1 2 3 chunks +24 lines, -5 lines 0 comments Download

Messages

Total messages: 19 (10 generated)
adithyas
3 years, 8 months ago (2017-04-26 18:19:00 UTC) #6
haraken
https://codereview.chromium.org/2785303002/diff/20001/third_party/WebKit/Source/core/animation/Animation.cpp File third_party/WebKit/Source/core/animation/Animation.cpp (right): https://codereview.chromium.org/2785303002/diff/20001/third_party/WebKit/Source/core/animation/Animation.cpp#newcode1153 third_party/WebKit/Source/core/animation/Animation.cpp:1153: // Animation promises can be rejected inside a ScriptForbiddenScope. ...
3 years, 8 months ago (2017-04-27 00:17:14 UTC) #7
adithyas
https://codereview.chromium.org/2785303002/diff/20001/third_party/WebKit/Source/core/animation/Animation.cpp File third_party/WebKit/Source/core/animation/Animation.cpp (right): https://codereview.chromium.org/2785303002/diff/20001/third_party/WebKit/Source/core/animation/Animation.cpp#newcode1153 third_party/WebKit/Source/core/animation/Animation.cpp:1153: // Animation promises can be rejected inside a ScriptForbiddenScope. ...
3 years, 7 months ago (2017-04-27 19:09:52 UTC) #8
haraken
On 2017/04/27 19:09:52, adithyas wrote: > https://codereview.chromium.org/2785303002/diff/20001/third_party/WebKit/Source/core/animation/Animation.cpp > File third_party/WebKit/Source/core/animation/Animation.cpp (right): > > https://codereview.chromium.org/2785303002/diff/20001/third_party/WebKit/Source/core/animation/Animation.cpp#newcode1153 > ...
3 years, 7 months ago (2017-04-28 01:57:14 UTC) #9
alancutter (OOO until 2018)
The description says this fixes a crash, can we add a test case?
3 years, 7 months ago (2017-05-08 07:26:13 UTC) #10
adithyas
On 2017/05/08 at 07:26:13, alancutter wrote: > The description says this fixes a crash, can ...
3 years, 7 months ago (2017-05-08 15:04:31 UTC) #12
alancutter (OOO until 2018)
lgtm
3 years, 7 months ago (2017-05-08 23:49:14 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2785303002/60001
3 years, 7 months ago (2017-05-09 14:25:41 UTC) #16
commit-bot: I haz the power
3 years, 7 months ago (2017-05-09 18:48:19 UTC) #19
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/13c178302b8a4ce77dc493127b1a...

Powered by Google App Engine
This is Rietveld 408576698