Skip to content

Instantly share code, notes, and snippets.

@InfoSec812
Created July 31, 2017 15:41
Show Gist options
  • Select an option

  • Save InfoSec812/4bf0440a8bbbfc07b36e9a9f4b93dfff to your computer and use it in GitHub Desktop.

Select an option

Save InfoSec812/4bf0440a8bbbfc07b36e9a9f4b93dfff to your computer and use it in GitHub Desktop.
Example Vert.x EventBus Service Proxy Issues
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');
};
@InfoSec812
Copy link
Copy Markdown
Author

In the example generated code above, when I call createProxy(eb, addr) the if statement never evaluates to true because the __args[0]._jdel object is always undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment