Opened 5 years ago

Closed 5 years ago

#2541 closed defect (fixed)

Opera regression: storage.get: "managed" is not available

Reported by: greiner Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-1.9-for-Chrome-Opera-Safari
Module: Core Keywords:
Cc: sebastian Blocked By:
Blocking: Platform: Opera
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

http://codereview.adblockplus.org/5999015493632000

Description

Environment

Ubuntu 14.04
Opera 29
Adblock Plus 1.8.12.1425

How to reproduce

  1. Go to "opera://extensions"
  2. Load unpacked extension
  3. Observe error messages underneath extension listing

Observed behaviour

The following error message is shown: Unchecked runtime.lastError while running storage.get: "managed" is not available in this instance of Chrome

Expected behaviour

No error message is shown

Background

This error was introduced in #1488 which made use of the chrome.storage.managed API. It checks for its availability using if (require("info").platform == "chromium" && "managed" in chrome.storage).
In Opera both conditions evaluate to true but when you try to call chrome.storage.managed.get it tells you that it's not implemented by throwing the above mentioned error. This causes subsequent code not to be executed.

Change History (3)

comment:1 Changed 5 years ago by sebastian

  • Owner set to sebastian
  • Priority changed from Unknown to P3
  • Ready set

Classic Opera. :D This isn't the first time they do this shit. Seriously, why isn't chrome.storaged.managed undefined if they don't support it? Then everything would work the same way as on older Chrome versions that didn't implement that API yet.

comment:2 Changed 5 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed 5 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.