Skip to content

Commit

Permalink
Disable json message (de)serialization from TabChildHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
rainemak committed Dec 19, 2016
1 parent b274d7e commit 38e27cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion embedding/embedlite/utils/TabChildHelper.cpp
Expand Up @@ -340,10 +340,12 @@ TabChildHelper::DoSendBlockingMessage(JSContext* aCx,
JSContext* cx = mTabChildGlobal->GetJSContextForEventHandlers();
JSAutoRequest ar(cx);

return false;
// FIXME: Need callback interface for simple JSON to avoid useless conversion here
#if 0
JS::Rooted<JS::Value> rval(cx, JS::NullValue());
if (aData.mDataLength &&
!ReadStructuredClone(cx, aData, &rval)) {
!ReadStructuredClone(cx, aData, &rval)) { // JS_ReadStructuredClone
JS_ClearPendingException(cx);
return false;
}
Expand All @@ -360,6 +362,7 @@ TabChildHelper::DoSendBlockingMessage(JSContext* aCx,
}

return mView->DoCallRpcMessage(nsString(aMessage).get(), json.get(), &jsonRetVal);
#endif
}

nsresult TabChildHelper::DoSendAsyncMessage(JSContext* aCx,
Expand All @@ -368,6 +371,7 @@ nsresult TabChildHelper::DoSendAsyncMessage(JSContext* aCx,
JS::Handle<JSObject *> aCpows,
nsIPrincipal* aPrincipal)
{
#if 0
nsCOMPtr<nsIMessageBroadcaster> globalIMessageManager =
do_GetService("@mozilla.org/globalmessagemanager;1");
RefPtr<nsFrameMessageManager> globalMessageManager =
Expand Down Expand Up @@ -414,6 +418,7 @@ nsresult TabChildHelper::DoSendAsyncMessage(JSContext* aCx,
if (!mView->DoSendAsyncMessage(nsString(aMessage).get(), json.get())) {
return NS_ERROR_UNEXPECTED;
}
#endif
return NS_OK;
}

Expand Down

0 comments on commit 38e27cd

Please sign in to comment.