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

Issue 2762623003: [Extensions Bindings] Add lastError utilities to APIBindingJSUtil (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/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions Bindings] Add lastError utilities to APIBindingJSUtil Some custom bindings require the ability to query or mutate the lastError state. Provide native bindings to perform the following functions: - setLastError - clearLastError - hasLastError - runCallbackWithLastError (sets the last error, runs the provided callback, and then clears the last error). Add tests for the same. Note that in the JS bindings, the analogous methods also accept a context "chrome" object. This is bad, since its only use is allowing cross-context modification. We should see if we can eliminate it. BUG=653596 Review-Url: https://codereview.chromium.org/2762623003 Cr-Commit-Position: refs/heads/master@{#459334} Committed: https://chromium.googlesource.com/chromium/src/+/2615ab3076703e2d4e409370ba32c46ab0aa170c

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 10

Patch Set 4 : jbroman's #

Total comments: 2

Patch Set 5 : s/empty/undefined #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+258 lines, -16 lines) Patch
M extensions/renderer/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M extensions/renderer/api_binding_js_util.h View 1 2 3 4 4 chunks +20 lines, -1 line 0 comments Download
M extensions/renderer/api_binding_js_util.cc View 1 2 3 4 3 chunks +60 lines, -3 lines 0 comments Download
A extensions/renderer/api_binding_js_util_unittest.cc View 1 2 3 4 1 chunk +133 lines, -0 lines 0 comments Download
M extensions/renderer/api_bindings_system_unittest.h View 1 2 3 4 1 chunk +5 lines, -4 lines 0 comments Download
M extensions/renderer/api_bindings_system_unittest.cc View 1 2 3 4 2 chunks +7 lines, -3 lines 0 comments Download
M extensions/renderer/api_last_error.h View 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/renderer/api_last_error.cc View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
M extensions/renderer/api_request_handler.h View 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/renderer/native_extension_bindings_system.cc View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 20 (11 generated)
Devlin
Last one for now, promise! :) The testing for this one was the motivation for ...
3 years, 9 months ago (2017-03-20 17:54:09 UTC) #4
jbroman
https://codereview.chromium.org/2762623003/diff/40001/extensions/renderer/api_binding_js_util.cc File extensions/renderer/api_binding_js_util.cc (right): https://codereview.chromium.org/2762623003/diff/40001/extensions/renderer/api_binding_js_util.cc#newcode161 extensions/renderer/api_binding_js_util.cc:161: std::vector<v8::Local<v8::Value>> callback_args) { const vector&: gin doesn't move the ...
3 years, 9 months ago (2017-03-20 20:14:50 UTC) #5
Devlin
https://codereview.chromium.org/2762623003/diff/40001/extensions/renderer/api_binding_js_util.cc File extensions/renderer/api_binding_js_util.cc (right): https://codereview.chromium.org/2762623003/diff/40001/extensions/renderer/api_binding_js_util.cc#newcode161 extensions/renderer/api_binding_js_util.cc:161: std::vector<v8::Local<v8::Value>> callback_args) { On 2017/03/20 20:14:49, jbroman wrote: > ...
3 years, 9 months ago (2017-03-20 23:10:40 UTC) #6
jbroman
https://codereview.chromium.org/2762623003/diff/40001/extensions/renderer/api_binding_js_util_unittest.cc File extensions/renderer/api_binding_js_util_unittest.cc (right): https://codereview.chromium.org/2762623003/diff/40001/extensions/renderer/api_binding_js_util_unittest.cc#newcode49 extensions/renderer/api_binding_js_util_unittest.cc:49: return "[empty]"; On 2017/03/20 at 23:10:40, Devlin wrote: > ...
3 years, 9 months ago (2017-03-21 22:02:47 UTC) #7
Devlin
https://codereview.chromium.org/2762623003/diff/40001/extensions/renderer/api_binding_js_util_unittest.cc File extensions/renderer/api_binding_js_util_unittest.cc (right): https://codereview.chromium.org/2762623003/diff/40001/extensions/renderer/api_binding_js_util_unittest.cc#newcode49 extensions/renderer/api_binding_js_util_unittest.cc:49: return "[empty]"; On 2017/03/21 22:02:46, jbroman wrote: > Getting ...
3 years, 9 months ago (2017-03-21 22:51:20 UTC) #8
jbroman
lgtm
3 years, 9 months ago (2017-03-22 18:15:46 UTC) #9
lazyboy
lgtm
3 years, 9 months ago (2017-03-24 01:19:52 UTC) #14
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/2762623003/100001
3 years, 9 months ago (2017-03-24 01:33:31 UTC) #17
commit-bot: I haz the power
3 years, 9 months ago (2017-03-24 01:42:32 UTC) #20
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/2615ab3076703e2d4e409370ba32...

Powered by Google App Engine
This is Rietveld 408576698