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

Issue 2722463006: [Extensions Bindings] Notify of event unregistration on invalidation (Closed)

Created:
3 years, 9 months ago by Devlin
Modified:
3 years, 9 months ago
Reviewers:
lazyboy, jbroman
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions Bindings] Notify of event unregistration on invalidation When contexts are invalidated, we consider the events in that context unregistered and notify the browser accordingly. Hook up an InvalidateContext() method on APIEventHandler and call it through blink's WillReleaseScriptContext(). Add associated tests. BUG=653596 Review-Url: https://codereview.chromium.org/2722463006 Cr-Commit-Position: refs/heads/master@{#454911} Committed: https://chromium.googlesource.com/chromium/src/+/317a9b943cc6e28bb3f7d0cda4ae9382d84f9288

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 13

Patch Set 4 : jbroman's + invalidate contexts #

Patch Set 5 : nits #

Total comments: 2

Patch Set 6 : lazyboy's #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -16 lines) Patch
M extensions/renderer/api_bindings_system.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/renderer/api_bindings_system.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/renderer/api_bindings_system_unittest.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/renderer/api_event_handler.h View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M extensions/renderer/api_event_handler.cc View 1 2 3 4 5 6 2 chunks +37 lines, -12 lines 0 comments Download
M extensions/renderer/api_event_handler_unittest.cc View 1 2 3 4 5 6 12 chunks +42 lines, -0 lines 0 comments Download
M extensions/renderer/event_emitter.h View 2 chunks +9 lines, -1 line 0 comments Download
M extensions/renderer/event_emitter.cc View 1 2 3 4 3 chunks +19 lines, -0 lines 0 comments Download
M extensions/renderer/native_extension_bindings_system.cc View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M extensions/renderer/native_extension_bindings_system_unittest.cc View 1 2 3 4 5 6 3 chunks +20 lines, -2 lines 0 comments Download

Messages

Total messages: 27 (18 generated)
Devlin
https://codereview.chromium.org/2722463006/diff/40001/extensions/renderer/api_event_handler.cc File extensions/renderer/api_event_handler.cc (right): https://codereview.chromium.org/2722463006/diff/40001/extensions/renderer/api_event_handler.cc#newcode30 extensions/renderer/api_event_handler.cc:30: ~APIEventPerContextData() override { If we wanted, we could maybe ...
3 years, 9 months ago (2017-03-01 15:14:41 UTC) #11
jbroman
https://codereview.chromium.org/2722463006/diff/40001/extensions/renderer/api_event_handler.cc File extensions/renderer/api_event_handler.cc (right): https://codereview.chromium.org/2722463006/diff/40001/extensions/renderer/api_event_handler.cc#newcode30 extensions/renderer/api_event_handler.cc:30: ~APIEventPerContextData() override { On 2017/03/01 at 15:14:41, Devlin wrote: ...
3 years, 9 months ago (2017-03-01 17:49:47 UTC) #12
Devlin
In a followup, I think I'm gonna rework contexts a bit in the test infrastructure ...
3 years, 9 months ago (2017-03-01 19:03:51 UTC) #13
jbroman
lgtm https://codereview.chromium.org/2722463006/diff/40001/extensions/renderer/event_emitter.cc File extensions/renderer/event_emitter.cc (right): https://codereview.chromium.org/2722463006/diff/40001/extensions/renderer/event_emitter.cc#newcode61 extensions/renderer/event_emitter.cc:61: if (!valid_) On 2017/03/01 at 19:03:50, Devlin wrote: ...
3 years, 9 months ago (2017-03-01 19:26:35 UTC) #14
Devlin
https://codereview.chromium.org/2722463006/diff/40001/extensions/renderer/event_emitter.cc File extensions/renderer/event_emitter.cc (right): https://codereview.chromium.org/2722463006/diff/40001/extensions/renderer/event_emitter.cc#newcode61 extensions/renderer/event_emitter.cc:61: if (!valid_) On 2017/03/01 19:26:34, jbroman wrote: > On ...
3 years, 9 months ago (2017-03-02 17:26:32 UTC) #15
lazyboy
lgtm https://codereview.chromium.org/2722463006/diff/80001/extensions/renderer/api_event_handler.cc File extensions/renderer/api_event_handler.cc (right): https://codereview.chromium.org/2722463006/diff/80001/extensions/renderer/api_event_handler.cc#newcode141 extensions/renderer/api_event_handler.cc:141: data->event_data.clear(); FYI: If there's a chance that |data->event_data| ...
3 years, 9 months ago (2017-03-03 22:14:20 UTC) #16
Devlin
https://codereview.chromium.org/2722463006/diff/80001/extensions/renderer/api_event_handler.cc File extensions/renderer/api_event_handler.cc (right): https://codereview.chromium.org/2722463006/diff/80001/extensions/renderer/api_event_handler.cc#newcode141 extensions/renderer/api_event_handler.cc:141: data->event_data.clear(); On 2017/03/03 22:14:19, lazyboy wrote: > FYI: If ...
3 years, 9 months ago (2017-03-06 19:11:06 UTC) #21
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/2722463006/120001
3 years, 9 months ago (2017-03-06 19:11:56 UTC) #24
commit-bot: I haz the power
3 years, 9 months ago (2017-03-06 19:18:42 UTC) #27
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/317a9b943cc6e28bb3f7d0cda4ae...

Powered by Google App Engine
This is Rietveld 408576698