aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/mozilla-download.cpp22
-rw-r--r--embed/mozilla/mozilla-embed-event.cpp2
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp13
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp2
-rw-r--r--embed/mozilla/mozilla-embed.cpp18
5 files changed, 26 insertions, 31 deletions
diff --git a/embed/mozilla/mozilla-download.cpp b/embed/mozilla/mozilla-download.cpp
index 9360de066..48d05ecb2 100644
--- a/embed/mozilla/mozilla-download.cpp
+++ b/embed/mozilla/mozilla-download.cpp
@@ -31,12 +31,9 @@
#include <nsEmbedString.h>
#include <nsMemory.h>
-static void
-mozilla_download_class_init (MozillaDownloadClass *klass);
-static void
-mozilla_download_init (MozillaDownload *ges);
-static void
-mozilla_download_finalize (GObject *object);
+static void mozilla_download_class_init (MozillaDownloadClass *klass);
+static void mozilla_download_init (MozillaDownload *ges);
+static void mozilla_download_finalize (GObject *object);
enum
{
@@ -56,9 +53,9 @@ static GObjectClass *parent_class = NULL;
GType
mozilla_download_get_type (void)
{
- static GType mozilla_download_type = 0;
+ static GType type = 0;
- if (mozilla_download_type == 0)
+ if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
@@ -73,13 +70,12 @@ mozilla_download_get_type (void)
(GInstanceInitFunc) mozilla_download_init
};
- mozilla_download_type =
- g_type_register_static (EPHY_TYPE_DOWNLOAD,
- "MozillaDownload",
- &our_info, (GTypeFlags)0);
+ type = g_type_register_static (EPHY_TYPE_DOWNLOAD,
+ "MozillaDownload",
+ &our_info, (GTypeFlags)0);
}
- return mozilla_download_type;
+ return type;
}
static char *
diff --git a/embed/mozilla/mozilla-embed-event.cpp b/embed/mozilla/mozilla-embed-event.cpp
index bca81e286..d7a4b685c 100644
--- a/embed/mozilla/mozilla-embed-event.cpp
+++ b/embed/mozilla/mozilla-embed-event.cpp
@@ -54,7 +54,7 @@ mozilla_embed_event_get_type (void)
{
static GType type = 0;
- if (type == 0)
+ if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp
index fff6b88e9..4a375abd9 100644
--- a/embed/mozilla/mozilla-embed-persist.cpp
+++ b/embed/mozilla/mozilla-embed-persist.cpp
@@ -62,9 +62,9 @@ static GObjectClass *parent_class = NULL;
GType
mozilla_embed_persist_get_type (void)
{
- static GType mozilla_embed_persist_type = 0;
+ static GType type = 0;
- if (mozilla_embed_persist_type == 0)
+ if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
@@ -79,13 +79,12 @@ mozilla_embed_persist_get_type (void)
(GInstanceInitFunc) mozilla_embed_persist_init
};
- mozilla_embed_persist_type =
- g_type_register_static (EPHY_TYPE_EMBED_PERSIST,
- "MozillaEmbedPersist",
- &our_info, (GTypeFlags)0);
+ type = g_type_register_static (EPHY_TYPE_EMBED_PERSIST,
+ "MozillaEmbedPersist",
+ &our_info, (GTypeFlags) 0);
}
- return mozilla_embed_persist_type;
+ return type;
}
static void
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 756c3c4b5..94cba3dee 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -119,7 +119,7 @@ mozilla_embed_single_get_type (void)
{
static GType type = 0;
- if (type == 0)
+ if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index bf71f361e..f5652be5c 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -128,9 +128,9 @@ ephy_command_manager_iface_init (EphyCommandManagerIface *iface)
GType
mozilla_embed_get_type (void)
{
- static GType mozilla_embed_type = 0;
+ static GType type = 0;
- if (mozilla_embed_type == 0)
+ if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
@@ -159,19 +159,19 @@ mozilla_embed_get_type (void)
NULL
};
- mozilla_embed_type = g_type_register_static (GTK_TYPE_MOZ_EMBED,
- "MozillaEmbed",
- &our_info,
- (GTypeFlags)0);
- g_type_add_interface_static (mozilla_embed_type,
+ type = g_type_register_static (GTK_TYPE_MOZ_EMBED,
+ "MozillaEmbed",
+ &our_info,
+ (GTypeFlags)0);
+ g_type_add_interface_static (type,
EPHY_TYPE_EMBED,
&embed_info);
- g_type_add_interface_static (mozilla_embed_type,
+ g_type_add_interface_static (type,
EPHY_TYPE_COMMAND_MANAGER,
&ephy_command_manager_info);
}
- return mozilla_embed_type;
+ return type;
}
static gboolean