-
Rob Swindell authored
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.
Rob Swindell authoredI 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.