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
a59cc1a6
Commit
a59cc1a6
authored
Jan 04, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: COM cleanup for the nsIFactory iface.
parent
95d8566a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
nsservice.c
dlls/mshtml/nsservice.c
+14
-15
No files found.
dlls/mshtml/nsservice.c
View file @
a59cc1a6
...
...
@@ -377,27 +377,28 @@ static const nsITooltipTextProviderVtbl nsTooltipTextProviderVtbl = {
static
nsITooltipTextProvider
nsTooltipTextProvider
=
{
&
nsTooltipTextProviderVtbl
};
typedef
struct
{
const
nsIFactoryVtbl
*
lpFactoryVtbl
;
nsIFactory
nsIFactory_iface
;
nsISupports
*
service
;
}
nsServiceFactory
;
#define NSFACTORY(x) ((nsIFactory*) &(x)->lpFactoryVtbl)
#define NSFACTORY_THIS(iface) DEFINE_THIS(nsServiceFactory, Factory, iface)
static
inline
nsServiceFactory
*
impl_from_nsIFactory
(
nsIFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
nsServiceFactory
,
nsIFactory_iface
);
}
static
nsresult
NSAPI
nsServiceFactory_QueryInterface
(
nsIFactory
*
iface
,
nsIIDRef
riid
,
void
**
result
)
{
nsServiceFactory
*
This
=
NSFACTORY_THIS
(
iface
);
nsServiceFactory
*
This
=
impl_from_nsIFactory
(
iface
);
*
result
=
NULL
;
if
(
IsEqualGUID
(
&
IID_nsISupports
,
riid
))
{
TRACE
(
"(%p)->(IID_nsISupports %p)
\n
"
,
This
,
result
);
*
result
=
NSFACTORY
(
This
)
;
*
result
=
&
This
->
nsIFactory_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_nsIFactory
,
riid
))
{
TRACE
(
"(%p)->(IID_nsIFactory %p)
\n
"
,
This
,
result
);
*
result
=
NSFACTORY
(
This
)
;
*
result
=
&
This
->
nsIFactory_iface
;
}
if
(
*
result
)
...
...
@@ -420,7 +421,7 @@ static nsrefcnt NSAPI nsServiceFactory_Release(nsIFactory *iface)
static
nsresult
NSAPI
nsServiceFactory_CreateInstance
(
nsIFactory
*
iface
,
nsISupports
*
aOuter
,
const
nsIID
*
iid
,
void
**
result
)
{
nsServiceFactory
*
This
=
NSFACTORY_THIS
(
iface
);
nsServiceFactory
*
This
=
impl_from_nsIFactory
(
iface
);
TRACE
(
"(%p)->(%p %s %p)
\n
"
,
This
,
aOuter
,
debugstr_guid
(
iid
),
result
);
...
...
@@ -429,13 +430,11 @@ static nsresult NSAPI nsServiceFactory_CreateInstance(nsIFactory *iface,
static
nsresult
NSAPI
nsServiceFactory_LockFactory
(
nsIFactory
*
iface
,
PRBool
lock
)
{
nsServiceFactory
*
This
=
NSFACTORY_THIS
(
iface
);
nsServiceFactory
*
This
=
impl_from_nsIFactory
(
iface
);
WARN
(
"(%p)->(%x)
\n
"
,
This
,
lock
);
return
NS_OK
;
}
#undef NSFACTORY_THIS
static
const
nsIFactoryVtbl
nsServiceFactoryVtbl
=
{
nsServiceFactory_QueryInterface
,
nsServiceFactory_AddRef
,
...
...
@@ -445,12 +444,12 @@ static const nsIFactoryVtbl nsServiceFactoryVtbl = {
};
static
nsServiceFactory
nsPromptServiceFactory
=
{
&
nsServiceFactoryVtbl
,
{
&
nsServiceFactoryVtbl
}
,
(
nsISupports
*
)
&
nsPromptService
};
static
nsServiceFactory
nsTooltipTextFactory
=
{
&
nsServiceFactoryVtbl
,
{
&
nsServiceFactoryVtbl
}
,
(
nsISupports
*
)
&
nsTooltipTextProvider
};
...
...
@@ -460,7 +459,7 @@ void register_nsservice(nsIComponentRegistrar *registrar, nsIServiceManager *ser
nsresult
nsres
;
nsres
=
nsIComponentRegistrar_RegisterFactory
(
registrar
,
&
NS_PROMPTSERVICE_CID
,
"Prompt Service"
,
NS_PROMPTSERVICE_CONTRACTID
,
NSFACTORY
(
&
nsPromptServiceFactory
)
);
"Prompt Service"
,
NS_PROMPTSERVICE_CONTRACTID
,
&
nsPromptServiceFactory
.
nsIFactory_iface
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"RegisterFactory failed: %08x
\n
"
,
nsres
);
...
...
@@ -478,7 +477,7 @@ void register_nsservice(nsIComponentRegistrar *registrar, nsIServiceManager *ser
nsres
=
nsIComponentRegistrar_RegisterFactory
(
registrar
,
&
NS_TOOLTIPTEXTPROVIDER_CID
,
NS_TOOLTIPTEXTPROVIDER_CLASSNAME
,
NS_TOOLTIPTEXTPROVIDER_CONTRACTID
,
NSFACTORY
(
&
nsTooltipTextFactory
)
);
&
nsTooltipTextFactory
.
nsIFactory_iface
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"RegisterFactory failed: %08x
\n
"
,
nsres
);
}
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