Skip to content
Snippets Groups Projects
Commit 6ed4a05f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Native JS methods must return JS_FALSE for (Error) exceptions to be thrown

I discovered the first case when FileBase.get_path() failed, but didn't
(immediately) throw an exception. Reviewing the other instances of
JS_RepoertError() calls found several that either reported a garbage (e.g.
NULL) string value or returned JS_TRUE.

The design pattern used a little in js_socket.c probably should be used more:

	if (JS_IsExceptionPending(cx))
		return JS_FALSE;
	return JS_TRUE;

... but that's more of a refactor than I had the stomach for right now.
parent 3676d09a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment