PSA: chrome.runtime.reload and requestUpdateCheck are no longer available to content scripts

261 views
Skip to first unread message

kalman

unread,
Jul 9, 2014, 8:08:02 PM7/9/14
to chromium-...@chromium.org
Hi everybody,

A bug was introduced a long time ago exposing chrome.runtime.reload and chrome.runtime.requestUpdateCheck to content scripts. This has been fixed in Chrome 38, so if you're relying on these you'll need to move them to your background page. Hopefully you're not, because it was never documented as such.

Cheers,
Ben.

PhistucK

unread,
Jul 10, 2014, 2:25:05 AM7/10/14
to kalman, Chromium-extensions
Thank you for the advance notice!

Have you gone over the extensions in the web store, looked for the basic usage of such cases (a script is defined as a content script in the manifest and has those strings) and notified the authors?


PhistucK


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/2d8b68e9-4943-4dd3-9269-221bdca6ec3d%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Benjamin Kalman

unread,
Jul 10, 2014, 11:16:04 AM7/10/14
to PhistucK, Chromium-extensions
Good question. Unfortunately our tools aren't powerful enough to cross between the manifest and the actual code. It's also not quite as simple as that because chrome.tabs.executeScript is another way to execute a content script.

I did search for those functions and filter out scripts that are named like background pages (bg.js, background.js, main.js, etc) and there aren't many callers besides those, and even those were in files like util.js and chrome.js which are likely not content scripts either.

PhistucK

unread,
Jul 10, 2014, 11:51:18 AM7/10/14
to Benjamin Kalman, Chromium-extensions
It does not seem like a big change to the tools and I thought about executeScript (which also should not be a big change), but I went for the basic case anyway, as a sign of good will and not as a sure thing.

Let us hope for the best, I guess. I would make the tools more powerful to prevent breakages due to old bugs that creeped in, though.


PhistucK

rosa maria palacios juncosa

unread,
Jul 13, 2014, 7:23:58 AM7/13/14
to chromium-...@chromium.org


El miércoles, 9 de julio de 2014 20:08:02 GMT-4, kalman escribio:
Hola a todos,

Un error se introdujo hace mucho tiempo exponiendo chrome.runtime.reload y chrome.runtime. requestUpdateCheck a los guiones de contenido. Esto se ha corregido en Chrome 38, por lo que si usted está confiando en ellos tendrás que mover a su página de fondo. Esperemos que no lo eres, porque nunca fue documentado como tal.

Saludos,
Ben.
Reply all
Reply to author
Forward
0 new messages