Bug 1317726 - sdp_file_parser should not depend on xpcom glue; r=drno

MozReview-Commit-ID: KDv3RzGurQx

--HG--
extra : rebase_source : a72246ebe3bc520855a37a001752230b25316153
extra : amend_source : 0e3a7509e013cc55d50227d07203a29ee55d6a6f
This commit is contained in:
Dan Minor 2016-11-15 11:53:47 -05:00
Родитель a2ede4255a
Коммит af46587aa3
4 изменённых файлов: 21 добавлений и 6 удалений

Просмотреть файл

@ -3,9 +3,9 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'uikit':
if CONFIG['OS_TARGET'] == 'Linux' or CONFIG['OS_TARGET'] == 'Darwin':
DISABLE_STL_WRAPPING = True
DEFINES['CPR_STRING_USE_FALLIBLE_MALLOC'] = True
DEFINES['MOZ_NO_MOZALLOC'] = True
if CONFIG['OS_TARGET'] == 'Darwin':
@ -21,7 +21,7 @@ if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk' and
USE_LIBS += [
'/media/webrtc/trunk/testing/gtest_gtest/gtest',
'nspr'
'nspr',
]
SOURCES = [
@ -45,4 +45,4 @@ if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk' and
'sdp_file_parser.cpp',
]
GeckoProgram('sdp_file_parser')
Program('sdp_file_parser')

Просмотреть файл

@ -26,6 +26,16 @@ void CSFLog(CSFLogLevel priority, const char* sourceFile, int sourceLine, const
va_end(ap);
}
extern "C" {
void NS_DebugBreak(uint32_t aSeverity,
const char* aStr, const char* aExpr,
const char* aFile, int32_t aLine)
{
fprintf(stderr, "NS_DebugBreak: %u %s %s %s %u", aSeverity, aStr, aExpr,
aFile, aLine);
}
} // end extern "C".
namespace mozilla {
enum class LogLevel {

Просмотреть файл

@ -10,13 +10,19 @@
#include "cpr_strings.h"
/* From cpr_stdlib.h */
#ifdef CPR_STRING_USE_FALLIBLE_MALLOC
#define cpr_malloc(a) malloc(a)
#define cpr_calloc(a, b) calloc(a, b)
#define cpr_realloc(a, b) realloc(a, b)
#define cpr_free(a) free(a)
#else
#include "mozilla/mozalloc.h"
#define cpr_malloc(a) moz_xmalloc(a)
#define cpr_calloc(a, b) moz_xcalloc(a, b)
#define cpr_realloc(a, b) moz_xrealloc(a, b)
#define cpr_free(a) free(a)
#endif
/**
* sstrncpy

Просмотреть файл

@ -123,7 +123,6 @@ ALLOWED_XPCOM_GLUE = {
('testcrasher', 'toolkit/crashreporter/test'),
('mediaconduit_unittests', 'media/webrtc/signaling/test'),
('mediapipeline_unittest', 'media/webrtc/signaling/test'),
('sdp_file_parser', 'media/webrtc/signaling/fuzztest'),
('signaling_unittests', 'media/webrtc/signaling/test'),
('TestMailCookie', 'mailnews/base/test'),
('calbasecomps', 'calendar/base/backend/libical/build'),