Closed
Bug 938597
Opened 11 years ago
Closed 11 years ago
Make 'cannot save prefs from content process assertions' more useful
Categories
(Toolkit :: Preferences, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: gwagner, Assigned: reuben)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
Right now we only see an assertion in the log but we don't know what pref we want to save.
19:19:14 INFO - [Child 879] WARNING: NS_ENSURE_TRUE(XRE_GetProcessType() == GeckoProcessType_Default) failed: file ../../../../gecko/modules/libpref/src/Preferences.cpp, line 1485
19:19:14 INFO - [Child 879] ###!!! ASSERTION: cannot save prefs from content process: 'Error', file ../../../../gecko/modules/libpref/src/Preferences.cpp, line 618
It would be great to print the pref name as well.
Reporter | ||
Comment 1•11 years ago
|
||
Reuben, something you could take?
Assignee | ||
Comment 2•11 years ago
|
||
Here's how it looks like:
[Child 34370] WARNING: ENSURE_MAIN_PROCESS failed. Cannot SetInt from content process: dom.foo.bar: file /Users/Reuben/Development/b2g-inbound/modules/libpref/src/Preferences.cpp, line 1493
[Child 34844] ###!!! ASSERTION: ENSURE_MAIN_PROCESS failed. Cannot SetIntPref from content process: dom.foo.bar: 'Error', file /Users/Reuben/Development/b2g-inbound/modules/libpref/src/nsPrefBranch.cpp, line 205
Assignee: nobody → reuben.bmo
Attachment #832335 -
Flags: review?(benjamin)
Comment 3•11 years ago
|
||
Comment on attachment 832335 [details] [diff] [review]
Include pref name in the error message for operations that cannot happen in content processes
PR_smprintf allocs, and you're never freeing the buffer. Also, the string formatting isn't guarded by a debug-only block, which is what I think you want here, right?
Attachment #832335 -
Flags: review?(benjamin) → review-
Comment 4•11 years ago
|
||
You may want nsPrintfCString
Assignee | ||
Comment 5•11 years ago
|
||
You are of course correct on both comments.
Attachment #832335 -
Attachment is obsolete: true
Attachment #8334012 -
Flags: review?(benjamin)
Updated•11 years ago
|
Attachment #8334012 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•11 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•