result_codes_list.h revision a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7
1d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com// Copyright (c) 2013 The Chromium Authors. All rights reserved.
2d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com// Use of this source code is governed by a BSD-style license that can be
3fa8cb1cf222f85aa898cfe979ac57da6a7b9f6f9commit-bot@chromium.org// found in the LICENSE file.
4fa8cb1cf222f85aa898cfe979ac57da6a7b9f6f9commit-bot@chromium.org
5fa8cb1cf222f85aa898cfe979ac57da6a7b9f6f9commit-bot@chromium.org// Intentionally no include guards because this file is meant to be included
6fa8cb1cf222f85aa898cfe979ac57da6a7b9f6f9commit-bot@chromium.org// inside a macro to generate enum values.
7d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com
8a65e2fdc9af4b0b0415888a560d6ebd779bc3148commit-bot@chromium.org// This file consolidates all the return codes for the browser and renderer
9a65e2fdc9af4b0b0415888a560d6ebd779bc3148commit-bot@chromium.org// process. The return code is the value that:
10d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com// a) is returned by main() or winmain(), or
11d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com// b) specified in the call for ExitProcess() or TerminateProcess(), or
12d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com// c) the exception value that causes a process to terminate.
13ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org//
14ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org// It is advisable to not use negative numbers because the Windows API returns
15ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org// it as an unsigned long and the exception values have high numbers. For
1639e8d93337c7e37d2b09dc710a05a9beefef5c2ccommit-bot@chromium.org// example EXCEPTION_ACCESS_VIOLATION value is 0xC0000005.
17d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com
18d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com#include "build/build_config.h"
19d6bab0238655dbab24dfe92bd0b16b464310a8c7rmistry@google.com
20ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org// Process terminated normally.
21d6bab0238655dbab24dfe92bd0b16b464310a8c7rmistry@google.comRESULT_CODE(NORMAL_EXIT, 0)
22ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org
2339e8d93337c7e37d2b09dc710a05a9beefef5c2ccommit-bot@chromium.org// Process was killed by user or system.
2439e8d93337c7e37d2b09dc710a05a9beefef5c2ccommit-bot@chromium.orgRESULT_CODE(KILLED, 1)
2539e8d93337c7e37d2b09dc710a05a9beefef5c2ccommit-bot@chromium.org
2639e8d93337c7e37d2b09dc710a05a9beefef5c2ccommit-bot@chromium.org// Process hung.
2739e8d93337c7e37d2b09dc710a05a9beefef5c2ccommit-bot@chromium.orgRESULT_CODE(HUNG, 2)
28d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com
29d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com// A bad message caused the process termination.
30ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.orgRESULT_CODE(KILLED_BAD_MESSAGE, 3)
31ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org
32ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org#if defined(OS_ANDROID)
33ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org// Failed to register JNI methods.
34d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.comRESULT_CODE(FAILED_TO_REGISTER_JNI, 4)
35ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org
36ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org// Failed to find and load the native library.
37ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.orgRESULT_CODE(NATIVE_LIBRARY_LOAD_FAILED, 5)
38a39874b636f9954c6da335733fed646ba33dd614commit-bot@chromium.org
39a39874b636f9954c6da335733fed646ba33dd614commit-bot@chromium.org// Wrong version of library loaded
40a39874b636f9954c6da335733fed646ba33dd614commit-bot@chromium.orgRESULT_CODE(NATIVE_LIBRARY_WRONG_VERSION, 6)
41a39874b636f9954c6da335733fed646ba33dd614commit-bot@chromium.org
42ef57b7e65330d5f794a513630517907500f1c1d0commit-bot@chromium.org// Native library startup failed
4339e8d93337c7e37d2b09dc710a05a9beefef5c2ccommit-bot@chromium.orgRESULT_CODE(NATIVE_STARTUP_FAILED, 7)
44d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com#endif
45d36522d12d3e71958e50683a7eef43dc2a47d96dmtklein@google.com