Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/prefs.js

Issue 5999015493632000: Issue 2541 - Suppress error on Opera when calling chrome.storage.managed.get() (Closed)
Patch Set: Made comment more verbose Created May 19, 2015, 4:07 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
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: lib/prefs.js
===================================================================
--- a/lib/prefs.js
+++ b/lib/prefs.js
@@ -283,6 +283,12 @@
{
chrome.storage.managed.get(null, function(items)
{
+ // Opera doesn't support chrome.storage.managed, but instead simply
+ // removing the API, Opera sets chrome.runtime.lastError when using it.
+ // So we have to retrieve that error, to prevent it from showing up
+ // in the console.
+ chrome.runtime.lastError;
+
for (let key in items)
defaults[key] = items[key];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld