anchor.diff:  %% {Lang, Called, Result}
   %% Where Called = {Mod, Fun} if Lang = erlang
   %%       Called = JSName if Lang = javascript
  -invoke_hook({struct, Hook}, RObj) ->
  +invoke_hook({struct, Hook}=HookDef, RObj) ->
       Mod = proplists:get_value(<<"mod">>, Hook),
       Fun = proplists:get_value(<<"fun">>, Hook),
       JSName = proplists:get_value(<<"name">>, Hook),
  -    invoke_hook(Mod, Fun, JSName, RObj);
  +    if (Mod == undefined orelse Fun == undefined) andalso JSName == undefined ->
  +            {error, {invalid_hook_def, HookDef}};
  +       true -> invoke_hook(Mod, Fun, JSName, RObj)
  +    end;
   invoke_hook(HookDef, _RObj) ->
       {error, {invalid_hook_def, HookDef}}.
   
  
positive.code: decode_precommit({error, Reason}) ->
      {fail, Reason}.
  
  get_hooks(HookType, BucketProps) ->
      Hooks = proplists:get_value(HookType, BucketProps, []),
      case Hooks of
  
negative.code: postcommit(timeout, StateData = #state{postcommit = [Hook | Rest],
                                         putcore = PutCore}) ->
      %% Process the next hook - gives sys:get_status messages a chance if hooks
      %% take a long time.
      {ReplyObj, UpdPutCore} =  riak_kv_put_core:final(PutCore),
      decode_postcommit(invoke_hook(Hook, ReplyObj)),
      {next_state, postcommit, StateData#state{postcommit = Rest,
                                               putcore = UpdPutCore}, 0};
  postcommit(request_timeout, StateData) -> % still process hooks even if request timed out
  