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

Issue 2770403002: [Extensions Bindings] Remove ScriptContext::DispatchEvent (Closed)

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

Description

[Extensions Bindings] Remove ScriptContext::DispatchEvent Remove ScriptContext::DispatchEvent. In JS bindings, this would just call Event.dispatchEvent with passed in v8 arguments; however, this won't work in the native bindings system (where we don't want to support this type of direct call into JS). Remove the method on ScriptContext, and update callers to instead use ExtensionBindingsSystem::DispatchEventInContext() (which for JS bindings, behaves the same way, but does the right thing for native bindings). In a few cases, this is a little unfortunate, since it results in extra conversion to base::Values before converting to v8 arguments in the event; however, this is relatively little work, done in very few places, and results in a much simpler design. BUG=653596 Review-Url: https://codereview.chromium.org/2770403002 Cr-Commit-Position: refs/heads/master@{#460389} Committed: https://chromium.googlesource.com/chromium/src/+/9312812efaf6c85af28e79ce156af00e754d4b0e

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -143 lines) Patch
M chrome/renderer/extensions/automation_internal_custom_bindings.h View 3 chunks +5 lines, -1 line 0 comments Download
M chrome/renderer/extensions/automation_internal_custom_bindings.cc View 8 chunks +49 lines, -54 lines 0 comments Download
M chrome/renderer/extensions/cast_streaming_native_handler.h View 2 chunks +5 lines, -1 line 0 comments Download
M chrome/renderer/extensions/cast_streaming_native_handler.cc View 3 chunks +18 lines, -23 lines 0 comments Download
M chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h View 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M extensions/renderer/dispatcher.h View 3 chunks +2 lines, -3 lines 0 comments Download
M extensions/renderer/dispatcher.cc View 7 chunks +22 lines, -18 lines 0 comments Download
M extensions/renderer/dispatcher_delegate.h View 2 chunks +2 lines, -0 lines 0 comments Download
M extensions/renderer/display_source_custom_bindings.h View 2 chunks +6 lines, -1 line 0 comments Download
M extensions/renderer/display_source_custom_bindings.cc View 3 chunks +14 lines, -20 lines 0 comments Download
M extensions/renderer/js_extension_bindings_system.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/renderer/script_context.h View 1 chunk +0 lines, -2 lines 0 comments Download
M extensions/renderer/script_context.cc View 1 chunk +0 lines, -12 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
Devlin
Another one for you, lazyboy@. jbroman@, FYI.
3 years, 8 months ago (2017-03-27 21:38:57 UTC) #7
lazyboy
lgtm
3 years, 8 months ago (2017-03-28 17:55:35 UTC) #8
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/2770403002/1
3 years, 8 months ago (2017-03-28 22:40:19 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_TIMED_OUT, build hasn't started yet, builder ...
3 years, 8 months ago (2017-03-29 00:41:38 UTC) #12
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/2770403002/1
3 years, 8 months ago (2017-03-29 00:49:18 UTC) #14
commit-bot: I haz the power
Exceeded global retry quota
3 years, 8 months ago (2017-03-29 02:51:26 UTC) #16
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/2770403002/1
3 years, 8 months ago (2017-03-29 14:58:55 UTC) #18
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 15:12:22 UTC) #21
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/9312812efaf6c85af28e79ce156a...

Powered by Google App Engine
This is Rietveld 408576698