| Index: extensions/renderer/resources/runtime_custom_bindings.js
|
| diff --git a/extensions/renderer/resources/runtime_custom_bindings.js b/extensions/renderer/resources/runtime_custom_bindings.js
|
| index ac03a04df5696b4be225d4c1cac002af1fa8871e..0fd4916bdcb77a2f623e1f79ecf3bc335ac39f55 100644
|
| --- a/extensions/renderer/resources/runtime_custom_bindings.js
|
| +++ b/extensions/renderer/resources/runtime_custom_bindings.js
|
| @@ -31,7 +31,7 @@ if (contextType == 'BLESSED_EXTENSION' ||
|
| if (manifest.app && manifest.app.background) {
|
| // Get the background page if one exists. Otherwise, default to the current
|
| // window.
|
| - backgroundPage = runtimeNatives.GetExtensionViews(-1, 'BACKGROUND')[0];
|
| + backgroundPage = runtimeNatives.GetExtensionViews(-1, 'BACKGROUND', -1)[0];
|
| if (backgroundPage) {
|
| var GetModuleSystem = requireNative('v8_context').GetModuleSystem;
|
| backgroundRequire = GetModuleSystem(backgroundPage).require;
|
| @@ -177,7 +177,8 @@ binding.registerCustomHook(function(binding, id, contextType) {
|
| apiFunctions.setCustomCallback('getBackgroundPage',
|
| function(name, request, callback, response) {
|
| if (callback) {
|
| - var bg = runtimeNatives.GetExtensionViews(-1, 'BACKGROUND')[0] || null;
|
| + var bg = runtimeNatives.GetExtensionViews(-1, 'BACKGROUND', -1)[0] ||
|
| + null;
|
| callback(bg);
|
| }
|
| });
|
|
|