mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Backed out changeset 026b0b69ca23 (bug 1364068)
This commit is contained in:
parent
0abfc566c4
commit
7586e917b7
@ -70,14 +70,6 @@ class MachCommands(MachCommandBase):
|
||||
interpolation = { 'server': '%s:%d' % httpd.httpd.server_address,
|
||||
'OOP': 'false'}
|
||||
prefs = json.loads(json.dumps(prefs) % interpolation)
|
||||
# Don't spawn the 'pingsender' process on Valgrind tests due to the
|
||||
# 'new-profile' ping. Valgrind marks the process as leaky (bug 1364068)
|
||||
# but does not provide enough information to suppress the leak. Running
|
||||
# locally does not reproduce the issue, so disable this until we rewrite
|
||||
# the pingsender in Rust (bug 1339035).
|
||||
# We can't do this in 'prefs_general.js' as we want to retain test coverage
|
||||
# on the other testing platforms.
|
||||
prefs['toolkit.telemetry.newProfilePing.enabled'] = False
|
||||
for pref in prefs:
|
||||
prefs[pref] = Preferences.cast(prefs[pref])
|
||||
|
||||
|
@ -156,14 +156,14 @@ int main(int argc, char* argv[])
|
||||
"Send the payload stored in PATH to the specified URL using "
|
||||
"an HTTP POST message\n"
|
||||
"then delete the file after a successful send.\n");
|
||||
return EXIT_FAILURE;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
string ping(ReadPing(pingPath));
|
||||
|
||||
if (ping.empty()) {
|
||||
PINGSENDER_LOG("ERROR: Ping payload is empty\n");
|
||||
return EXIT_FAILURE;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Compress the ping using gzip.
|
||||
@ -174,18 +174,18 @@ int main(int argc, char* argv[])
|
||||
// it compressed.
|
||||
if (gzipPing.empty()) {
|
||||
PINGSENDER_LOG("ERROR: Ping compression failed\n");
|
||||
return EXIT_FAILURE;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!Post(url, gzipPing)) {
|
||||
return EXIT_FAILURE;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// If the ping was successfully sent, delete the file.
|
||||
if (!pingPath.empty() && std::remove(pingPath.c_str())) {
|
||||
// We failed to remove the pending ping file.
|
||||
return EXIT_FAILURE;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ public:
|
||||
void (*slist_free_all)(curl_slist*);
|
||||
const char* (*easy_strerror)(CURLcode);
|
||||
void (*easy_cleanup)(CURL*);
|
||||
void (*global_cleanup)(void);
|
||||
|
||||
private:
|
||||
void* mLib;
|
||||
@ -57,7 +56,6 @@ CurlWrapper::CurlWrapper()
|
||||
, slist_free_all(nullptr)
|
||||
, easy_strerror(nullptr)
|
||||
, easy_cleanup(nullptr)
|
||||
, global_cleanup(nullptr)
|
||||
, mLib(nullptr)
|
||||
, mCurl(nullptr)
|
||||
{}
|
||||
@ -69,10 +67,6 @@ CurlWrapper::~CurlWrapper()
|
||||
easy_cleanup(mCurl);
|
||||
}
|
||||
|
||||
if (global_cleanup) {
|
||||
global_cleanup();
|
||||
}
|
||||
|
||||
dlclose(mLib);
|
||||
}
|
||||
}
|
||||
@ -122,7 +116,6 @@ CurlWrapper::Init()
|
||||
*(void**) (&slist_free_all) = dlsym(mLib, "curl_slist_free_all");
|
||||
*(void**) (&easy_strerror) = dlsym(mLib, "curl_easy_strerror");
|
||||
*(void**) (&easy_cleanup) = dlsym(mLib, "curl_easy_cleanup");
|
||||
*(void**) (&global_cleanup) = dlsym(mLib, "curl_global_cleanup");
|
||||
|
||||
if (!easy_init ||
|
||||
!easy_setopt ||
|
||||
@ -131,8 +124,7 @@ CurlWrapper::Init()
|
||||
!slist_append ||
|
||||
!slist_free_all ||
|
||||
!easy_strerror ||
|
||||
!easy_cleanup ||
|
||||
!global_cleanup) {
|
||||
!easy_cleanup) {
|
||||
PINGSENDER_LOG("ERROR: libcurl is missing one of the required symbols\n");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user