|
|
[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}
|
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
|
Total messages: 25 (18 generated)
|