Closed
Bug 788229
Opened 13 years ago
Closed 13 years ago
String.indexOf should be replaced with String.contains in debugger-view.js
Categories
(DevTools :: Debugger, defect)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 18
People
(Reporter: jaws, Assigned: vorce67)
Details
(Whiteboard: [good first bug][mentor=jaws][lang=js])
Attachments
(1 file, 3 obsolete files)
1.11 KB,
patch
|
jaws
:
review+
|
Details | Diff | Splinter Review |
We should replace the two instances of string.indexOf in http://mxr.mozilla.org/mozilla-central/source/browser/devtools/debugger/debugger-view.js with string.contains.
The usages are at:
> http://mxr.mozilla.org/mozilla-central/source/browser/devtools/debugger/debugger-view.js#384
> http://mxr.mozilla.org/mozilla-central/source/browser/devtools/debugger/debugger-view.js#398
See http://wiki.ecmascript.org/doku.php?id=harmony:string_extras for documentation on the new String.contains method.
Assignee | ||
Comment 1•13 years ago
|
||
Attached is the updated debugger-view.js file
Comment 2•13 years ago
|
||
(In reply to Matt Vorce from comment #1)
> Created attachment 659434 [details] [diff] [review]
> Updated debugger-view.js file
>
> Attached is the updated debugger-view.js file
Can you attach the diff of your changes instead of the updated file please?
Assignee | ||
Comment 3•13 years ago
|
||
I believe I submitted the patch correctly this time.
Attachment #659434 -
Attachment is obsolete: true
Attachment #659755 -
Flags: review?(jaws)
Attachment #659755 -
Flags: checkin?(lucasr.at.mozilla)
Reporter | ||
Comment 4•13 years ago
|
||
Comment on attachment 659755 [details] [diff] [review]
Patch for bug 788229
Review of attachment 659755 [details] [diff] [review]:
-----------------------------------------------------------------
The changes to debugger-view.js look fine, but this patch removes 4 tests from the source tree that shouldn't be removed.
Tip: If you are using a Mercurial Queues patch file, you can apply the patch (hg qpush --move patchName), then refresh only the file that you want to keep (hg qref /path/to/debugger-view.js). This will now keep only the debugger-view.js changes in the patch. The other files will still have their changes but won't be part of the patch file. You can now revert the changes to the test files (hg revert --all). After running this last command, your tree will be back to a healthy state and your patch file will only contain the changes to debugger-view.js.
Attachment #659755 -
Flags: review?(jaws)
Attachment #659755 -
Flags: review-
Attachment #659755 -
Flags: checkin?(lucasr.at.mozilla)
Assignee | ||
Comment 5•13 years ago
|
||
This patch should only include changes to the requested debugger-view.js
Attachment #659755 -
Attachment is obsolete: true
Attachment #660133 -
Flags: review?(jaws)
Attachment #660133 -
Flags: checkin?(lucasr.at.mozilla)
Reporter | ||
Comment 6•13 years ago
|
||
Comment on attachment 660133 [details] [diff] [review]
Updated debugger-view.js file
Review of attachment 660133 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good to me.
Please update your Mercurial [ui] username field to include your email address. When you have done it successfully, it should look like:
username = Abraa <address@example.com>
Tip: Please don't set the checkin flag when requesting review. This flag is only used for multipart patches that have already been granted review but need to land at separate times.
Attachment #660133 -
Flags: review?(jaws)
Attachment #660133 -
Flags: review+
Attachment #660133 -
Flags: checkin?(lucasr.at.mozilla)
Comment 7•13 years ago
|
||
Comment on attachment 660133 [details] [diff] [review]
Updated debugger-view.js file
This is backwards. indexOf(...) == -1 means the string does /not/ contain the sub string.
Attachment #660133 -
Flags: review-
Reporter | ||
Comment 8•13 years ago
|
||
Doh! Sorry, thank you for catching that Dao.
Assignee | ||
Comment 9•13 years ago
|
||
That was a silly mistake last time. Everything should be correct now.
Attachment #660133 -
Attachment is obsolete: true
Attachment #660429 -
Flags: review?(lucasr.at.mozilla)
Attachment #660429 -
Flags: review?(jaws)
Reporter | ||
Comment 10•13 years ago
|
||
Matt, have you run the tests with this patch applied?
Assignee | ||
Comment 11•13 years ago
|
||
(In reply to Jared Wein [:jaws] from comment #10)
> Matt, have you run the tests with this patch applied?
No I have not yet. I will look into that.
Assignee | ||
Comment 12•13 years ago
|
||
I ran the mochitest-browser-chrome and their was no errors
Reporter | ||
Updated•13 years ago
|
Attachment #660429 -
Flags: review?(lucasr.at.mozilla)
Attachment #660429 -
Flags: review?(jaws)
Attachment #660429 -
Flags: review+
Reporter | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 13•13 years ago
|
||
Flags: in-testsuite-
Keywords: checkin-needed
Comment 14•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Comment 15•13 years ago
|
||
while I'm ok with this bug, in the future please ask a devtools peer for review before landing code.
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•