зеркало из https://github.com/mozilla/gecko-dev.git
Switch jssh to frozen linkage. Not part of default builds.
This commit is contained in:
Родитель
1e4569a8bc
Коммит
f1b71c1fe8
|
@ -8,11 +8,9 @@ include $(DEPTH)/config/autoconf.mk
|
||||||
MODULE = jssh
|
MODULE = jssh
|
||||||
XPIDL_MODULE = jssh
|
XPIDL_MODULE = jssh
|
||||||
LIBRARY_NAME = jssh
|
LIBRARY_NAME = jssh
|
||||||
# EXPORT_LIBRARY = 1
|
EXPORT_LIBRARY = 1
|
||||||
FORCE_SHARED_LIB= 1
|
|
||||||
IS_COMPONENT = 1
|
IS_COMPONENT = 1
|
||||||
MODULE_NAME = nsJSShServerModule
|
MODULE_NAME = nsJSShModule
|
||||||
MOZILLA_INTERNAL_API = 1
|
|
||||||
|
|
||||||
REQUIRES = \
|
REQUIRES = \
|
||||||
xpcom \
|
xpcom \
|
||||||
|
@ -35,10 +33,9 @@ XPIDLSRCS = nsIJSShServer.idl \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
EXTRA_DSO_LDOPTS = \
|
EXTRA_DSO_LDOPTS = \
|
||||||
$(XPCOM_GLUE_LIBS) \
|
$(XPCOM_GLUE_LDOPTS) \
|
||||||
$(NSPR_LIBS) \
|
$(NSPR_LIBS) \
|
||||||
$(MOZ_JS_LIBS) \
|
$(MOZ_JS_LIBS) \
|
||||||
$(XPCOM_LIBS) \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
EXTRA_COMPONENTS = nsJSShStarter.js
|
EXTRA_COMPONENTS = nsJSShStarter.js
|
||||||
|
@ -47,9 +44,6 @@ include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
DEFINES += -DJS_THREADSAFE
|
DEFINES += -DJS_THREADSAFE
|
||||||
|
|
||||||
# XXX this doesn't work anymore; possibly because of bsmedberg's checkin for bug#2888370 or thereabouts
|
|
||||||
#DEFINES += -DXPCOM_GLUE
|
|
||||||
|
|
||||||
XPI_FILE = jssh-$(shell date +%Y%m%d)-$(OS_ARCH).xpi
|
XPI_FILE = jssh-$(shell date +%Y%m%d)-$(OS_ARCH).xpi
|
||||||
|
|
||||||
xpi::
|
xpi::
|
||||||
|
|
|
@ -42,11 +42,13 @@
|
||||||
#include "nsIXPConnect.h"
|
#include "nsIXPConnect.h"
|
||||||
#include "nsIProxyObjectManager.h"
|
#include "nsIProxyObjectManager.h"
|
||||||
#include "nsIScriptSecurityManager.h"
|
#include "nsIScriptSecurityManager.h"
|
||||||
#include "nsDependentString.h"
|
|
||||||
#include "nsIIOService.h"
|
#include "nsIIOService.h"
|
||||||
#include "nsNetCID.h"
|
#include "nsNetCID.h"
|
||||||
#include "nsIChannel.h"
|
#include "nsIChannel.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
|
#include "nsServiceManagerUtils.h"
|
||||||
|
#include "nsXPCOMCIDInternal.h"
|
||||||
|
#include "nsMemory.h"
|
||||||
|
|
||||||
//**********************************************************************
|
//**********************************************************************
|
||||||
// Javascript Environment
|
// Javascript Environment
|
||||||
|
@ -463,11 +465,13 @@ NS_IMETHODIMP nsJSSh::Run()
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIJSSh> proxied_shell;
|
nsCOMPtr<nsIJSSh> proxied_shell;
|
||||||
if (!NS_IsMainThread()) {
|
if (!NS_IsMainThread()) {
|
||||||
NS_GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
|
nsCOMPtr<nsIProxyObjectManager> pom = do_GetService(NS_XPCOMPROXY_CONTRACTID);
|
||||||
NS_GET_IID(nsIJSSh),
|
NS_ASSERTION(pom, "uh-oh, no proxy object manager!");
|
||||||
(nsIJSSh*)this,
|
pom->GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
|
||||||
NS_PROXY_SYNC,
|
NS_GET_IID(nsIJSSh),
|
||||||
getter_AddRefs(proxied_shell));
|
(nsIJSSh*)this,
|
||||||
|
NS_PROXY_SYNC,
|
||||||
|
getter_AddRefs(proxied_shell));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -480,7 +484,7 @@ NS_IMETHODIMP nsJSSh::Run()
|
||||||
if (mInput) {
|
if (mInput) {
|
||||||
// read-eval-print loop
|
// read-eval-print loop
|
||||||
PRUint32 bytesWritten;
|
PRUint32 bytesWritten;
|
||||||
if (mOutput && mProtocol != NS_LITERAL_CSTRING("plain"))
|
if (mOutput && !mProtocol.Equals(NS_LITERAL_CSTRING("plain")))
|
||||||
mOutput->Write(gWelcome, strlen(gWelcome), &bytesWritten);
|
mOutput->Write(gWelcome, strlen(gWelcome), &bytesWritten);
|
||||||
|
|
||||||
while (!mQuit) {
|
while (!mQuit) {
|
||||||
|
@ -522,11 +526,13 @@ NS_IMETHODIMP nsJSSh::Run()
|
||||||
// Shutdown the current thread, which must be done from the main thread.
|
// Shutdown the current thread, which must be done from the main thread.
|
||||||
nsCOMPtr<nsIThread> thread = do_GetCurrentThread();
|
nsCOMPtr<nsIThread> thread = do_GetCurrentThread();
|
||||||
nsCOMPtr<nsIThread> proxied_thread;
|
nsCOMPtr<nsIThread> proxied_thread;
|
||||||
NS_GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
|
nsCOMPtr<nsIProxyObjectManager> pom = do_GetService(NS_XPCOMPROXY_CONTRACTID);
|
||||||
NS_GET_IID(nsIThread),
|
NS_ASSERTION(pom, "uh-oh, no proxy object manager!");
|
||||||
thread.get(),
|
pom->GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
|
||||||
NS_PROXY_ASYNC,
|
NS_GET_IID(nsIThread),
|
||||||
getter_AddRefs(proxied_thread));
|
thread.get(),
|
||||||
|
NS_PROXY_ASYNC,
|
||||||
|
getter_AddRefs(proxied_thread));
|
||||||
if (proxied_thread)
|
if (proxied_thread)
|
||||||
proxied_thread->Shutdown();
|
proxied_thread->Shutdown();
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
#include "nsIJSSh.h"
|
#include "nsIJSSh.h"
|
||||||
#include "nsIJSContextStack.h"
|
#include "nsIJSContextStack.h"
|
||||||
#include "nsIPrincipal.h"
|
#include "nsIPrincipal.h"
|
||||||
#include "nsString.h"
|
#include "nsStringAPI.h"
|
||||||
#include "nsIScriptObjectPrincipal.h"
|
#include "nsIScriptObjectPrincipal.h"
|
||||||
#include "nsIXPCScriptable.h"
|
#include "nsIXPCScriptable.h"
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "nsIOutputStream.h"
|
#include "nsIOutputStream.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
#include "nsJSSh.h"
|
#include "nsJSSh.h"
|
||||||
|
#include "nsComponentManagerUtils.h"
|
||||||
|
|
||||||
//**********************************************************************
|
//**********************************************************************
|
||||||
// ConnectionListener helper class
|
// ConnectionListener helper class
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#include "nsIJSShServer.h"
|
#include "nsIJSShServer.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsIServerSocket.h"
|
#include "nsIServerSocket.h"
|
||||||
#include "nsString.h"
|
#include "nsStringAPI.h"
|
||||||
|
|
||||||
class nsJSShServer : public nsIJSShServer
|
class nsJSShServer : public nsIJSShServer
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче