diff options
author | Rickard Green <[email protected]> | 2017-01-23 17:07:23 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-02-06 19:54:48 +0100 |
commit | 5a97997217e5c3f901e8fefbd7bbf6c64652c9a8 (patch) | |
tree | bc7ebe05fcc7027997098d8c35c6c377dc731286 /erts/preloaded/src/init.erl | |
parent | 7c70239985c4591ef2770a59a1bf62b51f5108cc (diff) | |
download | otp-5a97997217e5c3f901e8fefbd7bbf6c64652c9a8.tar.gz otp-5a97997217e5c3f901e8fefbd7bbf6c64652c9a8.tar.bz2 otp-5a97997217e5c3f901e8fefbd7bbf6c64652c9a8.zip |
Use magic refs for code loading state
Diffstat (limited to 'erts/preloaded/src/init.erl')
-rw-r--r-- | erts/preloaded/src/init.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/preloaded/src/init.erl b/erts/preloaded/src/init.erl index 551ca4ea40..86dc9a2957 100644 --- a/erts/preloaded/src/init.erl +++ b/erts/preloaded/src/init.erl @@ -932,15 +932,15 @@ load_rest([], _) -> prepare_loading_fun() -> fun(Mod, FullName, Beam) -> case erlang:prepare_loading(Mod, Beam) of - Prepared when is_binary(Prepared) -> + {error,_}=Error -> + Error; + Prepared -> case erlang:has_prepared_code_on_load(Prepared) of true -> {ok,{on_load,Beam,FullName}}; false -> {ok,{prepared,Prepared,FullName}} - end; - {error,_}=Error -> - Error + end end end. |