Remove script argument to proxy loadApplicationScript

Summary:
The JSCExecutor API gets passed script data and a URL, but
the proxy's purpose in life is to load from the network, so the script
data is useless.  The code was failing to handle null script data, so
rather than just passing nullptr all the time, I removed the argument.
if there's a use case in the future for it, we can put it back.

Reviewed By: steveluscher

Differential Revision: D3312467

fbshipit-source-id: 986c48f1ef3c24e6b5569046ccb08d7864cdcd3d
This commit is contained in:
Marc Horowitz 2016-05-17 14:15:51 -07:00 committed by Facebook Github Bot 4
parent 0694a2991c
commit 8199893574
2 changed files with 2 additions and 3 deletions

View File

@ -36,11 +36,10 @@ public interface JavaJSExecutor {
/**
* Load javascript into the js context
* @param script script contet to be executed
* @param sourceURL url or file location from which script content was loaded
*/
@DoNotStrip
void loadApplicationScript(String script, String sourceURL) throws ProxyExecutorException;
void loadApplicationScript(String sourceURL) throws ProxyExecutorException;
/**
* Execute javascript method within js context

View File

@ -159,7 +159,7 @@ public class WebsocketJavaScriptExecutor implements JavaJSExecutor {
}
@Override
public void loadApplicationScript(String script, String sourceURL)
public void loadApplicationScript(String sourceURL)
throws ProxyExecutorException {
JSExecutorCallbackFuture callback = new JSExecutorCallbackFuture();
Assertions.assertNotNull(mWebSocketClient).loadApplicationScript(