| Index: chrome/renderer/resources/extensions/context_menus_custom_bindings.js
|
| diff --git a/chrome/renderer/resources/extensions/context_menus_custom_bindings.js b/chrome/renderer/resources/extensions/context_menus_custom_bindings.js
|
| index 9e4016a468b138375d96b4205388cd21bd739f7d..9bc788c2c67210629b8bbc07ffe30e4e8f7b9bd3 100644
|
| --- a/chrome/renderer/resources/extensions/context_menus_custom_bindings.js
|
| +++ b/chrome/renderer/resources/extensions/context_menus_custom_bindings.js
|
| @@ -48,10 +48,14 @@ chromeHidden.registerCustomHook('contextMenus', function(bindingsAPI) {
|
| var args = arguments;
|
| var id = GetNextContextMenuId();
|
| args[0].generatedId = id;
|
| - sendRequest(this.name,
|
| - args,
|
| - this.definition.parameters,
|
| - {customCallback: this.customCallback});
|
| + var optArgs = {
|
| + customCallback: this.customCallback,
|
| + // Functions aren't usually serializable, but the browser needs to know
|
| + // if there's an onclick handler, so convert it to an object.
|
| + // TODO(kalman): write this custom binding in such a way that we don't.
|
| + allowFunctionsInObjects: true
|
| + };
|
| + sendRequest(this.name, args, this.definition.parameters, optArgs);
|
| return chromeHidden.contextMenus.getIdFromCreateProperties(args[0]);
|
| });
|
|
|
|
|