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

Issue 2413583002: [inspector] added check that context always survives inspected context (Closed)

Created:
4 years, 2 months ago by kozy
Modified:
4 years, 2 months ago
Reviewers:
dgozman
CC:
devtools-reviews_chromium.org, v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[inspector] added check that context always survives inspected context Inspected context is created in V8InspectorImpl::contextCreated method and destroyed in V8InspectorImpl::contextDestroyed. Both methods takes valid v8::Local<v8::Context> handle to the same context, it means that context is created before InspectedContext constructor and is always destroyed after InspectedContext destructor therefore context weak callback in inspected context should be never called. It's possible only if inspector client doesn't call contextDestroyed which is considered an error. Therefore CHECK(false) is added into context weak callback to be sure that v8::Context always survives inspected context. BUG=chromium:652548 R=dgozman@chromium.org Committed: https://crrev.com/2082afcf3c8afe5002689ff3208d546f5775fb9a Cr-Commit-Position: refs/heads/master@{#40290}

Patch Set 1 #

Patch Set 2 : added check #

Patch Set 3 : added check(false) #

Patch Set 4 : a #

Patch Set 5 : improve comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -21 lines) Patch
M src/inspector/inspected-context.h View 2 1 chunk +0 lines, -3 lines 0 comments Download
M src/inspector/inspected-context.cc View 1 2 3 4 3 chunks +17 lines, -18 lines 0 comments Download

Messages

Total messages: 29 (20 generated)
kozy
Dmitry, please take a look!
4 years, 2 months ago (2016-10-12 00:32:39 UTC) #1
dgozman
Let's instead do two separate callbacks, and perform a lookup by id in both.
4 years, 2 months ago (2016-10-12 19:13:52 UTC) #5
kozy
On 2016/10/12 19:13:52, dgozman wrote: > Let's instead do two separate callbacks, and perform a ...
4 years, 2 months ago (2016-10-13 17:38:58 UTC) #6
kozy
As was discussed offline, I removed second pass callback and added additional check into V8InspectorImpl::getContext. ...
4 years, 2 months ago (2016-10-13 20:01:57 UTC) #7
kozy
Dmitry, please take another look!
4 years, 2 months ago (2016-10-13 23:48:52 UTC) #14
dgozman
Let's try this and collect all crashes :-) lgtm
4 years, 2 months ago (2016-10-13 23:53:55 UTC) #20
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/2413583002/80001
4 years, 2 months ago (2016-10-14 01:30:28 UTC) #25
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 2 months ago (2016-10-14 01:59:43 UTC) #27
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 02:00:14 UTC) #29
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/2082afcf3c8afe5002689ff3208d546f5775fb9a
Cr-Commit-Position: refs/heads/master@{#40290}

Powered by Google App Engine
This is Rietveld 408576698