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

Issue 2191543002: binding: Disallows to run a function if its context is detached. (Closed)

Created:
4 years, 4 months ago by Yuki
Modified:
4 years, 4 months ago
Reviewers:
haraken, yhirano
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

binding: Disallows to run a function if its context is detached. There are two contexts when about to run a ScheduledAction. |this|'s context and the context of the function to be run. If the latter context no longer has a valid V8PerContextData, |self| returns null. function() { self.testRunner; } // self will be null This issue has been there for a long time, but https://crrev.com/2049493005 made it easy to happen. This CL disallows to run a function if the function's context is detached. This is not the right fix, but close to the behavior before https://crrev.com/2049493005 . The right fix is that, per spec, |self| always returns the global proxy object that never be null. I.e. we need to support detached windows. BUG=630996 Committed: https://crrev.com/981ce039703c0350086568b8c922bee8b8ca2761 Cr-Commit-Position: refs/heads/master@{#408376}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -3 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp View 2 chunks +20 lines, -3 lines 2 comments Download

Messages

Total messages: 15 (7 generated)
Yuki
Could you review this CL? I'm afraid of a performance regression, but we need an ...
4 years, 4 months ago (2016-07-27 15:19:44 UTC) #4
haraken
I don't think ScheduledAction is performance-sensitive (it's already doing a lot of things), so this ...
4 years, 4 months ago (2016-07-27 15:28:43 UTC) #5
Yuki
https://codereview.chromium.org/2191543002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp File third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp (right): https://codereview.chromium.org/2191543002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp#newcode108 third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp:108: if (!m_scriptState->contextIsValid()) { On 2016/07/27 15:28:43, haraken wrote: > ...
4 years, 4 months ago (2016-07-28 06:12:35 UTC) #8
haraken
On 2016/07/28 06:12:35, Yuki wrote: > https://codereview.chromium.org/2191543002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp > File third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp (right): > > https://codereview.chromium.org/2191543002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp#newcode108 > ...
4 years, 4 months ago (2016-07-28 09:03:13 UTC) #9
yhirano
lgtm
4 years, 4 months ago (2016-07-28 09:09:31 UTC) #10
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/2191543002/1
4 years, 4 months ago (2016-07-28 12:11:34 UTC) #12
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-07-28 12:14:53 UTC) #13
commit-bot: I haz the power
4 years, 4 months ago (2016-07-28 12:18:00 UTC) #15
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/981ce039703c0350086568b8c922bee8b8ca2761
Cr-Commit-Position: refs/heads/master@{#408376}

Powered by Google App Engine
This is Rietveld 408576698