| Index: chrome/browser/resources/print_preview/margin_settings.js
|
| diff --git a/chrome/browser/resources/print_preview/margin_settings.js b/chrome/browser/resources/print_preview/margin_settings.js
|
| index 1485e9af6de643dc7b80ff353ba2240a15614e73..ea2ec127727196121f3f3f2b776e5e04f0e39934 100644
|
| --- a/chrome/browser/resources/print_preview/margin_settings.js
|
| +++ b/chrome/browser/resources/print_preview/margin_settings.js
|
| @@ -291,6 +291,19 @@ cr.define('print_preview', function() {
|
| addEventListeners_: function() {
|
| this.marginList_.onchange = this.onMarginsChanged_.bind(this);
|
| document.addEventListener('PDFLoaded', this.onPDFLoaded_.bind(this));
|
| + document.addEventListener('PDFGenerationError',
|
| + this.onPDFGenerationError_.bind(this));
|
| + },
|
| +
|
| + /**
|
| + * Executes when an 'PDFGenerationError' event occurs.
|
| + * @private
|
| + */
|
| + onPDFGenerationError_: function() {
|
| + if (this.isCustomMarginsSelected()) {
|
| + this.removeCustomMarginEventListeners_();
|
| + this.marginsUI.hide();
|
| + }
|
| },
|
|
|
| /**
|
|
|