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

Unified Diff: chrome/browser/resources/print_preview/previewarea/preview_area.js

Issue 10823173: Handle null or empty page normalized string. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/previewarea/preview_area.js
diff --git a/chrome/browser/resources/print_preview/previewarea/preview_area.js b/chrome/browser/resources/print_preview/previewarea/preview_area.js
index 7fc8ec0265a796e559438330159e9d9b18c68108..8e996703475ac79f9c8819307fb008847e10409c 100644
--- a/chrome/browser/resources/print_preview/previewarea/preview_area.js
+++ b/chrome/browser/resources/print_preview/previewarea/preview_area.js
@@ -567,7 +567,11 @@ cr.define('print_preview', function() {
this.pageOffset_ = new print_preview.Coordinate2d(
this.plugin_.pageXOffset(), this.plugin_.pageYOffset());
}
- var normalized = this.plugin_.getPageLocationNormalized().split(';');
+ var pageLocationNormalizedStr = this.plugin_.getPageLocationNormalized();
+ if (!pageLocationNormalizedStr) {
+ return;
+ }
+ var normalized = pageLocationNormalizedStr.split(';');
var pluginWidth = this.plugin_.getWidth();
var pluginHeight = this.plugin_.getHeight();
var translationTransform = new print_preview.Coordinate2d(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698