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

Issue 2254383002: Signal extension API schema corruption to the browser process. (Closed)

Created:
4 years, 4 months ago by Wez
Modified:
4 years, 4 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, mark a. foltz
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Signal extension API schema corruption to the browser process. Extension API schemas are parsed from string resources in the browser binary, so failure to parse them usually indicates a problem with the browser installation. Crashing the extension process that tried to parse the schema makes it look to the user like the extension is at fault (or worse, in the case of component extensions, some browser features will misbehave for no obvious reason). This CL adds an IPC to indicate schema load failure back to the browser and has the browser attempt to load the schema itself, and crash on failure, so that the user has some indication that the browser itself is broken (providing a better UX for this case is under review!). Thanks to imcheng@ for implementing the bulk of this! BUG=634423, 639104, 121424 Committed: https://crrev.com/73b8107d339588f342d4f9a92888c9a05a3707b9 Cr-Commit-Position: refs/heads/master@{#413602}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address comments #

Total comments: 3

Patch Set 3 : Remove LoadSchemaOrDie #

Total comments: 2

Patch Set 4 : Remove semicolon #

Patch Set 5 : Tweak comments #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -13 lines) Patch
M extensions/browser/extension_message_filter.h View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/extension_message_filter.cc View 1 2 3 4 3 chunks +25 lines, -0 lines 0 comments Download
M extensions/common/extension_api.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M extensions/common/extension_api.cc View 1 2 4 chunks +30 lines, -11 lines 4 comments Download
M extensions/common/extension_messages.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M extensions/renderer/v8_schema_registry.cc View 2 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 59 (27 generated)
Wez
PTAL I wonder if we can add a browser-test for this to verify that we ...
4 years, 4 months ago (2016-08-19 01:12:36 UTC) #2
Wez
Given that the IPC to the browser may not actually trigger a crash, I wonder ...
4 years, 4 months ago (2016-08-19 01:15:21 UTC) #6
Devlin
https://codereview.chromium.org/2254383002/diff/1/extensions/common/extension_api.cc File extensions/common/extension_api.cc (right): https://codereview.chromium.org/2254383002/diff/1/extensions/common/extension_api.cc#newcode75 extensions/common/extension_api.cc:75: // From() returns null if pass a null or ...
4 years, 4 months ago (2016-08-19 15:02:33 UTC) #9
Devlin
On 2016/08/19 01:12:36, Wez wrote: > PTAL > > I wonder if we can add ...
4 years, 4 months ago (2016-08-19 15:04:26 UTC) #10
Devlin
On 2016/08/19 01:15:21, Wez wrote: > Given that the IPC to the browser may not ...
4 years, 4 months ago (2016-08-19 15:05:44 UTC) #11
Wez
On 2016/08/19 15:04:26, Devlin wrote: > On 2016/08/19 01:12:36, Wez wrote: > > PTAL > ...
4 years, 4 months ago (2016-08-19 18:19:33 UTC) #12
Wez
On 2016/08/19 15:05:44, Devlin wrote: > On 2016/08/19 01:15:21, Wez wrote: > > Given that ...
4 years, 4 months ago (2016-08-19 18:20:42 UTC) #13
Wez
https://codereview.chromium.org/2254383002/diff/1/extensions/common/extension_api.cc File extensions/common/extension_api.cc (right): https://codereview.chromium.org/2254383002/diff/1/extensions/common/extension_api.cc#newcode75 extensions/common/extension_api.cc:75: // From() returns null if pass a null or ...
4 years, 4 months ago (2016-08-19 18:22:16 UTC) #14
Devlin
On 2016/08/19 18:19:33, Wez wrote: > On 2016/08/19 15:04:26, Devlin wrote: > > On 2016/08/19 ...
4 years, 4 months ago (2016-08-19 18:32:11 UTC) #15
Devlin
https://codereview.chromium.org/2254383002/diff/1/extensions/common/extension_api.cc File extensions/common/extension_api.cc (right): https://codereview.chromium.org/2254383002/diff/1/extensions/common/extension_api.cc#newcode362 extensions/common/extension_api.cc:362: std::string api_name = GetAPINameFromFullName(api, NULL); On 2016/08/19 18:22:15, Wez ...
4 years, 4 months ago (2016-08-19 18:40:57 UTC) #16
Devlin
https://codereview.chromium.org/2254383002/diff/20001/extensions/browser/extension_message_filter.cc File extensions/browser/extension_message_filter.cc (right): https://codereview.chromium.org/2254383002/diff/20001/extensions/browser/extension_message_filter.cc#newcode326 extensions/browser/extension_message_filter.cc:326: ExtensionAPI::GetSharedInstance()->LoadSchemaListOrDie(api); On 2016/08/19 18:40:57, Devlin wrote: > Thinking about ...
4 years, 4 months ago (2016-08-19 19:13:27 UTC) #17
Wez
On 2016/08/19 19:13:27, Devlin wrote: > https://codereview.chromium.org/2254383002/diff/20001/extensions/browser/extension_message_filter.cc > File extensions/browser/extension_message_filter.cc (right): > > https://codereview.chromium.org/2254383002/diff/20001/extensions/browser/extension_message_filter.cc#newcode326 > ...
4 years, 4 months ago (2016-08-20 00:08:17 UTC) #18
Devlin
On 2016/08/20 00:08:17, Wez wrote: > On 2016/08/19 19:13:27, Devlin wrote: > > > https://codereview.chromium.org/2254383002/diff/20001/extensions/browser/extension_message_filter.cc ...
4 years, 4 months ago (2016-08-20 00:39:45 UTC) #19
Wez
On 2016/08/20 00:39:45, Devlin wrote: > On 2016/08/20 00:08:17, Wez wrote: > > On 2016/08/19 ...
4 years, 4 months ago (2016-08-20 01:07:51 UTC) #20
Wez
https://codereview.chromium.org/2254383002/diff/20001/extensions/browser/extension_message_filter.cc File extensions/browser/extension_message_filter.cc (right): https://codereview.chromium.org/2254383002/diff/20001/extensions/browser/extension_message_filter.cc#newcode326 extensions/browser/extension_message_filter.cc:326: ExtensionAPI::GetSharedInstance()->LoadSchemaListOrDie(api); On 2016/08/19 18:40:57, Devlin wrote: > Thinking about ...
4 years, 4 months ago (2016-08-20 01:40:40 UTC) #23
Devlin
I think this LGTM as long as bots are happy https://codereview.chromium.org/2254383002/diff/40001/extensions/browser/extension_message_filter.cc File extensions/browser/extension_message_filter.cc (right): https://codereview.chromium.org/2254383002/diff/40001/extensions/browser/extension_message_filter.cc#newcode337 ...
4 years, 4 months ago (2016-08-20 01:49:39 UTC) #24
Wez
-jschuh, +dcheng I started looking at doing a browser test, but couldn't find any simple ...
4 years, 4 months ago (2016-08-21 00:58:41 UTC) #34
Devlin
On 2016/08/21 00:58:41, Wez wrote: > -jschuh, +dcheng > > I started looking at doing ...
4 years, 4 months ago (2016-08-22 14:52:13 UTC) #37
nasko
GetAPINameFromFullName should probably handle empty string for "full_name" and return early, but that is orthogonal ...
4 years, 4 months ago (2016-08-22 21:20:13 UTC) #39
Wez
+mfoltz Devlin, Mark: Unit-testing this looks fiddly. We need to: 1. Have a "bad" schema ...
4 years, 4 months ago (2016-08-22 22:18:19 UTC) #41
Devlin
On 2016/08/22 22:18:19, Wez wrote: > +mfoltz > > Devlin, Mark: Unit-testing this looks fiddly. ...
4 years, 4 months ago (2016-08-22 22:21:34 UTC) #42
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/2254383002/80001
4 years, 4 months ago (2016-08-22 22:37:44 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/282451)
4 years, 4 months ago (2016-08-22 23:36:57 UTC) #47
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/2254383002/80001
4 years, 4 months ago (2016-08-22 23:47:46 UTC) #49
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-23 00:26:37 UTC) #51
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/73b8107d339588f342d4f9a92888c9a05a3707b9 Cr-Commit-Position: refs/heads/master@{#413602}
4 years, 4 months ago (2016-08-23 00:29:23 UTC) #53
dcheng
https://codereview.chromium.org/2254383002/diff/80001/extensions/common/extension_api.cc File extensions/common/extension_api.cc (right): https://codereview.chromium.org/2254383002/diff/80001/extensions/common/extension_api.cc#newcode65 extensions/common/extension_api.cc:65: base::snprintf(buf, arraysize(buf), "%s: (%d) '%s'", name.c_str(), Out of curiosity, ...
4 years, 4 months ago (2016-08-23 05:07:09 UTC) #54
Devlin
https://codereview.chromium.org/2254383002/diff/80001/extensions/common/extension_api.cc File extensions/common/extension_api.cc (right): https://codereview.chromium.org/2254383002/diff/80001/extensions/common/extension_api.cc#newcode65 extensions/common/extension_api.cc:65: base::snprintf(buf, arraysize(buf), "%s: (%d) '%s'", name.c_str(), On 2016/08/23 05:07:08, ...
4 years, 4 months ago (2016-08-23 19:34:16 UTC) #55
Wez
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/2275813002/ by wez@chromium.org. ...
4 years, 4 months ago (2016-08-24 00:00:02 UTC) #56
dcheng
https://codereview.chromium.org/2254383002/diff/80001/extensions/common/extension_api.cc File extensions/common/extension_api.cc (right): https://codereview.chromium.org/2254383002/diff/80001/extensions/common/extension_api.cc#newcode65 extensions/common/extension_api.cc:65: base::snprintf(buf, arraysize(buf), "%s: (%d) '%s'", name.c_str(), On 2016/08/23 19:34:16, ...
4 years, 4 months ago (2016-08-24 00:12:21 UTC) #57
Wez
https://codereview.chromium.org/2254383002/diff/80001/extensions/common/extension_api.cc File extensions/common/extension_api.cc (right): https://codereview.chromium.org/2254383002/diff/80001/extensions/common/extension_api.cc#newcode65 extensions/common/extension_api.cc:65: base::snprintf(buf, arraysize(buf), "%s: (%d) '%s'", name.c_str(), On 2016/08/24 00:12:21, ...
4 years, 4 months ago (2016-08-24 00:24:13 UTC) #58
Wez
4 years, 4 months ago (2016-08-24 00:24:15 UTC) #59
Message was sent while issue was closed.

          

Powered by Google App Engine
This is Rietveld 408576698