diff --git a/GI/WebKit2WebExtension/Objects/Frame.hs b/GI/WebKit2WebExtension/Objects/Frame.hs
--- a/GI/WebKit2WebExtension/Objects/Frame.hs
+++ b/GI/WebKit2WebExtension/Objects/Frame.hs
@@ -141,8 +141,7 @@
     let world' = unsafeManagedPtrCastPtr world
     result <- webkit_frame_get_javascript_context_for_script_world _obj' world'
     checkUnexpectedReturnNULL "webkit_frame_get_javascript_context_for_script_world" result
-    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
-    result' <- (\x -> JavaScriptCore.GlobalContext <$> newForeignPtr_ x) result
+    result' <- (newPtr JavaScriptCore.GlobalContext) result
     touchManagedPtr _obj
     touchManagedPtr world
     return result'
@@ -172,8 +171,7 @@
     let _obj' = unsafeManagedPtrCastPtr _obj
     result <- webkit_frame_get_javascript_global_context _obj'
     checkUnexpectedReturnNULL "webkit_frame_get_javascript_global_context" result
-    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
-    result' <- (\x -> JavaScriptCore.GlobalContext <$> newForeignPtr_ x) result
+    result' <- (newPtr JavaScriptCore.GlobalContext) result
     touchManagedPtr _obj
     return result'
 
diff --git a/GI/WebKit2WebExtension/Structs/ContextMenuItem_.hs b/GI/WebKit2WebExtension/Structs/ContextMenuItem_.hs
--- a/GI/WebKit2WebExtension/Structs/ContextMenuItem_.hs
+++ b/GI/WebKit2WebExtension/Structs/ContextMenuItem_.hs
@@ -39,9 +39,14 @@
 import qualified GI.GObject as GObject
 
 newtype ContextMenuItem_ = ContextMenuItem_ (ForeignPtr ContextMenuItem_)
+instance WrappedPtr ContextMenuItem_ where
+    wrappedPtrCalloc = callocBytes 32
+    wrappedPtrCopy = copyPtr 32
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `ContextMenuItem_` struct initialized to zero.
 newZeroContextMenuItem_ :: MonadIO m => m ContextMenuItem_
-newZeroContextMenuItem_ = liftIO $ callocBytes 32 >>= wrapPtr ContextMenuItem_
+newZeroContextMenuItem_ = liftIO $ wrappedPtrCalloc >>= wrapPtr ContextMenuItem_
 
 instance tag ~ 'AttrSet => Constructible ContextMenuItem_ tag where
     new _ attrs = do
diff --git a/GI/WebKit2WebExtension/Structs/ContextMenuItem_.hs-boot b/GI/WebKit2WebExtension/Structs/ContextMenuItem_.hs-boot
--- a/GI/WebKit2WebExtension/Structs/ContextMenuItem_.hs-boot
+++ b/GI/WebKit2WebExtension/Structs/ContextMenuItem_.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype ContextMenuItem_ = ContextMenuItem_ (ForeignPtr ContextMenuItem_)
+instance WrappedPtr ContextMenuItem_ where
diff --git a/GI/WebKit2WebExtension/Structs/ContextMenu_.hs b/GI/WebKit2WebExtension/Structs/ContextMenu_.hs
--- a/GI/WebKit2WebExtension/Structs/ContextMenu_.hs
+++ b/GI/WebKit2WebExtension/Structs/ContextMenu_.hs
@@ -39,9 +39,14 @@
 import qualified GI.GObject as GObject
 
 newtype ContextMenu_ = ContextMenu_ (ForeignPtr ContextMenu_)
+instance WrappedPtr ContextMenu_ where
+    wrappedPtrCalloc = callocBytes 32
+    wrappedPtrCopy = copyPtr 32
+    wrappedPtrFree = Just ptr_to_g_free
+
 -- | Construct a `ContextMenu_` struct initialized to zero.
 newZeroContextMenu_ :: MonadIO m => m ContextMenu_
-newZeroContextMenu_ = liftIO $ callocBytes 32 >>= wrapPtr ContextMenu_
+newZeroContextMenu_ = liftIO $ wrappedPtrCalloc >>= wrapPtr ContextMenu_
 
 instance tag ~ 'AttrSet => Constructible ContextMenu_ tag where
     new _ attrs = do
diff --git a/GI/WebKit2WebExtension/Structs/ContextMenu_.hs-boot b/GI/WebKit2WebExtension/Structs/ContextMenu_.hs-boot
--- a/GI/WebKit2WebExtension/Structs/ContextMenu_.hs-boot
+++ b/GI/WebKit2WebExtension/Structs/ContextMenu_.hs-boot
@@ -8,3 +8,4 @@
 import qualified Data.Map as Map
 
 newtype ContextMenu_ = ContextMenu_ (ForeignPtr ContextMenu_)
+instance WrappedPtr ContextMenu_ where
diff --git a/gi-webkit2webextension.cabal b/gi-webkit2webextension.cabal
--- a/gi-webkit2webextension.cabal
+++ b/gi-webkit2webextension.cabal
@@ -1,6 +1,6 @@
 -- Autogenerated, do not edit.
 name:               gi-webkit2webextension
-version:            0.2.12.14
+version:            0.2.12.15
 synopsis:           WebKit2WebExtension bindings
 description:        Bindings for WebKit2WebExtension, autogenerated by haskell-gi.
 homepage:           https://github.com/haskell-gi/haskell-gi
@@ -141,11 +141,11 @@
                         GI.WebKit2WebExtension.Structs.ContextMenu_
     pkgconfig-depends:  webkit2gtk-web-extension-4.0 >= 2.12
     build-depends: base >= 4.7 && <5,
-        haskell-gi-base >= 0.14 && < 1,
-        gi-gobject >= 0.2.46.14 && < 0.2.47,
-        gi-gtk >= 0.3.18.14 && < 0.3.19,
-        gi-javascriptcore >= 0.2.12.14 && < 0.2.13,
-        gi-soup >= 0.2.52.14 && < 0.2.53,
+        haskell-gi-base >= 0.15 && < 1,
+        gi-gobject >= 0.2.46.15 && < 0.2.47,
+        gi-gtk >= 0.3.18.15 && < 0.3.19,
+        gi-javascriptcore >= 0.2.12.15 && < 0.2.13,
+        gi-soup >= 0.2.52.15 && < 0.2.53,
         bytestring >= 0.10,
         containers >= 0.5,
         text >= 1.0,
