diff options
author | raymes <raymes@chromium.org> | 2014-09-15 21:45:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-16 04:47:44 +0000 |
commit | 69d475766c08be6411a8751861b3d09fcd24783d (patch) | |
tree | 91f043763d56d2f8c175582a5a60f77f64cd9b67 /pdf/instance.cc | |
parent | f7d19a3dc4071fc8e196488a867bae731fd8a68d (diff) | |
download | chromium_src-69d475766c08be6411a8751861b3d09fcd24783d.zip chromium_src-69d475766c08be6411a8751861b3d09fcd24783d.tar.gz chromium_src-69d475766c08be6411a8751861b3d09fcd24783d.tar.bz2 |
Check whether a number is passed as an argument to kJSSetZoomLevel rather than a double.
In the in-process PDF plugin when checking the argument type of kJSSetZoomLevel
calls to the plugin we would check if the argument is a double. But it may be
an int and we really want to check if it's a number. This probably worked in
the past by chance and broke when we switched to using gin to implement JS
bindings for Pepper.
BUG=413525
Review URL: https://codereview.chromium.org/569403004
Cr-Commit-Position: refs/heads/master@{#295008}
Diffstat (limited to 'pdf/instance.cc')
-rw-r--r-- | pdf/instance.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/instance.cc b/pdf/instance.cc index d700be8..bb13fcc 100644 --- a/pdf/instance.cc +++ b/pdf/instance.cc @@ -1768,7 +1768,7 @@ pp::Var Instance::CallScriptableMethod(const pp::Var& method, return pp::Var(); } if (method_str == kJSSetZoomLevel) { - if (args.size() == 1 && args[0].is_double()) + if (args.size() == 1 && args[0].is_number()) SetZoom(ZOOM_SCALE, args[0].AsDouble()); return pp::Var(); } |