|
|
Created:
6 years, 5 months ago by Devlin Modified:
6 years, 5 months ago CC:
chromium-reviews, chromium-apps-reviews_chromium.org, arv+watch_chromium.org, extensions-reviews_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Project:
chromium Visibility:
Public. |
DescriptionFix Regression in Unpacked Extension Load Error UI
A regression where we stopped showing the manifest error was introduced in
r283852. Fix it.
TBR=finnur@chromium.org
BUG=397467
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285770
Patch Set 1 #
Total comments: 6
Patch Set 2 : #
Messages
Total messages: 17 (0 generated)
https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... File chrome/browser/resources/extensions/extension_loader.js (left): https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... chrome/browser/resources/extensions/extension_loader.js:20: * Construct a Failure. what was wrong with a Failure type?
https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... File chrome/browser/resources/extensions/extension_loader.js (left): https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... chrome/browser/resources/extensions/extension_loader.js:20: * Construct a Failure. On 2014/07/25 16:03:10, kalman wrote: > what was wrong with a Failure type? Well, depends on your semantics ;) Since JS is "typeless" (I know it's not really true), there *is* no failure type. So, really, the problem was we had an unused function (since we never once _constructed_ a failure. All pertinent documentation on the failure object was moved to the failures_ array comment.
https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... File chrome/browser/resources/extensions/extension_loader.js (left): https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... chrome/browser/resources/extensions/extension_loader.js:20: * Construct a Failure. On 2014/07/25 16:15:41, Devlin wrote: > On 2014/07/25 16:03:10, kalman wrote: > > what was wrong with a Failure type? > > Well, depends on your semantics ;) Since JS is "typeless" (I know it's not > really true), there *is* no failure type. So, really, the problem was we had an > unused function (since we never once _constructed_ a failure. All pertinent > documentation on the failure object was moved to the failures_ array comment. if we never constructed a Failure that is a problem. we should construct Failures instead of appending objects to |failures_| :) JS resources are going to start being type-checked with closure (there is a chromium-dev thread about it) so type information is nice.
https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... File chrome/browser/resources/extensions/extension_loader.js (left): https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... chrome/browser/resources/extensions/extension_loader.js:20: * Construct a Failure. On 2014/07/25 16:19:09, kalman wrote: > On 2014/07/25 16:15:41, Devlin wrote: > > On 2014/07/25 16:03:10, kalman wrote: > > > what was wrong with a Failure type? > > > > Well, depends on your semantics ;) Since JS is "typeless" (I know it's not > > really true), there *is* no failure type. So, really, the problem was we had > an > > unused function (since we never once _constructed_ a failure. All pertinent > > documentation on the failure object was moved to the failures_ array comment. > > if we never constructed a Failure that is a problem. we should construct > Failures instead of appending objects to |failures_| :) > > JS resources are going to start being type-checked with closure (there is a > chromium-dev thread about it) so type information is nice. Well, the failure object is primarily constructed in C++ and sent to us as an object with 3/4 params (filePath, error, manifest). Would you prefer to explicitly construct a failure from an existing object, instead of appending the missing param? Might be worth it, for the closure compiler, but also seems kinda... wasteful.
https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... File chrome/browser/resources/extensions/extension_loader.js (left): https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... chrome/browser/resources/extensions/extension_loader.js:20: * Construct a Failure. On 2014/07/25 16:22:44, Devlin wrote: > On 2014/07/25 16:19:09, kalman wrote: > > On 2014/07/25 16:15:41, Devlin wrote: > > > On 2014/07/25 16:03:10, kalman wrote: > > > > what was wrong with a Failure type? > > > > > > Well, depends on your semantics ;) Since JS is "typeless" (I know it's not > > > really true), there *is* no failure type. So, really, the problem was we > had > > an > > > unused function (since we never once _constructed_ a failure. All pertinent > > > documentation on the failure object was moved to the failures_ array > comment. > > > > if we never constructed a Failure that is a problem. we should construct > > Failures instead of appending objects to |failures_| :) > > > > JS resources are going to start being type-checked with closure (there is a > > chromium-dev thread about it) so type information is nice. > > Well, the failure object is primarily constructed in C++ and sent to us as an > object with 3/4 params (filePath, error, manifest). Would you prefer to > explicitly construct a failure from an existing object, instead of appending the > missing param? Might be worth it, for the closure compiler, but also seems > kinda... wasteful. Yes I think that would be better. why is it wasteful?
https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... File chrome/browser/resources/extensions/extension_loader.js (left): https://codereview.chromium.org/422533002/diff/1/chrome/browser/resources/ext... chrome/browser/resources/extensions/extension_loader.js:20: * Construct a Failure. On 2014/07/25 16:44:13, kalman wrote: > On 2014/07/25 16:22:44, Devlin wrote: > > On 2014/07/25 16:19:09, kalman wrote: > > > On 2014/07/25 16:15:41, Devlin wrote: > > > > On 2014/07/25 16:03:10, kalman wrote: > > > > > what was wrong with a Failure type? > > > > > > > > Well, depends on your semantics ;) Since JS is "typeless" (I know it's > not > > > > really true), there *is* no failure type. So, really, the problem was we > > had > > > an > > > > unused function (since we never once _constructed_ a failure. All > pertinent > > > > documentation on the failure object was moved to the failures_ array > > comment. > > > > > > if we never constructed a Failure that is a problem. we should construct > > > Failures instead of appending objects to |failures_| :) > > > > > > JS resources are going to start being type-checked with closure (there is a > > > chromium-dev thread about it) so type information is nice. > > > > Well, the failure object is primarily constructed in C++ and sent to us as an > > object with 3/4 params (filePath, error, manifest). Would you prefer to > > explicitly construct a failure from an existing object, instead of appending > the > > missing param? Might be worth it, for the closure compiler, but also seems > > kinda... wasteful. > > Yes I think that would be better. why is it wasteful? Because of all the extra work we do to copy those expensive references into a new object!! ;) Mostly just because it looks a bit excessive in the code, to me. But I don't feel strongly. Done.
lgtm!
TBR Finnur for the micro webui regex change.
The CQ bit was checked by rdevlin.cronin@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdevlin.cronin@chromium.org/422533002/...
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_clang_...) win_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_rel/buil...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_rel/buil...)
The CQ bit was checked by rdevlin.cronin@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdevlin.cronin@chromium.org/422533002/...
Message was sent while issue was closed.
Change committed as 285770 |