Skip to content

Commit

Permalink
Implement alternative to deprecated and now removed function
Browse files Browse the repository at this point in the history
  • Loading branch information
jerbob92 committed Jun 19, 2024
1 parent 56eb98d commit 5f9fc8d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webassembly/webassembly.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ func Init(config Config) (pdfium.Pool, error) {
config.RuntimeConfig = wazero.NewRuntimeConfig()
}

poolContext := context.WithValue(context.Background(), experimental.FunctionListenerFactoryKey{}, logging.NewLoggingListenerFactory(os.Stdout))
poolContext := experimental.WithFunctionListenerFactory(context.Background(), logging.NewLoggingListenerFactory(os.Stdout))

// Uncomment the line below if you want function call logging,
// useful for debugging.
poolContext = context.Background()

runtime := wazero.NewRuntimeWithConfig(poolContext, config.RuntimeConfig)
Expand Down

0 comments on commit 5f9fc8d

Please sign in to comment.