Created
July 31, 2017 15:41
-
-
Save InfoSec812/4bf0440a8bbbfc07b36e9a9f4b93dfff to your computer and use it in GitHub Desktop.
Example Vert.x EventBus Service Proxy Issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AmbassadorsService.createProxy = function(vertx, ebAddress) { | |
| var __args = arguments; | |
| // The `__args[0]._jdel` object is `undefined`... | |
| if (__args.length === 2 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string') { | |
| if (closed) { | |
| throw new Error('Proxy is closed'); | |
| } | |
| j_eb.send(j_address, {"vertx":__args[0], "ebAddress":__args[1]}, {"action":"createProxy"}); | |
| return; | |
| } else throw new TypeError('function invoked with invalid arguments'); | |
| }; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the example generated code above, when I call
createProxy(eb, addr)theifstatement never evaluates to true because the__args[0]._jdelobject is alwaysundefined.