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

Issue 2657613005: [Extensions Bindings] Add chrome.runtime.lastError support (Closed)

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

Description

[Extensions Bindings] Add chrome.runtime.lastError support If an API function returns an error, we surface it through chrome.runtime.lastError. Add support for this with native bindings. Note: we also currently set the last error on the (deprecated) chrome.extension.lastError. This CL does not address that. BUG=653596 Review-Url: https://codereview.chromium.org/2657613005 Cr-Commit-Position: refs/heads/master@{#450256} Committed: https://chromium.googlesource.com/chromium/src/+/931df34fb40d8130d986b1fc6df37a7f478cf9f9

Patch Set 1 : . #

Total comments: 10

Patch Set 2 : Remove MessageListener #

Total comments: 2

Patch Set 3 : Catch errors #

Patch Set 4 : ASSERTify #

Patch Set 5 : rebase #

Total comments: 16

Patch Set 6 : jbroman@'s, lazyboy@'s #

Patch Set 7 : . #

Patch Set 8 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+556 lines, -75 lines) Patch
M chrome/test/data/extensions/api_test/native_bindings/extension/background.js View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M extensions/renderer/BUILD.gn View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M extensions/renderer/api_binding_test_util.h View 1 chunk +6 lines, -0 lines 0 comments Download
M extensions/renderer/api_binding_test_util.cc View 2 chunks +17 lines, -12 lines 0 comments Download
M extensions/renderer/api_binding_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M extensions/renderer/api_bindings_system.h View 1 2 3 4 5 3 chunks +7 lines, -3 lines 0 comments Download
M extensions/renderer/api_bindings_system.cc View 1 2 3 4 5 2 chunks +6 lines, -4 lines 0 comments Download
M extensions/renderer/api_bindings_system_unittest.cc View 1 2 3 4 5 4 chunks +6 lines, -4 lines 0 comments Download
A extensions/renderer/api_last_error.h View 1 2 3 4 5 1 chunk +44 lines, -0 lines 0 comments Download
A extensions/renderer/api_last_error.cc View 1 2 3 4 5 1 chunk +149 lines, -0 lines 0 comments Download
A extensions/renderer/api_last_error_unittest.cc View 1 2 3 4 5 1 chunk +167 lines, -0 lines 0 comments Download
M extensions/renderer/api_request_handler.h View 1 2 3 4 4 chunks +7 lines, -2 lines 0 comments Download
M extensions/renderer/api_request_handler.cc View 1 2 3 4 4 chunks +12 lines, -3 lines 0 comments Download
M extensions/renderer/api_request_handler_unittest.cc View 1 2 3 4 12 chunks +24 lines, -13 lines 0 comments Download
M extensions/renderer/native_extension_bindings_system.h View 1 2 3 4 1 chunk +9 lines, -2 lines 0 comments Download
M extensions/renderer/native_extension_bindings_system.cc View 1 2 3 4 5 4 chunks +48 lines, -31 lines 0 comments Download
M extensions/renderer/native_extension_bindings_system_unittest.cc View 1 2 3 4 5 1 chunk +43 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (27 generated)
Devlin
Take a look when you have a chance. jbroman@, see questions in unittest.cc :) https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error_unittest.cc ...
3 years, 10 months ago (2017-01-27 21:41:48 UTC) #12
jbroman
https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error_unittest.cc File extensions/renderer/api_last_error_unittest.cc (right): https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error_unittest.cc#newcode103 extensions/renderer/api_last_error_unittest.cc:103: EXPECT_TRUE(did_throw); On 2017/01/27 at 21:41:48, Devlin wrote: > Strangely, ...
3 years, 10 months ago (2017-01-30 22:49:52 UTC) #13
jbroman
Will have a closer look, but high level: it's unfortunate that this is a property ...
3 years, 10 months ago (2017-01-30 23:08:34 UTC) #14
Devlin
(Just responding to the high-level comment; will address others soon) On 2017/01/30 23:08:34, jbroman wrote: ...
3 years, 10 months ago (2017-01-31 16:20:39 UTC) #15
Devlin
https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error.cc File extensions/renderer/api_last_error.cc (right): https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error.cc#newcode120 extensions/renderer/api_last_error.cc:120: parent->Delete(context, key); On 2017/01/30 23:08:34, jbroman wrote: > Warning: ...
3 years, 10 months ago (2017-01-31 17:15:00 UTC) #16
jbroman
https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error.cc File extensions/renderer/api_last_error.cc (right): https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error.cc#newcode120 extensions/renderer/api_last_error.cc:120: parent->Delete(context, key); On 2017/01/31 at 17:15:00, Devlin wrote: > ...
3 years, 10 months ago (2017-02-06 18:31:27 UTC) #17
Devlin
https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error.cc File extensions/renderer/api_last_error.cc (right): https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error.cc#newcode120 extensions/renderer/api_last_error.cc:120: parent->Delete(context, key); On 2017/02/06 18:31:26, jbroman wrote: > On ...
3 years, 10 months ago (2017-02-06 20:28:22 UTC) #18
jbroman
https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error_unittest.cc File extensions/renderer/api_last_error_unittest.cc (right): https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error_unittest.cc#newcode103 extensions/renderer/api_last_error_unittest.cc:103: EXPECT_TRUE(did_throw); On 2017/02/06 at 20:28:22, Devlin wrote: > On ...
3 years, 10 months ago (2017-02-07 18:19:42 UTC) #19
jbroman
On 2017/02/07 at 18:19:42, jbroman wrote: > https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error_unittest.cc > File extensions/renderer/api_last_error_unittest.cc (right): > > https://codereview.chromium.org/2657613005/diff/80001/extensions/renderer/api_last_error_unittest.cc#newcode103 ...
3 years, 10 months ago (2017-02-08 16:36:19 UTC) #20
Devlin
Rebased with the v8 roll; all tests passing now.
3 years, 10 months ago (2017-02-09 20:53:29 UTC) #25
jbroman
lgtm https://codereview.chromium.org/2657613005/diff/160001/extensions/renderer/api_last_error.cc File extensions/renderer/api_last_error.cc (right): https://codereview.chromium.org/2657613005/diff/160001/extensions/renderer/api_last_error.cc#newcode82 extensions/renderer/api_last_error.cc:82: if (!maybe_error.ToLocal(&local_error)) nit: Don't have to, but it's ...
3 years, 10 months ago (2017-02-13 19:41:28 UTC) #26
lazyboy
lgtm https://codereview.chromium.org/2657613005/diff/160001/extensions/renderer/api_last_error_unittest.cc File extensions/renderer/api_last_error_unittest.cc (right): https://codereview.chromium.org/2657613005/diff/160001/extensions/renderer/api_last_error_unittest.cc#newcode122 extensions/renderer/api_last_error_unittest.cc:122: // TODO(devlin): Or should we? If someone sets ...
3 years, 10 months ago (2017-02-13 21:54:27 UTC) #27
Devlin
https://codereview.chromium.org/2657613005/diff/160001/extensions/renderer/api_last_error.cc File extensions/renderer/api_last_error.cc (right): https://codereview.chromium.org/2657613005/diff/160001/extensions/renderer/api_last_error.cc#newcode82 extensions/renderer/api_last_error.cc:82: if (!maybe_error.ToLocal(&local_error)) On 2017/02/13 19:41:27, jbroman wrote: > nit: ...
3 years, 10 months ago (2017-02-14 04:57:08 UTC) #36
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/2657613005/220001
3 years, 10 months ago (2017-02-14 04:58:00 UTC) #39
commit-bot: I haz the power
3 years, 10 months ago (2017-02-14 05:05:24 UTC) #42
Message was sent while issue was closed.
Committed patchset #8 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/931df34fb40d8130d986b1fc6df3...

Powered by Google App Engine
This is Rietveld 408576698