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

Issue 2544883005: Remove RefPtr<ScriptState> from PromiseRejectionEvent (Closed)

Created:
4 years ago by haraken
Modified:
4 years ago
Reviewers:
Yuki
CC:
chromium-reviews, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove RefPtr<ScriptState> from PromiseRejectionEvent RefPtr<ScriptState> stored in a DOM object has a risk of leaking ScriptStates to another world (see the bug for more details). This CL replaces PromiseRejectionEvent::m_scriptState with PromiseRejectionEvent::m_world. This matches what we're doing for ErrorEvent. BUG=669812 Committed: https://crrev.com/05528ffaebde3c6b3534001096dcbdcc4814a931 Cr-Commit-Position: refs/heads/master@{#435882}

Patch Set 1 #

Total comments: 1

Patch Set 2 : temp #

Total comments: 1

Patch Set 3 : temp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -17 lines) Patch
M third_party/WebKit/Source/core/events/PromiseRejectionEvent.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp View 1 2 3 chunks +10 lines, -16 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
haraken
PTAL
4 years ago (2016-12-02 05:12:25 UTC) #2
Yuki
https://codereview.chromium.org/2544883005/diff/1/third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp File third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp (right): https://codereview.chromium.org/2544883005/diff/1/third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp#newcode50 third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp:50: if (m_reason.isEmpty() || canBeDispatchedInWorld(scriptState->world())) Did you forget ! (negate ...
4 years ago (2016-12-02 05:59:30 UTC) #3
haraken
On 2016/12/02 05:59:30, Yuki wrote: > https://codereview.chromium.org/2544883005/diff/1/third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp > File third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp (right): > > https://codereview.chromium.org/2544883005/diff/1/third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp#newcode50 > ...
4 years ago (2016-12-02 06:02:35 UTC) #4
Yuki
lgtm https://codereview.chromium.org/2544883005/diff/20001/third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp File third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp (right): https://codereview.chromium.org/2544883005/diff/20001/third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp#newcode42 third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp:42: if (canBeDispatchedInWorld(scriptState->world())) You need ! here, too.
4 years ago (2016-12-02 06:15:39 UTC) #5
haraken
On 2016/12/02 06:15:39, Yuki wrote: > lgtm > > https://codereview.chromium.org/2544883005/diff/20001/third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp > File third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp (right): > ...
4 years ago (2016-12-02 06:15:59 UTC) #6
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/2544883005/40001
4 years ago (2016-12-02 06:16:34 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-02 08:19:28 UTC) #10
commit-bot: I haz the power
4 years ago (2016-12-02 08:22:50 UTC) #12
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/05528ffaebde3c6b3534001096dcbdcc4814a931
Cr-Commit-Position: refs/heads/master@{#435882}

Powered by Google App Engine
This is Rietveld 408576698