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

Issue 2017113002: [Extensions] DCHECK that ExtensionFunctions respond (and only once) (Closed)

Created:
4 years, 6 months ago by Devlin
Modified:
4 years, 6 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, jam, felt, yusukes+watch_chromium.org, tzik, tfarina, shuchen+watch_chromium.org, nhiroki, rlp+watch_chromium.org, nona+watch_chromium.org, noyau+watch_chromium.org, oshima+watch_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, kinuko+fileapi, davemoore+watch_chromium.org, lazyboy
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] DCHECK that ExtensionFunctions respond (and only once) If an ExtensionFunction never responds, it means that there's a leak on the renderer side where we never clean up after the request, not to mention the fact that the extension calling the API is left hanging. DCHECK() that every extension function responds. Conversely, if the function responds twice, we send multiple IPCs and have to reserialize all the response values, in addition to the fact that it meant the function likely responded before work was done or with an incomplete response. Most of this involves changes to test or private code, but there are a few places where this affects real APIs. One significant change apart from general cleanup is to add a boolean to the NOTIFICATION_EXTENSION_TEST_MESSAGE details allowing the receiver to indicate whether or not they will respond. If no receiver indicates they will respond, the function returns immediately. BUG=616593 TBR=stevenjb@chromium.org (c/b/chromeos, c/b/ui/webui/chromeos) TBR=atwilson@chromium.org (c/b/policy) TBR=raymes@chromium.org (c/t/ppapi) Committed: https://crrev.com/7d873db838bd65a60ac84a236a4845f18d0dc895 Cr-Commit-Position: refs/heads/master@{#397594}

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -342 lines) Patch
M chrome/browser/apps/app_window_interactive_uitest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/extensions/echo_private_api.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/extensions/input_method_apitest_chromeos.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/extensions/wallpaper_private_api.h View 3 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/extensions/wallpaper_private_api.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc View 14 chunks +23 lines, -59 lines 0 comments Download
M chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc View 2 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h View 4 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/activity_log_private/activity_log_private_api.cc View 3 chunks +11 lines, -9 lines 0 comments Download
M chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc View 2 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/declarative_content/set_icon_apitest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/downloads/downloads_api.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc View 4 chunks +14 lines, -9 lines 0 comments Download
M chrome/browser/extensions/api/identity/identity_apitest.cc View 3 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc View 4 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_apitest.cc View 4 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h View 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.cc View 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_messages_apitest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/lazy_background_page_apitest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc View 6 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui_browsertest-inl.h View 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/browser_action/open_popup/open_popup_fails.js View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/browser_action/open_popup/open_popup_succeeds.js View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/hotword_private/audioHistory/test.js View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/socket/api/background.js View 3 chunks +5 lines, -6 lines 0 comments Download
M chrome/test/ppapi/ppapi_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/api/bluetooth/bluetooth_private_api.h View 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/browser/api/bluetooth/bluetooth_private_api.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/api/guest_view/app_view/app_view_guest_internal_api.h View 3 chunks +6 lines, -4 lines 0 comments Download
M extensions/browser/api/guest_view/app_view/app_view_guest_internal_api.cc View 2 chunks +22 lines, -8 lines 0 comments Download
M extensions/browser/api/guest_view/web_view/web_view_internal_api.h View 20 chunks +40 lines, -68 lines 0 comments Download
M extensions/browser/api/guest_view/web_view/web_view_internal_api.cc View 24 chunks +72 lines, -72 lines 0 comments Download
M extensions/browser/api/socket/tcp_socket.cc View 2 chunks +6 lines, -1 line 0 comments Download
M extensions/browser/api/socket/udp_socket.cc View 2 chunks +6 lines, -1 line 0 comments Download
M extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/browser/api/test/test_api.h View 2 chunks +9 lines, -3 lines 0 comments Download
M extensions/browser/api/test/test_api.cc View 1 chunk +27 lines, -7 lines 0 comments Download
M extensions/browser/api_test_utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/extension_function.h View 4 chunks +33 lines, -0 lines 0 comments Download
M extensions/browser/extension_function.cc View 7 chunks +31 lines, -2 lines 0 comments Download
M extensions/browser/extension_function_dispatcher.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M extensions/test/extension_test_message_listener.cc View 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 25 (18 generated)
Devlin
Another one for you, Antony. Sorry, I know it looks (and kind of is) painful. ...
4 years, 6 months ago (2016-06-01 21:08:07 UTC) #13
asargent_no_longer_on_chrome
lgtm
4 years, 6 months ago (2016-06-02 19:48:05 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2017113002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2017113002/200001
4 years, 6 months ago (2016-06-02 21:33:52 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/240344)
4 years, 6 months ago (2016-06-03 00:53:08 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2017113002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2017113002/200001
4 years, 6 months ago (2016-06-03 00:58:43 UTC) #21
commit-bot: I haz the power
Committed patchset #1 (id:200001)
4 years, 6 months ago (2016-06-03 02:41:42 UTC) #23
commit-bot: I haz the power
4 years, 6 months ago (2016-06-03 02:45:40 UTC) #25
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/7d873db838bd65a60ac84a236a4845f18d0dc895
Cr-Commit-Position: refs/heads/master@{#397594}

Powered by Google App Engine
This is Rietveld 408576698