chrome.tabs.setZoom recognizes won't recognize zoomFactor |
|||||
Issue descriptionChrome Version: Version 67.0.3361.0 (Official Build) canary (64-bit) OS: Mac OS 10.13.3 What steps will reproduce the problem? (1) Install Snipit https://chrome.google.com/webstore/detail/snipit/ehoadneljpdggcbbknedodolkkjodefl (2) Try to capture a tab What is the expected result? Open a new tab with an annotation screen What happens instead? Empty screen with an error in console `Uncaught TypeError: Error in invocation of tabs.setZoom(optional integer tabId, number zoomFactor, optional function callback): Missing required argument 'zoomFactor'.`
,
Mar 5 2018
Hm on the second thought, I guess the said API can just check the number of passed arguments, so passing just (1.0) or even (1) should work.
,
Mar 7 2018
Broken also in dev Chrome (Version 66.0.3355.0 (Official Build) dev (64-bit) on Linux).
,
Mar 7 2018
Hm I couldn't repro on the same version: Version 66.0.3355.0 (Official Build) dev (64-bit) An easy workaround is to change to "chrome.tabs.setZoom(undefined, 1.0)" but I can't repro it so I can't test it. I guess I'll go ahead and publish this version. @llib do you think you can verify it? I think I'll push it next morning.
,
Mar 7 2018
,
Mar 8 2018
I'll push a new version with the workaround tomorrow morning in the MTV time. I'll leave a link to the the current version as a zip file here: https://drive.google.com/file/d/1V2xg-L5qfZtFLQhDfZe1NkkjNSTcsVhI/view?usp=sharing
,
Mar 8 2018
I've pushed a new version (36) with "setZoom(undefined, 1.0)" instead of "setZoom(1.0)". I still haven't tested it on a dev or a canary though.
,
Mar 8 2018
My browser has picked up the new version of snipit and I've confirmed it works.
,
Mar 9 2018
The signature is (and has been) problematic: optional int, then required double. Assigning to Devlin for triaging, in case anything that jumps out as a regression with changes in signature parsing code...
,
Apr 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6cf2f70039b143cab3af2dff3a989f8957604b5d commit 6cf2f70039b143cab3af2dff3a989f8957604b5d Author: Devlin Cronin <rdevlin.cronin@chromium.org> Date: Tue Apr 10 14:50:43 2018 [Extensions Bindings] Tweak signature parsing Signature parsing failed in cases where an optional parameter of a certain type was followed by a required parameter of the same type. The parsing was greedy, and would always use a parameter if it matched. This meant that passing a value like `1` to a signature that matched (optional int, int) would fail, because the `1` would be applied to the first optional int, and the second int would be missing. Tweak signature parsing to find the signature that matches the supplied arguments (if any possible signature matches) and resolve the arguments before performing parsing. Update unittests for the same. Bug: 818555 Change-Id: I57c9909ff73505467fb9d333690113bea8eea433 Reviewed-on: https://chromium-review.googlesource.com/993532 Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#549527} [modify] https://crrev.com/6cf2f70039b143cab3af2dff3a989f8957604b5d/extensions/renderer/bindings/api_binding_js_util_unittest.cc [modify] https://crrev.com/6cf2f70039b143cab3af2dff3a989f8957604b5d/extensions/renderer/bindings/api_binding_unittest.cc [modify] https://crrev.com/6cf2f70039b143cab3af2dff3a989f8957604b5d/extensions/renderer/bindings/api_invocation_errors.cc [modify] https://crrev.com/6cf2f70039b143cab3af2dff3a989f8957604b5d/extensions/renderer/bindings/api_invocation_errors.h [modify] https://crrev.com/6cf2f70039b143cab3af2dff3a989f8957604b5d/extensions/renderer/bindings/api_signature.cc [modify] https://crrev.com/6cf2f70039b143cab3af2dff3a989f8957604b5d/extensions/renderer/bindings/api_signature_unittest.cc [modify] https://crrev.com/6cf2f70039b143cab3af2dff3a989f8957604b5d/extensions/renderer/native_extension_bindings_system_unittest.cc
,
Apr 10 2018
This was an issue with the native bindings experiment, which is launched to a portion of dev and beta populations. It should be fixed with #10. Thanks for filing this! |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by omakoto@google.com
, Mar 5 2018