backout some changes we don't want to land from birch

This commit is contained in:
Brad Lassey 2011-12-06 01:56:04 -05:00
Родитель ac7e4b15f3
Коммит 1775607121
9 изменённых файлов: 24 добавлений и 56 удалений

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

@ -4716,7 +4716,6 @@ case "${target}" in
MOZ_THEME_FASTSTRIPE=1
MOZ_TREE_FREETYPE=1
MOZ_MEMORY=1
MOZ_SPELLCHECK=
MOZ_RAW=1
;;
esac

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

@ -4579,9 +4579,6 @@ nsGlobalWindow::Dump(const nsAString& aStr)
nsMemory::Free(cstr);
}
#if defined(ANDROID) && defined(DEBUG)
__android_log_print(ANDROID_LOG_INFO, "GeckoDump", "%s", cstr);
#endif
return NS_OK;
}

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

@ -46,10 +46,6 @@ ifdef ENABLE_TESTS
DIRS += tests
endif
ifdef MOZ_SPELLCHECK
DEFINES += -DMOZ_SPELLCHECK
endif
MODULE = editor
LIBRARY_NAME = editorbase_s
LIBXUL_LIBRARY = 1

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

@ -50,13 +50,9 @@
#include "nsReadableUtils.h"
#include "nsIObserverService.h"
#include "mozilla/Services.h"
#ifdef MOZ_SPELLCHECK
#include "mozISpellCheckingEngine.h"
#include "nsIEditorSpellCheck.h"
#include "mozInlineSpellChecker.h"
#include "nsIInlineSpellChecker.h"
#endif
#include "nsIDOMText.h"
#include "nsIDOMElement.h"
@ -111,6 +107,7 @@
#include "nsEditorUtils.h"
#include "nsEditorEventListener.h"
#include "nsISelectionDisplay.h"
#include "nsIInlineSpellChecker.h"
#include "nsINameSpaceManager.h"
#include "nsIHTMLDocument.h"
#include "nsIParserService.h"
@ -314,14 +311,12 @@ nsEditor::PostCreate()
NotifyDocumentListeners(eDocumentCreated);
NotifyDocumentListeners(eDocumentStateChanged);
#ifdef MOZ_SPELLCHECK
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
if (obs) {
obs->AddObserver(this,
SPELLCHECK_DICTIONARY_UPDATE_NOTIFICATION,
false);
}
#endif
}
// update nsTextStateManager and caret if we have focus
@ -434,13 +429,11 @@ nsEditor::PreDestroy(bool aDestroyingFrames)
if (mDidPreDestroy)
return NS_OK;
#ifdef MOZ_SPELLCHECK
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
if (obs) {
obs->RemoveObserver(this,
SPELLCHECK_DICTIONARY_UPDATE_NOTIFICATION);
}
#endif
// Let spellchecker clean up its observers etc. It is important not to
// actually free the spellchecker here, since the spellchecker could have
@ -1301,7 +1294,6 @@ nsEditor::MarkNodeDirty(nsIDOMNode* aNode)
NS_IMETHODIMP nsEditor::GetInlineSpellChecker(bool autoCreate,
nsIInlineSpellChecker ** aInlineSpellChecker)
{
#ifdef MOZ_SPELLCHECK
NS_ENSURE_ARG_POINTER(aInlineSpellChecker);
if (mDidPreDestroy) {
@ -1334,15 +1326,11 @@ NS_IMETHODIMP nsEditor::GetInlineSpellChecker(bool autoCreate,
NS_IF_ADDREF(*aInlineSpellChecker = mInlineSpellChecker);
return NS_OK;
#else
return NS_ERROR_FAILURE;
#endif
}
NS_IMETHODIMP nsEditor::Observe(nsISupports* aSubj, const char *aTopic,
const PRUnichar *aData)
{
#ifdef MOZ_SPELLCHECK
NS_ASSERTION(!strcmp(aTopic,
SPELLCHECK_DICTIONARY_UPDATE_NOTIFICATION),
"Unexpected observer topic");
@ -1366,9 +1354,6 @@ NS_IMETHODIMP nsEditor::Observe(nsISupports* aSubj, const char *aTopic,
}
return NS_OK;
#else
return NS_OK;
#endif
}
NS_IMETHODIMP nsEditor::SyncRealTimeSpell()

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

@ -624,10 +624,6 @@ report_mapping(char *name, void *base, uint32_t len, uint32_t offset)
extern "C" void simple_linker_init(void);
extern "C" struct timeval timings[2];
#define TIMING_RELOC 0
#define TIMING_CONSTRUCTORS 1
static void
loadLibs(const char *apkName)
{
@ -720,9 +716,6 @@ loadLibs(const char *apkName)
(usage2.ru_utime.tv_sec - usage1.ru_utime.tv_sec)*1000 + (usage2.ru_utime.tv_usec - usage1.ru_utime.tv_usec)/1000,
(usage2.ru_stime.tv_sec - usage1.ru_stime.tv_sec)*1000 + (usage2.ru_stime.tv_usec - usage1.ru_stime.tv_usec)/1000,
usage2.ru_majflt-usage1.ru_majflt);
__android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Spent %dms on relocations, %dms on constructors",
timings[TIMING_RELOC].tv_sec * 1000 + timings[TIMING_RELOC].tv_usec / 1000,
timings[TIMING_CONSTRUCTORS].tv_sec * 1000 + timings[TIMING_CONSTRUCTORS].tv_usec / 1000);
StartupTimeline_Record(LINKER_INITIALIZED, &t0);
StartupTimeline_Record(LIBRARIES_LOADED, &t1);

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

@ -43,6 +43,7 @@ static const char *dl_errors[] = {
#define unlikely(expr) __builtin_expect (expr, 0)
static pthread_mutex_t dl_lock = PTHREAD_MUTEX_INITIALIZER;
extern int extractLibs;
static void set_dlerror(int err)
{
@ -53,6 +54,9 @@ static void set_dlerror(int err)
void *__wrap_dlopen(const char *filename, int flag)
{
if (extractLibs)
return dlopen(filename, flag);
soinfo *ret;
pthread_mutex_lock(&dl_lock);
@ -84,6 +88,9 @@ void *moz_mapped_dlopen(const char *filename, int flag,
const char *__wrap_dlerror(void)
{
if (extractLibs)
return dlerror();
const char *tmp = dl_err_str;
dl_err_str = NULL;
return (const char *)tmp;
@ -91,6 +98,9 @@ const char *__wrap_dlerror(void)
void *__wrap_dlsym(void *handle, const char *symbol)
{
if (extractLibs)
return dlsym(handle, symbol);
soinfo *found;
Elf32_Sym *sym;
unsigned bind;
@ -173,6 +183,9 @@ int __wrap_dladdr(void *addr, Dl_info *info)
int __wrap_dlclose(void *handle)
{
if (extractLibs)
return dlclose(handle);
pthread_mutex_lock(&dl_lock);
(void)unload_library((soinfo*)handle);
pthread_mutex_unlock(&dl_lock);

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

@ -96,10 +96,6 @@ static soinfo *sonext = &libdl_info;
static soinfo *somain; /* main process, always the one after libdl_info */
#endif
/* Keep track of cumulative time spent in relocations and static constructors */
#define TIMING_RELOC 0
#define TIMING_CONSTRUCTORS 1
struct timeval timings[2] = { { 0, 0 }, { 0, 0 } };
/* Set up for the buddy allocator managing the non-prelinked libraries. */
static struct ba_bits ba_nonprelink_bitmap[(LIBLAST - LIBBASE) / LIBINC];
@ -1321,11 +1317,9 @@ soinfo *find_library(const char *name)
}
}
if (strncmp(name, getenv("CACHE_PATH"), strlen(getenv("CACHE_PATH")))) {
si = dlopen(name, RTLD_LAZY);
if (si)
return si;
}
si = dlopen(name, RTLD_LAZY);
if (si)
return si;
TRACE("[ %5d '%s' has not been loaded yet. Locating...]\n", pid, name);
si = load_library(name);
@ -1986,7 +1980,6 @@ static int link_image(soinfo *si, unsigned wr_offset)
unsigned *d;
Elf32_Phdr *phdr = si->phdr;
int phnum = si->phnum;
struct timeval t0, t1;
INFO("[ %5d linking %s ]\n", pid, si->name);
DEBUG("%5d si->base = 0x%08x si->flags = 0x%08x\n", pid,
@ -2188,6 +2181,8 @@ static int link_image(soinfo *si, unsigned wr_offset)
memset(preloads, 0, sizeof(preloads));
for(i = 0; ldpreload_names[i] != NULL; i++) {
soinfo *lsi = find_library(ldpreload_names[i]);
if(lsi == 0)
lsi = dlopen(ldpreload_names[i], RTLD_LAZY);
if(lsi == 0) {
strlcpy(tmp_err_buf, linker_get_error(), sizeof(tmp_err_buf));
DL_ERR("%5d could not load needed library '%s' for '%s' (%s)",
@ -2202,7 +2197,9 @@ static int link_image(soinfo *si, unsigned wr_offset)
for(d = si->dynamic; *d; d += 2) {
if(d[0] == DT_NEEDED){
DEBUG("%5d %s needs %s\n", pid, si->name, si->strtab + d[1]);
soinfo *lsi = find_library(si->strtab + d[1]);
soinfo *lsi = dlopen(si->strtab + d[1], RTLD_LAZY);
if(lsi == 0)
lsi = find_library(si->strtab + d[1]);
if(lsi == 0) {
strlcpy(tmp_err_buf, linker_get_error(), sizeof(tmp_err_buf));
DL_ERR("%5d could not load needed library '%s' for '%s' (%s)",
@ -2221,7 +2218,6 @@ static int link_image(soinfo *si, unsigned wr_offset)
}
}
gettimeofday(&t0, 0);
#ifndef ANDROID_NO_RUNTIME_RELOC
/* Initialize GOT[1] and GOT[2], which are used by the PLT trampoline */
Elf32_Addr *got = (Elf32_Addr *)si->plt_got;
@ -2268,10 +2264,6 @@ static int link_image(soinfo *si, unsigned wr_offset)
si->flags |= FLAG_LINKED;
DEBUG("[ %5d finished linking %s ]\n", pid, si->name);
gettimeofday(&t1, 0);
timings[TIMING_RELOC].tv_usec += t1.tv_usec - t0.tv_usec;
timings[TIMING_RELOC].tv_sec += t1.tv_sec - t0.tv_sec;
#if 0
/* This is the way that the old dynamic linker did protection of
* non-writable areas. It would scan section headers and find where
@ -2306,12 +2298,7 @@ static int link_image(soinfo *si, unsigned wr_offset)
*/
if (getuid() != geteuid() || getgid() != getegid())
nullify_closed_stdio ();
gettimeofday(&t0, 0);
call_constructors(si);
gettimeofday(&t1, 0);
timings[TIMING_CONSTRUCTORS].tv_usec += t1.tv_usec - t0.tv_usec;
timings[TIMING_CONSTRUCTORS].tv_sec += t1.tv_sec - t0.tv_sec;
notify_gdb_of_load(si);
return 0;

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

@ -304,6 +304,7 @@ endif
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
COMPONENT_LIBS += widget_android
STATIC_LIBS += skia_npapi
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
@ -312,10 +313,7 @@ endif
STATIC_LIBS += thebes gl ycbcr
ifeq ($(OS_TARGET),Android)
COMPONENT_LIBS += profiler
STATIC_LIBS += skia_npapi
endif
STATIC_LIBS += angle

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

@ -105,8 +105,8 @@ bool
AndroidBridge::Init(JNIEnv *jEnv,
jclass jGeckoAppShellClass)
{
ALOG_BRIDGE("AndroidBridge::Init");
jEnv->GetJavaVM(&mJavaVM);
ALOG_BRIDGE("AndroidBridge::Init1");
mJNIEnv = nsnull;
mThread = nsnull;