@@ -446,12 +446,11 @@ void MCEngineEvalParam(MCExecContext& ctxt, integer_t p_index, MCValueRef& r_val
446446void MCEngineEvalParamCount (MCExecContext& ctxt, integer_t & r_count)
447447{
448448 // MW-2013-11-15: [[ Bug 11277 ]] If we don't have a handler then 'the param'
449- // makes no sense so just return 0.
450- // PM-2014-04-14: [[Bug 12105]] Do this check to prevent crash in LC server
449+ // makes no sense so just return 0.
451450 if (ctxt.GetHandler () != nil)
452451 r_count = ctxt.GetHandler ()->getnparams ();
453452 else
454- ctxt . LegacyThrow (EE_PARAMCOUNT_NOHANDLER) ;
453+ r_count = 0 ;
455454}
456455
457456void MCEngineEvalParams (MCExecContext& ctxt, MCStringRef& r_string)
@@ -652,10 +651,9 @@ void MCEngineEvalValue(MCExecContext& ctxt, MCStringRef p_script, MCValueRef& r_
652651 return ;
653652 }
654653
655- if (ctxt.GetHandler () != nil)
656- ctxt.GetHandler ()->eval (ctxt, p_script, r_value);
657- else
658- ctxt.GetHandlerList ()->eval (ctxt, p_script, r_value);
654+ // SN-2015-06-03: [[ Bug 11277 ]] MCHandler::eval refactored
655+ ctxt.eval (ctxt, p_script, r_value);
656+
659657 if (ctxt.HasError ())
660658 ctxt.LegacyThrow (EE_VALUE_ERROR, p_script);
661659}
@@ -853,10 +851,8 @@ void MCEngineExecDo(MCExecContext& ctxt, MCStringRef p_script, int p_line, int p
853851 added = True;
854852 }
855853
856- if (ctxt.GetHandler () != nil)
857- ctxt.GetHandler () -> doscript (ctxt, p_script, p_line, p_pos);
858- else
859- ctxt.GetHandlerList () -> doscript (ctxt, p_script, p_line, p_pos);
854+ // SN-2015-06-03: [[ Bug 11277 ]] MCHandler::doscript refactored
855+ ctxt.doscript (ctxt, p_script, p_line, p_pos);
860856
861857 if (added)
862858 MCnexecutioncontexts--;
@@ -882,10 +878,8 @@ void MCEngineExecDoInCaller(MCExecContext& ctxt, MCStringRef p_script, int p_lin
882878
883879 MCExecContext *caller = MCexecutioncontexts[MCnexecutioncontexts - 2 ];
884880
885- if (caller -> GetHandler () != nil)
886- caller -> GetHandler () -> doscript (*caller, p_script, p_line, p_pos);
887- else
888- caller -> GetHandlerList () -> doscript (*caller, p_script, p_line, p_pos);
881+ // SN-2015-06-03: [[ Bug 11277 ]] MCHandler::doscript refactored
882+ caller -> doscript (*caller, p_script, p_line, p_pos);
889883
890884 if (added)
891885 MCnexecutioncontexts--;
@@ -1307,8 +1301,9 @@ static void MCEngineSplitScriptIntoMessageAndParameters(MCExecContext& ctxt, MCS
13071301
13081302 // MW-2011-08-11: [[ Bug 9668 ]] Make sure we copy 'pdata' if we use it, since
13091303 // mptr (into which it points) only lasts as long as this method call.
1304+ // SN-2015-06-03: [[ Bug 11277 ]] MCHandler::eval_ctxt refactored
13101305 MCExecValue t_value;
1311- ctxt . GetHandler () -> eval_ctxt (ctxt, *t_expression, t_value);
1306+ ctxt . eval_ctxt (ctxt, *t_expression, t_value);
13121307 if (!ctxt.HasError ())
13131308 newparam->set_exec_argument (ctxt, t_value);
13141309 else
@@ -2000,3 +1995,4 @@ void MCEngineGetEditionType(MCExecContext& ctxt, MCStringRef& r_edition)
20001995}
20011996
20021997// //////////////////////////////////////////////////////////////////////////////
1998+
0 commit comments