[Webkit-unassigned] [Bug 70404] [EFL] Implement port layer of keygen element.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 28 02:40:33 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=70404
--- Comment #17 from Dongwoo Joshua Im <dw.im at samsung.com> 2011-10-28 02:40:24 PST ---
(In reply to comment #14)
> (In reply to comment #12)
> > I use the static variables because I use singletone pattern here.
> >
> > If I use the "DEFINE_STATIC_LOCAL" macro,
> > source code might look like this.
> >
> > SSLPrivateKeyStoreEfl& SSLPrivateKeyStoreEfl::getInstance()
> > {
> > DEFINE_STATIC_LOCAL(SSLPrivateKeyStoreEfl, s_SSLPrivateKeyStoreEfl, ());
> > return s_SSLPrivateKeyStoreEfl;
> > }
> >
> > I don't understand deeply about DEFINE_STATIC_LOCAL,
> > is it secure enough for singtone??
> >
> > Or, do I need to make it as critical section?
>
> If you're in doubt, it's worth taking a look at the macro in Source/JavaScriptCore/wtf/StdLibExtras.h -- the code is very simple.
IMO, I can't use this macro for singletone pattern which I use for KeyStore.
I want only one instance of KeyStore and use it, but this macro will create another instance whenever it is called if I use this macro in the "getInstance" function.
I really think I need to use singletone pattern for the KeyStore without changing WebCore.
(Singletone pattern is also used in Chrome.)
So, I have a question.
Is it prohibited to use static variable without the macro in WebKit?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list