Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ba00e8e0
Commit
ba00e8e0
authored
Apr 16, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use NS_Alloc and NS_Free directly instead of via nsIMemory.
parent
20b2e1bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
27 deletions
+6
-27
nsembed.c
dlls/mshtml/nsembed.c
+6
-12
nsiface.idl
dlls/mshtml/nsiface.idl
+0
-15
No files found.
dlls/mshtml/nsembed.c
View file @
ba00e8e0
...
...
@@ -42,7 +42,6 @@ WINE_DECLARE_DEBUG_CHANNEL(gecko);
#define NS_APPSTARTUPNOTIFIER_CONTRACTID "@mozilla.org/embedcomp/appstartup-notifier;1"
#define NS_WEBBROWSER_CONTRACTID "@mozilla.org/embedding/browser/nsWebBrowser;1"
#define NS_MEMORY_CONTRACTID "@mozilla.org/xpcom/memory-service;1"
#define NS_COMMANDPARAMS_CONTRACTID "@mozilla.org/embedcomp/command-params;1"
#define NS_HTMLSERIALIZER_CONTRACTID "@mozilla.org/layout/contentserializer;1?mimetype=text/html"
#define NS_EDITORCONTROLLER_CONTRACTID "@mozilla.org/editor/editorcontroller;1"
...
...
@@ -69,13 +68,14 @@ static nsresult (CDECL *NS_CStringSetData)(nsACString*,const char*,PRUint32);
static
nsresult
(
CDECL
*
NS_NewLocalFile
)(
const
nsAString
*
,
cpp_bool
,
nsIFile
**
);
static
PRUint32
(
CDECL
*
NS_StringGetData
)(
const
nsAString
*
,
const
PRUnichar
**
,
cpp_bool
*
);
static
PRUint32
(
CDECL
*
NS_CStringGetData
)(
const
nsACString
*
,
const
char
**
,
cpp_bool
*
);
static
void
*
(
CDECL
*
NS_Alloc
)(
SIZE_T
);
static
void
(
CDECL
*
NS_Free
)(
void
*
);
static
HINSTANCE
xul_handle
=
NULL
;
static
nsIServiceManager
*
pServMgr
=
NULL
;
static
nsIComponentManager
*
pCompMgr
=
NULL
;
static
nsICategoryManager
*
cat_mgr
;
static
nsIMemory
*
nsmem
=
NULL
;
static
nsIFile
*
profile_directory
,
*
plugin_directory
;
static
const
WCHAR
wszNsContainer
[]
=
{
'N'
,
's'
,
'C'
,
'o'
,
'n'
,
't'
,
'a'
,
'i'
,
'n'
,
'e'
,
'r'
,
0
};
...
...
@@ -516,6 +516,8 @@ static BOOL load_xul(const PRUnichar *gre_path)
NS_DLSYM
(
NS_NewLocalFile
);
NS_DLSYM
(
NS_StringGetData
);
NS_DLSYM
(
NS_CStringGetData
);
NS_DLSYM
(
NS_Alloc
);
NS_DLSYM
(
NS_Free
);
#undef NS_DLSYM
...
...
@@ -733,11 +735,6 @@ static BOOL init_xpcom(const PRUnichar *gre_path)
init_mutation
(
pCompMgr
);
set_preferences
();
nsres
=
nsIComponentManager_CreateInstanceByContractID
(
pCompMgr
,
NS_MEMORY_CONTRACTID
,
NULL
,
&
IID_nsIMemory
,
(
void
**
)
&
nsmem
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsIMemory: %08x
\n
"
,
nsres
);
nsres
=
nsIServiceManager_GetServiceByContractID
(
pServMgr
,
NS_CATEGORYMANAGER_CONTRACTID
,
&
IID_nsICategoryManager
,
(
void
**
)
&
cat_mgr
);
if
(
NS_FAILED
(
nsres
))
...
...
@@ -796,12 +793,12 @@ BOOL load_gecko(void)
void
*
nsalloc
(
size_t
size
)
{
return
nsIMemory_Alloc
(
nsmem
,
size
);
return
NS_Alloc
(
size
);
}
void
nsfree
(
void
*
mem
)
{
nsIMemory_Free
(
nsmem
,
mem
);
NS_Free
(
mem
);
}
static
BOOL
nsACString_Init
(
nsACString
*
str
,
const
char
*
data
)
...
...
@@ -1118,9 +1115,6 @@ void close_gecko(void)
if
(
cat_mgr
)
nsICategoryManager_Release
(
cat_mgr
);
if
(
nsmem
)
nsIMemory_Release
(
nsmem
);
/* Gecko doesn't really support being unloaded */
/* if (hXPCOM) FreeLibrary(hXPCOM); */
...
...
dlls/mshtml/nsiface.idl
View file @
ba00e8e0
...
...
@@ -227,21 +227,6 @@ interface nsIFactory : nsISupports
[
object,
uuid(6aef11c4-8615-44a6-9711-98f43805693d),
local
]
interface nsIMemory : nsISupports
{
void *Alloc(/*size_t*/ int size);
void *Realloc(void *_ptr, /*size_t*/ int newSize);
void Free(void *_ptr);
nsresult HeapMinimize(bool immediate);
nsresult IsLowMemory(bool *_retval);
nsresult IsLowMemoryPlatform(bool *_retval);
}
[
object,
uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf),
local
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment