Closed
Bug 818317
Opened 13 years ago
Closed 12 years ago
Expose debug messages in navigator.mozPay() for debug enabled profiles
Categories
(Core :: DOM: Device Interfaces, defect)
Core
DOM: Device Interfaces
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: kumar, Assigned: ferjm)
References
Details
Attachments
(1 file)
22.76 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
In navigator.mozPay(), the only way to currently get debug output is to build a custom B2G with the dump statement uncommented, per http://mxr.mozilla.org/mozilla-central/source/dom/payment/Payment.jsm#29
Can we change this so that the dump() output is shown for debug profiles? I don't know the typical way this is done but I've seen other parts of the system show dump messages from debug-enabled profiles that were built like this:
cd ~/src/gaia
export DEBUG=1
make profile
/path/to/nightly/b2g-bin -profile ...
If we can get this change then we could use the nightly builds of B2G and still have an opportunity to see errors.
Reporter | ||
Updated•13 years ago
|
Blocks: marketplace-payments
Assignee | ||
Comment 1•13 years ago
|
||
If I am not wrong, the DEBUG flag is only useful on Gaia side.
Would adding a preference to enable mozPay debug output at run-time work for you?
Reporter | ||
Comment 2•13 years ago
|
||
sure, a dom pref to enable mozPay debug would be fine too. The issue is that we'd like to use nightly builds for development, not custom builds. Whatever is easiest.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → ferjmoreno
Reporter | ||
Comment 3•13 years ago
|
||
Something like how you can turn on identity debug messages would be helpful http://mxr.mozilla.org/mozilla-central/source/dom/identity/nsDOMIdentity.js#9
However, there are lots of workarounds and the DOMRequest error codes are already very helpful too. I.E. Not an urgent request :)
Updated•13 years ago
|
Updated•12 years ago
|
Blocks: PayId-v1next
Updated•12 years ago
|
No longer blocks: basecamp-payments
Assignee | ||
Comment 4•12 years ago
|
||
This patch adds a "dom.payment.debug" preference to enable payment debug messages.
Assignee | ||
Updated•12 years ago
|
Attachment #782630 -
Flags: review?(fabrice)
Comment 5•12 years ago
|
||
Comment on attachment 782630 [details] [diff] [review]
v1
Review of attachment 782630 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nits addressed and propagated to other files.
::: b2g/chrome/content/payment.js
@@ +15,5 @@
>
> +const PREF_DEBUG = "dom.payment.debug";
> +let _debug =
> + Services.prefs.getPrefType(PREF_DEBUG) == Ci.nsIPrefBranch.PREF_BOOL
> + && Services.prefs.getBoolPref(PREF_DEBUG);
does getPrefType throw if the pref does not exist at all?
@@ +17,5 @@
> +let _debug =
> + Services.prefs.getPrefType(PREF_DEBUG) == Ci.nsIPrefBranch.PREF_BOOL
> + && Services.prefs.getBoolPref(PREF_DEBUG);
> +
> +function _log(s) {
s/_log/LOG
@@ +27,5 @@
> +
> +if (_debug) {
> + _log("Frame script injected");
> +}
> +
LOG(...) is enough...
Comment 6•12 years ago
|
||
Comment on attachment 782630 [details] [diff] [review]
v1
Review of attachment 782630 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nits addressed and propagated to other files.
::: b2g/chrome/content/payment.js
@@ +15,5 @@
>
> +const PREF_DEBUG = "dom.payment.debug";
> +let _debug =
> + Services.prefs.getPrefType(PREF_DEBUG) == Ci.nsIPrefBranch.PREF_BOOL
> + && Services.prefs.getBoolPref(PREF_DEBUG);
does getPrefType throw if the pref does not exist at all?
@@ +17,5 @@
> +let _debug =
> + Services.prefs.getPrefType(PREF_DEBUG) == Ci.nsIPrefBranch.PREF_BOOL
> + && Services.prefs.getBoolPref(PREF_DEBUG);
> +
> +function _log(s) {
s/_log/LOG
@@ +27,5 @@
> +
> +if (_debug) {
> + _log("Frame script injected");
> +}
> +
LOG(...) is enough...
Attachment #782630 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•