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

Issue 2360073002: [Extensions] Isolate ExtensionFunction results_ and error_ (Closed)

Created:
4 years, 3 months ago by Devlin
Modified:
4 years, 2 months ago
Reviewers:
lazyboy
CC:
chromium-reviews, extensions-reviews_chromium.org, yamaguchi+watch_chromium.org, oka+watch_chromium.org, oshima+watch_chromium.org, fukino+watch_chromium.org, chromium-apps-reviews_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Isolate ExtensionFunction results_ and error_ ExtensionFunction results and errors should be set exclusively through the responses of the function implementations in order to reduce the likelihood of malformed or inconsistent responses. Move results_ and error_ to be private members of ExtensionFunction. For backwards compatibility, surface new members on legacy function implementations (AsyncExtensionFunction, Chrome*ExtensionFunction) that are then used in the responses of the functions. As we continue to migrate away from these legacy implementations, we can continue to lock down the response values. BUG=648275 Committed: https://crrev.com/756d84a652255bad6feee508c1f9f6b8b9e1c4c5 Cr-Commit-Position: refs/heads/master@{#422270}

Patch Set 1 : errorwithargs #

Total comments: 10

Patch Set 2 : lazyboy's #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -158 lines) Patch
M chrome/browser/chromeos/extensions/file_system_provider/provider_function.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/autofill_private/autofill_private_api.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/browsing_data/browsing_data_api.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/inline_install_private/inline_install_private_api.cc View 1 chunk +4 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/input_ime/input_ime_api.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc View 1 5 chunks +26 lines, -9 lines 0 comments Download
M chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/management/chrome_management_api_delegate.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/management/chrome_management_api_delegate.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/preference/preference_api.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/chrome_extension_function.h View 1 1 chunk +19 lines, -4 lines 0 comments Download
M chrome/browser/extensions/chrome_extension_function.cc View 3 chunks +39 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/permissions/file_access_no/background.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/permissions/host_subsets/background.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/api/execute_code_function.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/api/guest_view/web_view/web_view_internal_api.h View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/api/guest_view/web_view/web_view_internal_api.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M extensions/browser/api/hid/hid_api.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M extensions/browser/api/management/management_api.cc View 1 chunk +4 lines, -1 line 0 comments Download
M extensions/browser/api/management/management_api_delegate.h View 1 chunk +2 lines, -1 line 0 comments Download
M extensions/browser/api/web_request/web_request_api.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M extensions/browser/extension_function.h View 1 12 chunks +63 lines, -39 lines 0 comments Download
M extensions/browser/extension_function.cc View 12 chunks +63 lines, -53 lines 0 comments Download
M extensions/browser/quota_service_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 48 (40 generated)
Devlin
4 years, 2 months ago (2016-09-29 22:20:22 UTC) #34
lazyboy
https://codereview.chromium.org/2360073002/diff/140001/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc File chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc (right): https://codereview.chromium.org/2360073002/diff/140001/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc#newcode375 chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc:375: SetError(error); if (!success) SetError(), unless I'm missing something. https://codereview.chromium.org/2360073002/diff/140001/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc#newcode495 ...
4 years, 2 months ago (2016-09-30 01:16:05 UTC) #35
Devlin
https://codereview.chromium.org/2360073002/diff/140001/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc File chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc (right): https://codereview.chromium.org/2360073002/diff/140001/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc#newcode375 chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc:375: SetError(error); On 2016/09/30 01:16:04, lazyboy wrote: > if (!success) ...
4 years, 2 months ago (2016-09-30 18:29:09 UTC) #40
lazyboy
lgtm. https://codereview.chromium.org/2360073002/diff/140001/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc File chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc (right): https://codereview.chromium.org/2360073002/diff/140001/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc#newcode375 chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc:375: SetError(error); On 2016/09/30 18:29:09, Devlin (catching up) wrote: ...
4 years, 2 months ago (2016-09-30 20:43:32 UTC) #41
Devlin
https://codereview.chromium.org/2360073002/diff/140001/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc File chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc (right): https://codereview.chromium.org/2360073002/diff/140001/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc#newcode375 chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc:375: SetError(error); On 2016/09/30 20:43:32, lazyboy wrote: > On 2016/09/30 ...
4 years, 2 months ago (2016-10-01 01:03:40 UTC) #43
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/2360073002/160001
4 years, 2 months ago (2016-10-01 01:03:51 UTC) #44
commit-bot: I haz the power
Committed patchset #2 (id:160001)
4 years, 2 months ago (2016-10-01 01:59:02 UTC) #46
commit-bot: I haz the power
4 years, 2 months ago (2016-10-01 02:01:29 UTC) #48
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/756d84a652255bad6feee508c1f9f6b8b9e1c4c5
Cr-Commit-Position: refs/heads/master@{#422270}

Powered by Google App Engine
This is Rietveld 408576698