[Issue#] N/A
[Problem] Can't access Tizen device APIs in window.onunload callback if current window is
replaced by another, like "window.open('new.html', '_self', '', true)".
[Cause] Plugin modules are unloaded in didStartProvisionalLoadForFrameCallback, however
unload event is sent out after that.
[Solution] Save frame context and handle it later in didCommitLoadForFrameCallback.
m_scale(0),
m_encodedBundle(""),
m_theme(""),
+ m_willRemoveContext(NULL),
m_encrypted(false),
m_resDec(NULL),
m_widgetType(WrtDB::APP_TYPE_UNKNOWN)
}
This->m_pageContext[page].erase(i);
-
- PluginModule::unloadFrame(context);
+ This->m_willRemoveContext = context;
}
void Bundle::didRemoveFrameFromHierarchyCallback(
return;
}
+ if (This->m_willRemoveContext) {
+ PluginModule::unloadFrame(This->m_willRemoveContext);
+ This->m_willRemoveContext = NULL;
+ }
+
JSGlobalContextRef context = WKBundleFrameGetJavaScriptContext(frame);
This->m_pageContext[page].insert(context);
std::string m_encodedBundle;
std::string m_theme;
std::set<JSGlobalContextRef> m_loadedContext;
+ JSGlobalContextRef m_willRemoveContext;
bool m_encrypted;
WRTDecryptor::ResourceDecryptor *m_resDec;
WrtDB::EncryptedFileList m_encryptedFiles;