Mercurial > hg > orthanc-stone
view Platforms/Wasm/WasmViewport.cpp @ 973:38409549db43 toa2019082903
Log with addresses + added fingerprint mechanism to avoid calling zombie objects
where:
- a message is sent with a receiver
- the receiver dies
- another receiver with the SAME address is created
- the message reply is executed --> execution on the wrong object!
(since their "identity" is their address. The fix is to identify them with
an UUID stored at creation time)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Thu, 29 Aug 2019 18:07:55 +0200 |
parents | 4f2416d519b4 |
children |
line wrap: on
line source
#include "WasmViewport.h" #include <vector> #include <memory> std::vector<std::shared_ptr<Deprecated::WidgetViewport>> wasmViewports; void AttachWidgetToWasmViewport(const char* htmlCanvasId, Deprecated::IWidget* centralWidget) { std::shared_ptr<Deprecated::WidgetViewport> viewport(CreateWasmViewportFromCpp(htmlCanvasId)); viewport->SetCentralWidget(centralWidget); wasmViewports.push_back(viewport); }