зеркало из 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
|
||||
XPIDL_MODULE = jssh
|
||||
LIBRARY_NAME = jssh
|
||||
# EXPORT_LIBRARY = 1
|
||||
FORCE_SHARED_LIB= 1
|
||||
EXPORT_LIBRARY = 1
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsJSShServerModule
|
||||
MOZILLA_INTERNAL_API = 1
|
||||
MODULE_NAME = nsJSShModule
|
||||
|
||||
REQUIRES = \
|
||||
xpcom \
|
||||
|
@ -35,10 +33,9 @@ XPIDLSRCS = nsIJSShServer.idl \
|
|||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(XPCOM_GLUE_LIBS) \
|
||||
$(XPCOM_GLUE_LDOPTS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_COMPONENTS = nsJSShStarter.js
|
||||
|
@ -47,9 +44,6 @@ include $(topsrcdir)/config/rules.mk
|
|||
|
||||
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::
|
||||
|
|
|
@ -42,11 +42,13 @@
|
|||
#include "nsIXPConnect.h"
|
||||
#include "nsIProxyObjectManager.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsDependentString.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "nsMemory.h"
|
||||
|
||||
//**********************************************************************
|
||||
// Javascript Environment
|
||||
|
@ -463,7 +465,9 @@ NS_IMETHODIMP nsJSSh::Run()
|
|||
{
|
||||
nsCOMPtr<nsIJSSh> proxied_shell;
|
||||
if (!NS_IsMainThread()) {
|
||||
NS_GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
|
||||
nsCOMPtr<nsIProxyObjectManager> pom = do_GetService(NS_XPCOMPROXY_CONTRACTID);
|
||||
NS_ASSERTION(pom, "uh-oh, no proxy object manager!");
|
||||
pom->GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
|
||||
NS_GET_IID(nsIJSSh),
|
||||
(nsIJSSh*)this,
|
||||
NS_PROXY_SYNC,
|
||||
|
@ -480,7 +484,7 @@ NS_IMETHODIMP nsJSSh::Run()
|
|||
if (mInput) {
|
||||
// read-eval-print loop
|
||||
PRUint32 bytesWritten;
|
||||
if (mOutput && mProtocol != NS_LITERAL_CSTRING("plain"))
|
||||
if (mOutput && !mProtocol.Equals(NS_LITERAL_CSTRING("plain")))
|
||||
mOutput->Write(gWelcome, strlen(gWelcome), &bytesWritten);
|
||||
|
||||
while (!mQuit) {
|
||||
|
@ -522,7 +526,9 @@ NS_IMETHODIMP nsJSSh::Run()
|
|||
// Shutdown the current thread, which must be done from the main thread.
|
||||
nsCOMPtr<nsIThread> thread = do_GetCurrentThread();
|
||||
nsCOMPtr<nsIThread> proxied_thread;
|
||||
NS_GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
|
||||
nsCOMPtr<nsIProxyObjectManager> pom = do_GetService(NS_XPCOMPROXY_CONTRACTID);
|
||||
NS_ASSERTION(pom, "uh-oh, no proxy object manager!");
|
||||
pom->GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
|
||||
NS_GET_IID(nsIThread),
|
||||
thread.get(),
|
||||
NS_PROXY_ASYNC,
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include "nsIJSSh.h"
|
||||
#include "nsIJSContextStack.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsString.h"
|
||||
#include "nsStringAPI.h"
|
||||
#include "nsIScriptObjectPrincipal.h"
|
||||
#include "nsIXPCScriptable.h"
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "nsIOutputStream.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsJSSh.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
//**********************************************************************
|
||||
// ConnectionListener helper class
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "nsIJSShServer.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServerSocket.h"
|
||||
#include "nsString.h"
|
||||
#include "nsStringAPI.h"
|
||||
|
||||
class nsJSShServer : public nsIJSShServer
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче