diff options
Diffstat (limited to 'chrome/renderer/resources')
-rw-r--r-- | chrome/renderer/resources/extension_process_bindings.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js index 8955daf..0bf0591 100644 --- a/chrome/renderer/resources/extension_process_bindings.js +++ b/chrome/renderer/resources/extension_process_bindings.js @@ -570,7 +570,8 @@ var chrome = chrome || {}; delete details.path; details.imageData = canvas_context.getImageData(0, 0, canvas.width, canvas.height); - sendCustomRequest(SetExtensionActionIcon, name, [details], parameters); + sendCustomRequest(SetExtensionActionIcon, name, [details], + parameters); } img.src = details.path; } else { @@ -596,9 +597,10 @@ var chrome = chrome || {}; } // Set up the onclick handler if we were passed one in the request. - if (request.args.onclick) { + var onclick = request.args.length ? request.args[0].onclick : null; + if (onclick) { var menuItemId = chromeHidden.JSON.parse(response); - chromeHidden.contextMenuHandlers[menuItemId] = request.args.onclick; + chromeHidden.contextMenuHandlers[menuItemId] = onclick; } }; |