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

Issue 384653002: Improve robustness of pageCapture.saveAsMHTML custom binding (Closed)

Created:
6 years, 5 months ago by robwu
Modified:
6 years, 5 months ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Improve robustness of pageCapture.saveAsMHTML custom binding Previously, errors in the user-defined callback function could break the internal state of the pageCapture API. This is now mitigated by reading and nulling the callback before using it, and only access the properties of the response object after verifying that it is not void. Also fixed a typo in an error message. BUG=392800 TEST=Manually the tests from the bug report (or read the source code and infer from the changes that the reported bugs have been fixed.) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282470

Patch Set 1 #

Patch Set 2 : fix typo in error message #

Total comments: 4

Patch Set 3 : address rdevlin's review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -10 lines) Patch
M chrome/browser/extensions/api/page_capture/page_capture_api.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/resources/extensions/page_capture_custom_bindings.js View 1 2 2 chunks +17 lines, -9 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
robwu
6 years, 5 months ago (2014-07-10 10:45:25 UTC) #1
Devlin
Good find! https://codereview.chromium.org/384653002/diff/20001/chrome/renderer/resources/extensions/page_capture_custom_bindings.js File chrome/renderer/resources/extensions/page_capture_custom_bindings.js (right): https://codereview.chromium.org/384653002/diff/20001/chrome/renderer/resources/extensions/page_capture_custom_bindings.js#newcode20 chrome/renderer/resources/extensions/page_capture_custom_bindings.js:20: if (response) { nit: inline? if (response) ...
6 years, 5 months ago (2014-07-10 20:53:28 UTC) #2
robwu
https://codereview.chromium.org/384653002/diff/20001/chrome/renderer/resources/extensions/page_capture_custom_bindings.js File chrome/renderer/resources/extensions/page_capture_custom_bindings.js (right): https://codereview.chromium.org/384653002/diff/20001/chrome/renderer/resources/extensions/page_capture_custom_bindings.js#newcode20 chrome/renderer/resources/extensions/page_capture_custom_bindings.js:20: if (response) { On 2014/07/10 20:53:28, Devlin wrote: > ...
6 years, 5 months ago (2014-07-10 21:15:56 UTC) #3
Devlin
lgtm
6 years, 5 months ago (2014-07-10 21:20:09 UTC) #4
robwu
The CQ bit was checked by rob@robwu.nl
6 years, 5 months ago (2014-07-10 21:20:36 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rob@robwu.nl/384653002/40001
6 years, 5 months ago (2014-07-10 21:22:09 UTC) #6
commit-bot: I haz the power
6 years, 5 months ago (2014-07-10 23:43:23 UTC) #7
Message was sent while issue was closed.
Change committed as 282470

Powered by Google App Engine
This is Rietveld 408576698