Closed
Bug 1131424
Opened 10 years ago
Closed 10 years ago
Report error message when failing to open ctypes library
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: sfink, Assigned: sfink)
Details
Attachments
(1 file, 1 obsolete file)
1.99 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
It is very irritating to diagnose failures when opening a library. (In my case, it turned out to be because I still had an undefined symbol, because I needed to include additional object files in my link when I had a certain #define).
Assignee | ||
Comment 1•10 years ago
|
||
I'm not sure who pays attention to ctypes these days.
Attachment #8561804 -
Flags: review?(jorendorff)
Assignee | ||
Comment 2•10 years ago
|
||
I suppose I ought to let you review the version that compiles.
Attachment #8562429 -
Flags: review?(jorendorff)
Assignee | ||
Updated•10 years ago
|
Attachment #8561804 -
Attachment is obsolete: true
Attachment #8561804 -
Flags: review?(jorendorff)
Comment 3•10 years ago
|
||
Comment on attachment 8562429 [details] [diff] [review]
Report error message when failing to open ctypes library
Review of attachment 8562429 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ctypes/Library.cpp
@@ +146,5 @@
>
> PRLibrary* library = PR_LoadLibraryWithFlags(libSpec, 0);
>
> if (!library) {
> + char *error = (char*) js_malloc(PR_GetErrorTextLength() + 1);
I guess the usual allocation function to match JS_free is JS_malloc, but your call.
@@ +154,2 @@
> #ifdef XP_WIN
> + JS_ReportError(cx, "couldn't open library %hs: %s", pathChars, error);
All right, %s is nullsafe...
Attachment #8562429 -
Flags: review?(jorendorff) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Comment 5•10 years ago
|
||
Assignee | ||
Comment 6•10 years ago
|
||
check-style problems
https://hg.mozilla.org/integration/mozilla-inbound/rev/ab62fb74233b
Comment 7•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•