From ff47482c9acb9b0655d1d9528164c96aff05cc90 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Thu, 26 Jun 2014 12:57:20 +0200 Subject: Remove untested option 'generic_debug' from gen_server This undocumented option makes an init:get_argument/1 call every time a gen_server is started. Reported-By: James Fish --- lib/wx/src/wx_object.erl | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'lib/wx/src') diff --git a/lib/wx/src/wx_object.erl b/lib/wx/src/wx_object.erl index 249ea1cee3..2c016e7951 100644 --- a/lib/wx/src/wx_object.erl +++ b/lib/wx/src/wx_object.erl @@ -600,22 +600,10 @@ opt(_, []) -> %% @hidden debug_options(Name, Opts) -> case opt(debug, Opts) of - {ok, Options} -> dbg_options(Name, Options); - _ -> dbg_options(Name, []) + {ok, Options} -> dbg_opts(Name, Options); + _ -> [] end. %% @hidden -dbg_options(Name, []) -> - Opts = - case init:get_argument(generic_debug) of - error -> - []; - _ -> - [log, statistics] - end, - dbg_opts(Name, Opts); -dbg_options(Name, Opts) -> - dbg_opts(Name, Opts). -%% @hidden dbg_opts(Name, Opts) -> case catch sys:debug_options(Opts) of {'EXIT',_} -> -- cgit v1.2.3