Closed
Bug 308283
Opened 19 years ago
Closed 17 years ago
stateFlags is a bit field and console.views.source2.progressListener.onStateChange should use & instead of == to check for something like STOP
Categories
(Other Applications Graveyard :: Venkman JS Debugger, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: Gijs)
References
()
Details
Attachments
(1 file, 2 obsolete files)
|
1.57 KB,
patch
|
caillon
:
review+
|
Details | Diff | Splinter Review |
the code currently compares explicitly == against 0xc0010 (state_is_window | state_is_network | state_stop), i think it should probably be using & instead of ==.
Comment 2•19 years ago
|
||
Comment on attachment 196061 [details] [diff] [review] use & r=silver (not sure I can review Venkman, but it looks good!) It might be nice to actually use the hex version of the number to make it clearer, though.
Attachment #196061 -
Flags: review?(silver) → review+
| Assignee | ||
Comment 3•17 years ago
|
||
Timeless, could you check this in?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•17 years ago
|
||
Comment on attachment 196061 [details] [diff] [review] use & >- else if (stateFlags == 786448) >+ else if (stateFlags & 786448) Um, can we not use a magic number and use the actual constants on nsIWebProgressListener? That number looks like (STATE_STOP | STATE_IS_NETWORK | STATE_IS_WINDOW)
Attachment #196061 -
Flags: review-
Updated•17 years ago
|
QA Contact: caillon → venkman
Updated•17 years ago
|
Assignee: rginda → timeless
| Assignee | ||
Comment 5•17 years ago
|
||
Like this?
Assignee: timeless → gijskruitbosch+bugs
Attachment #196061 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #296138 -
Flags: review?(caillon)
Comment 6•17 years ago
|
||
Comment on attachment 296138 [details] [diff] [review] Patch >+ const WINDOW = nsIWebProgressListener.STATE_IS_WINDOW; >+ const NETWORK = nsIWebProgressListener.STATE_IS_NETWORK; Nit, can you reverse these so they remain in the order they appear in the idl file? >- else if (stateFlags == 786448) >+ else if (stateFlags & (STOP | WINDOW | NETWORK)) I don't think this does what you expect when stateFlags has one or two of the bits set, but not all three. You probably want to add a bitmask variable, and make sure that the result of the bitwise AND operation is equal to the mask. Sort of like http://mxr.mozilla.org/mozilla/source/xpfe/appshell/src/nsAppShellService.cpp#313
Attachment #296138 -
Flags: review?(caillon) → review-
| Assignee | ||
Comment 7•17 years ago
|
||
Like this? :-)
Attachment #296138 -
Attachment is obsolete: true
Attachment #302333 -
Flags: review?(caillon)
Updated•17 years ago
|
Attachment #302333 -
Flags: review?(caillon) → review+
| Assignee | ||
Comment 8•17 years ago
|
||
Checking in mozilla/extensions/venkman/resources/content/venkman-views.js; /cvsroot/mozilla/extensions/venkman/resources/content/venkman-views.js,v <-- venkman-views.js new revision: 1.42; previous revision: 1.41 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•